diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index da4e2c4171171e..386253bb609e8e 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -24,22 +24,19 @@ ARG USER_UID=1000 ARG USER_GID=$USER_UID ENV LANG en_US.utf8 -# these are installed for terminal/dev convenience. If more tooling for build is required, please -# add them to chip-build (in integrations/docker/images/chip-build) + +# These are installed for terminal/dev convenience. If more tooling for build is required, please +# add them to chip-build (in integrations/docker/images/chip-build). RUN apt-get update \ && apt-get install -y locales \ && localedef -i en_US -c -f UTF-8 -A /usr/share/locale/locale.alias en_US.UTF-8 \ - && apt-get -fy install git vim emacs sudo \ + && apt-get -fy install vim emacs sudo \ apt-utils dialog zsh \ - iproute2 procps lsb-release \ + lsb-release \ bash-completion \ - build-essential cmake cppcheck valgrind \ - wget curl telnet \ + valgrind \ docker.io \ - iputils-ping net-tools \ - libncurses5 \ - libncursesw5 \ - libpython2.7 \ + iputils-ping \ && : RUN groupadd -g $USER_GID $USERNAME \ @@ -55,13 +52,22 @@ RUN curl https://raw.githubusercontent.com/restyled-io/restyler/master/bin/resty RUN mkdir -p /opt/sdk/sdks/ \ && chown -R $USERNAME:$USERNAME \ /opt/sdk/sdks/ `# NXP uses a patch_sdk script to change SDK files` \ - /opt/NordicSemiconductor/nrfconnect/ `# $USERNAME needs to own west configuration to build nRF Connect examples` \ - $IDF_PATH `# $USERNAME needs to own the esp-idf and tools for the examples to build` \ + $ANDROID_HOME \ + $IDF_TOOLS_PATH \ + && find $AMEBA_PATH -name "inc_lp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \ + && find $AMEBA_PATH -name "inc_hp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \ + && find $AMEBA_PATH -name "project_lp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \ + && find $AMEBA_PATH -name "project_hp" -print0 | xargs -0 chown -R $USERNAME:$USERNAME \ + && chmod -R +x \ + $ANDROID_HOME/tools/bin `# sdkmanager for accepting licenses`\ + && chmod -R +w \ $IDF_TOOLS_PATH \ - $SYSROOT_AARCH64 `# allow read/write access to header and libraries` \ - $ANDROID_HOME `# allow licenses to be accepted` \ - $AMEBA_PATH `# AmebaD requires access to change build_info.h` \ - $IMX_SDK_ROOT \ + && find $AMEBA_PATH -name "inc_lp" -print0 | xargs -0 chmod -R +w \ + && find $AMEBA_PATH -name "inc_hp" -print0 | xargs -0 chmod -R +w \ + && find $AMEBA_PATH -name "project_lp" -print0 | xargs -0 chmod -R +w \ + && find $AMEBA_PATH -name "project_hp" -print0 | xargs -0 chmod -R +w \ + # Safe directory is preffered over chown. + && git config --global --add safe.directory "*" \ && : # Fix Tizen SDK paths for new user diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 4d5be76434e8f8..9c7f6aeaef881b 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -14,9 +14,12 @@ "mounts": [ "source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind" ], - "initializeCommand": "bash .devcontainer/build.sh --tag matter-dev-environment:local --version 22", + "initializeCommand": "bash .devcontainer/build.sh --tag matter-dev-environment:local --version 74", "image": "matter-dev-environment:local", "remoteUser": "vscode", + "containerEnv": { + "PW_ENVIRONMENT_ROOT": "${containerWorkspaceFolder}/.environment-vscode" + }, "customizations": { "vscode": { // Add the IDs of extensions you want installed when the container is created in the array below. diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index c4f48058b70416..c84d4038352101 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -37,6 +37,7 @@ AdvSendAdvert AE aef AES +AFL AIDL algs alloc @@ -340,6 +341,7 @@ datamodel DataModelRevision dataset datasets +datastore DataVersion dbf DBG @@ -454,6 +456,7 @@ DS duplicative DUT DUTS +DUT's DV DVK dynload @@ -562,12 +565,14 @@ forkpty FOTA FreeRTOS FreeRTOSConfig +FS fsl fstab fsync ftd fullclean fuzzer +fuzztest FW gbl gcloud @@ -854,6 +859,7 @@ MbedNewTarget mbedos mbedTarget mbedTLS +MCORE mcu MCUboot mcumgr @@ -945,8 +951,6 @@ NitricOxideConcentrationMeasurement NitrogenDioxideConcentrationMeasurement nl nltest -NLUnitTest -NLUnitTests nmcli nmtui noc @@ -1005,6 +1009,7 @@ optionOverride optionsMask optionsOverride orgs +OSS OTA OTADownloader otaDownloadPath @@ -1527,6 +1532,7 @@ virtualenv visualstudio vlatest VLEDs +vm vn vnc vous diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 3e4f9d57056f63..be259e232e5022 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -75,7 +75,7 @@ jobs: with: languages: "cpp" - name: Setup Build - run: scripts/build/gn_gen.sh --args="chip_config_memory_debug_checks=true chip_config_memory_debug_dmalloc=false" + run: scripts/build/gn_gen.sh --args="chip_config_memory_debug_checks=true chip_config_memory_debug_dmalloc=false chip_data_model_check_die_on_failure=true" - name: Run Build run: scripts/run_in_build_env.sh "ninja -C ./out" - name: Run Tests @@ -179,7 +179,7 @@ jobs: scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE" - name: Setup Build, Run Build and Run Tests run: | - BUILD_TYPE=gcc_release scripts/build/gn_gen.sh --args="is_debug=false" + BUILD_TYPE=gcc_release scripts/build/gn_gen.sh --args="is_debug=false chip_data_model_check_die_on_failure=true" scripts/run_in_build_env.sh "ninja -C ./out/gcc_release" BUILD_TYPE=gcc_release scripts/tests/gn_tests.sh - name: Clean output @@ -197,7 +197,7 @@ jobs: esac rm -rf ./out/sanitizers - BUILD_TYPE=sanitizers scripts/build/gn_gen.sh --args="$GN_ARGS" --export-compile-commands + BUILD_TYPE=sanitizers scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true" --export-compile-commands BUILD_TYPE=sanitizers scripts/tests/gn_tests.sh done - name: Ensure codegen is done for sanitize @@ -308,7 +308,7 @@ jobs: - name: Setup Build, Run Build and Run Tests run: | - scripts/build/gn_gen.sh --args="enable_rtti=true chip_config_memory_debug_checks=false chip_config_memory_debug_dmalloc=false chip_generate_link_map_file=false" + scripts/build/gn_gen.sh --args="enable_rtti=true chip_config_memory_debug_checks=false chip_config_memory_debug_dmalloc=false chip_generate_link_map_file=false chip_data_model_check_die_on_failure=true" scripts/run_in_build_env.sh "ninja -C ./out" scripts/tests/gn_tests.sh - name: Setup test python environment @@ -415,7 +415,7 @@ jobs: # clang. "default") GN_ARGS='target_os="all" is_asan=true enable_host_clang_build=false';; esac - BUILD_TYPE=$BUILD_TYPE scripts/build/gn_gen.sh --args="$GN_ARGS" --export-compile-commands + BUILD_TYPE=$BUILD_TYPE scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true" --export-compile-commands scripts/run_in_build_env.sh "ninja -C ./out/$BUILD_TYPE" BUILD_TYPE=$BUILD_TYPE scripts/tests/gn_tests.sh done diff --git a/.github/workflows/darwin.yaml b/.github/workflows/darwin.yaml index ba9c0f1d9f02c3..360c5bb6963217 100644 --- a/.github/workflows/darwin.yaml +++ b/.github/workflows/darwin.yaml @@ -114,7 +114,6 @@ jobs: mkdir -p /tmp/darwin/framework-tests echo "This is a simple log" > /tmp/darwin/framework-tests/end_user_support_log.txt ../../../out/debug/all-clusters-app/chip-all-clusters-app --interface-id -1 --end_user_support_log /tmp/darwin/framework-tests/end_user_support_log.txt > >(tee /tmp/darwin/framework-tests/all-cluster-app.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-err.log >&2) & - ../../../out/debug/all-clusters-app/chip-all-clusters-app --interface-id -1 --dac_provider ../../../credentials/development/commissioner_dut/struct_cd_origin_pid_vid_correct/test_case_vector.json --product-id 32768 --discriminator 3839 --secured-device-port 5539 --KVS /tmp/chip-all-clusters-app-kvs2 > >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid.log) 2> >(tee /tmp/darwin/framework-tests/all-cluster-app-origin-vid-err.log >&2) & export TEST_RUNNER_ASAN_OPTIONS=__CURRENT_VALUE__:detect_stack_use_after_return=1 diff --git a/.github/workflows/examples-nxp.yaml b/.github/workflows/examples-nxp.yaml index 04094f0b20480d..050751457645d4 100644 --- a/.github/workflows/examples-nxp.yaml +++ b/.github/workflows/examples-nxp.yaml @@ -150,7 +150,7 @@ jobs: if: github.actor != 'restyled-io[bot]' container: - image: ghcr.io/project-chip/chip-build-rw61x:74 + image: ghcr.io/project-chip/chip-build-nxp:74 volumes: - "/tmp/bloat_reports:/tmp/bloat_reports" steps: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 26e8f939207ebe..15004c5aca5037 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -149,6 +149,8 @@ jobs: if [ "$idl_file" = './examples/placeholder/linux/apps/app2/config.matter' ]; then continue; fi if [ "$idl_file" = './examples/thermostat/thermostat-common/thermostat.matter' ]; then continue; fi if [ "$idl_file" = './examples/window-app/common/window-app.matter' ]; then continue; fi + # Example is intentionally not spe compliant for use in cert testing + if [ "$idl_file" = './examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter' ]; then continue; fi # Test files are intentionally small and not spec-compilant, just parse-compliant if [ "$idl_file" = "./scripts/py_matter_idl/matter_idl/tests/inputs/cluster_struct_attribute.matter" ]; then continue; fi diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index dbbda0aa36580f..3a9bca19317216 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -475,16 +475,26 @@ jobs: mkdir objdir-clone || true - name: Build Python REPL and example apps + # NOTE: the data-mode-check + check-failure-die is not 100% perfect as different + # encoding sizes for data that keeps changing may alter over time (e.g. anything relating to time + # or resources such as packet counts or other similar counters) + # + # This may result in invalid errors, however for most purposes of our testing, we are unlikely to + # hit such cases so we remain very strict on testing here. run: | scripts/run_in_build_env.sh './scripts/build_python.sh --install_virtual_env out/venv' ./scripts/run_in_build_env.sh \ "./scripts/build/build_examples.py \ - --target linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test \ + --target linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test-data-model-check-check-failure-die \ --target linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test \ --target linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test \ --target linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test \ --target linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test \ --target linux-x64-rvc-ipv6only-no-ble-no-wifi-tsan-clang-test \ + --target linux-x64-network-manager-ipv6only-no-ble-no-wifi-tsan-clang-test \ + --target linux-x64-fabric-admin-rpc-ipv6only-clang \ + --target linux-x64-fabric-bridge-rpc-ipv6only-no-ble-no-wifi-clang \ + --target linux-x64-light-data-model-no-unique-id-ipv6only-no-ble-no-wifi-clang \ --target linux-x64-python-bindings \ build \ --copy-artifacts-to objdir-clone \ @@ -492,12 +502,16 @@ jobs: - name: Generate an argument environment file run: | echo -n "" >/tmp/test_env.yaml - echo "ALL_CLUSTERS_APP: out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-all-clusters-app" >> /tmp/test_env.yaml + echo "ALL_CLUSTERS_APP: out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test-data-model-check-check-failure-die/chip-all-clusters-app" >> /tmp/test_env.yaml echo "CHIP_LOCK_APP: out/linux-x64-lock-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-lock-app" >> /tmp/test_env.yaml echo "ENERGY_MANAGEMENT_APP: out/linux-x64-energy-management-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-energy-management-app" >> /tmp/test_env.yaml echo "LIT_ICD_APP: out/linux-x64-lit-icd-ipv6only-no-ble-no-wifi-tsan-clang-test/lit-icd-app" >> /tmp/test_env.yaml echo "CHIP_MICROWAVE_OVEN_APP: out/linux-x64-microwave-oven-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-microwave-oven-app" >> /tmp/test_env.yaml echo "CHIP_RVC_APP: out/linux-x64-rvc-ipv6only-no-ble-no-wifi-tsan-clang-test/chip-rvc-app" >> /tmp/test_env.yaml + echo "NETWORK_MANAGEMENT_APP: out/linux-x64-network-manager-ipv6only-no-ble-no-wifi-tsan-clang-test/matter-network-manager-app" >> /tmp/test_env.yaml + echo "FABRIC_ADMIN_APP: out/linux-x64-fabric-admin-rpc-ipv6only-clang/fabric-admin" >> /tmp/test_env.yaml + echo "FABRIC_BRIDGE_APP: out/linux-x64-fabric-bridge-rpc-ipv6only-no-ble-no-wifi-clang/fabric-bridge-app" >> /tmp/test_env.yaml + echo "LIGHTING_APP_NO_UNIQUE_ID: out/linux-x64-light-data-model-no-unique-id-ipv6only-no-ble-no-wifi-clang/chip-lighting-app" >> /tmp/test_env.yaml echo "TRACE_APP: out/trace_data/app-{SCRIPT_BASE_NAME}" >> /tmp/test_env.yaml echo "TRACE_TEST_JSON: out/trace_data/test-{SCRIPT_BASE_NAME}" >> /tmp/test_env.yaml echo "TRACE_TEST_PERFETTO: out/trace_data/test-{SCRIPT_BASE_NAME}" >> /tmp/test_env.yaml @@ -507,17 +521,20 @@ jobs: mkdir -p out/trace_data scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --load-from-env /tmp/test_env.yaml --script src/controller/python/test/test_scripts/mobile-device-test.py' scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/execute_python_tests.py --env-file /tmp/test_env.yaml --search-directory src/python_testing' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestMatterTestingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' - scripts/run_in_python_env.sh out/venv './scripts/tests/run_python_test.py --script "src/python_testing/TestSpecParsingSupport.py" --script-args "--trace-to json:out/trace_data/test-{SCRIPT_BASE_NAME}.json --trace-to perfetto:out/trace_data/test-{SCRIPT_BASE_NAME}.perfetto"' - scripts/run_in_python_env.sh out/venv './scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py' + scripts/run_in_python_env.sh out/venv './scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py --all-clusters out/linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test-data-model-check-check-failure-die/chip-all-clusters-app' scripts/run_in_python_env.sh out/venv './src/python_testing/test_testing/test_TC_ICDM_2_1.py' scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestIdChecks.py' scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingDeviceType.py' + scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingSupport.py' + scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceTest.py' scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceSupport.py' + scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestConformanceTest.py' scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestChoiceConformanceSupport.py' scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_IDM_10_4.py' scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/test_TC_SC_7_1.py' scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/test_testing/TestDecorators.py' + scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestMatterTestingSupport.py' + scripts/run_in_python_env.sh out/venv 'python3 ./src/python_testing/TestSpecParsingSupport.py' - name: Uploading core files diff --git a/.github/workflows/unit_integration_test.yaml b/.github/workflows/unit_integration_test.yaml index 5716df1a5d33af..040e50f1535079 100644 --- a/.github/workflows/unit_integration_test.yaml +++ b/.github/workflows/unit_integration_test.yaml @@ -73,7 +73,7 @@ jobs: *) ;; esac - scripts/build/gn_gen.sh --args="$GN_ARGS" + scripts/build/gn_gen.sh --args="$GN_ARGS chip_data_model_check_die_on_failure=true" - name: Run Build run: scripts/run_in_build_env.sh "ninja -C out/$BUILD_TYPE" - name: Run Tests diff --git a/.gitignore b/.gitignore index 1c2d1430263594..98dc6780fccc2a 100644 --- a/.gitignore +++ b/.gitignore @@ -15,7 +15,7 @@ out/ /src/darwin/Framework/build/ # Pigweed Environment -.environment/ +.environment*/ build_overrides/pigweed_environment.gni # Temporary Directories @@ -84,4 +84,3 @@ examples/*/esp32/dependencies.lock # jupyter temporary files .ipynb_checkpoints - diff --git a/.gitmodules b/.gitmodules index 78a6cabb940d05..40801ec9742517 100644 --- a/.gitmodules +++ b/.gitmodules @@ -329,3 +329,19 @@ path = third_party/infineon/psoc6/psoc6_sdk/libs/lwip-network-interface-integration url = https://github.com/Infineon/lwip-network-interface-integration.git platforms = infineon +[submodule "third_party/abseil-cpp/src"] + path = third_party/abseil-cpp/src + url = https://github.com/abseil/abseil-cpp.git + platforms = linux,darwin +[submodule "third_party/fuzztest"] + path = third_party/fuzztest + url = https://github.com/google/fuzztest.git + platforms = linux,darwin +[submodule "third_party/googletest"] + path = third_party/googletest + url = https://github.com/google/googletest + platforms = linux,darwin +[submodule "third_party/re2/src"] + path = third_party/re2/src + url = https://github.com/google/re2.git + platforms = linux,darwin diff --git a/.vscode/settings.json b/.vscode/settings.json index 33bdd5e9f63d6f..fe0c4be3f84155 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -50,6 +50,7 @@ "editor.defaultFormatter": "esbenp.prettier-vscode" }, "files.associations": { + ".gitmodules": "ini", "*.mm": "cpp", "iostream": "cpp", "array": "cpp", @@ -138,6 +139,9 @@ "list": "cpp", "unordered_set": "cpp" }, + "[ini]": { + "editor.formatOnSave": false + }, // Configure paths or glob patterns to exclude from file watching. "files.watcherExclude": { "**/.git/objects/**": true, diff --git a/BUILD.gn b/BUILD.gn index c8e41976599173..9a0654a5dfc0aa 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -52,6 +52,7 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { if (enable_fuzz_test_targets) { group("fuzz_tests") { deps = [ + "${chip_root}/examples/all-clusters-app/linux:fuzz-chip-all-clusters-app", "${chip_root}/src/credentials/tests:fuzz-chip-cert", "${chip_root}/src/lib/core/tests:fuzz-tlv-reader", "${chip_root}/src/lib/dnssd/minimal_mdns/tests:fuzz-minmdns-packet-parsing", @@ -62,6 +63,18 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { } } + if (pw_enable_fuzz_test_targets) { + group("pw_fuzz_tests") { + deps = [ + "${chip_root}/src/credentials/tests:fuzz-chip-cert-pw(//build/toolchain/pw_fuzzer:chip_pw_fuzztest)", + "${chip_root}/src/lib/core/tests:fuzz-tlv-reader-pw(//build/toolchain/pw_fuzzer:chip_pw_fuzztest)", + "${chip_root}/src/lib/dnssd/minimal_mdns/tests:fuzz-minmdns-packet-parsing-pw(//build/toolchain/pw_fuzzer:chip_pw_fuzztest)", + "${chip_root}/src/lib/format/tests:fuzz-payload-decoder-pw(//build/toolchain/pw_fuzzer:chip_pw_fuzztest)", + "${chip_root}/src/setup_payload/tests:fuzz-setup-payload-base38-pw(//build/toolchain/pw_fuzzer:chip_pw_fuzztest)", + ] + } + } + # Matter's in-tree pw_python_package or pw_python_distribution targets. _matter_python_packages = [ "//examples/chef", @@ -140,6 +153,10 @@ if (current_toolchain != "${dir_pw_toolchain}/default:default") { deps += [ "//:fuzz_tests" ] } + if (pw_enable_fuzz_test_targets) { + deps += [ "//:pw_fuzz_tests" ] + } + if (chip_device_platform != "none") { deps += [ "${chip_root}/src/app/server" ] } diff --git a/build/chip/chip_test.gni b/build/chip/chip_test.gni deleted file mode 100644 index b5b32f24d0b0b7..00000000000000 --- a/build/chip/chip_test.gni +++ /dev/null @@ -1,71 +0,0 @@ -# Copyright (c) 2020 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build_overrides/build.gni") -import("//build_overrides/chip.gni") -import("//build_overrides/pigweed.gni") - -import("$dir_pw_build/python_action.gni") - -import("${chip_root}/build/chip/tests.gni") -import("${chip_root}/src/platform/device.gni") -import("${dir_pw_unit_test}/test.gni") - -assert(chip_build_tests) - -if (chip_link_tests) { - template("chip_test") { - _test_name = target_name - - _test_output_dir = "${root_out_dir}/tests" - if (defined(invoker.output_dir)) { - _test_output_dir = invoker.output_dir - } - - executable(_test_name) { - forward_variables_from(invoker, "*", [ "output_dir" ]) - output_dir = _test_output_dir - } - - group(_test_name + ".lib") { - } - - if (chip_pw_run_tests) { - pw_python_action(_test_name + ".run") { - deps = [ ":${_test_name}" ] - inputs = [ pw_unit_test_AUTOMATIC_RUNNER ] - module = "pw_unit_test.test_runner" - python_deps = [ - "$dir_pw_cli/py", - "$dir_pw_unit_test/py", - ] - args = [ - "--runner", - rebase_path(pw_unit_test_AUTOMATIC_RUNNER, root_build_dir), - "--test", - rebase_path("$_test_output_dir/$_test_name", root_build_dir), - ] - stamp = true - } - } - } -} else { - template("chip_test") { - group(target_name) { - } - group(target_name + ".lib") { - } - not_needed(invoker, "*") - } -} diff --git a/build/chip/chip_test_suite.gni b/build/chip/chip_test_suite.gni index 60f29346a48fa6..de6b7c16848eb5 100644 --- a/build/chip/chip_test_suite.gni +++ b/build/chip/chip_test_suite.gni @@ -14,13 +14,20 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") +import("//build_overrides/pigweed.gni") -import("${chip_root}/build/chip/chip_test.gni") import("${chip_root}/build/chip/tests.gni") import("${dir_pw_unit_test}/test.gni") assert(chip_build_tests) +declare_args() { + # These may be overridden in args.gni to build platform-specific test binaries. + test_executable_output_name = "" + test_executable_output_name_suffix = "" + test_executable_ldflags = [] +} + # Define CHIP unit tests # # Simple usage @@ -41,50 +48,34 @@ assert(chip_build_tests) # "${chip_root}/src/lib/foo", # add dependencies here # ] # } -# -# -# Deprecated usage (writing own driver files): -# -# chip_test_suite("tests") { -# output_name = "libFooTests" -# -# sources = [ -# "TestDeclarations.h", -# "TestFoo.cpp", -# "TestBar.cpp", -# ] -# -# public_deps = [ -# "${chip_root}/src/lib/foo", # add dependencies here -# ] -# -# tests = [ -# "TestFoo", # Assumes TestFooDriver.cpp exists -# "TestBar", # Assumes TestBarDriver.cpp exists -# ] -# } # template("chip_test_suite") { _suite_name = target_name - # Ensures that the common library has sources containing both common - # and individual unit tests. - if (!defined(invoker.sources)) { - invoker.sources = [] - } - - if (defined(invoker.test_sources)) { - invoker.sources += invoker.test_sources + exclude_variables = [ "tests" ] + if (chip_link_tests && chip_device_platform != "darwin") { + # Common library shouldn't have all the individual unit tests, only the common sources. + exclude_variables += [ "test_sources" ] + # NOTE: For `Build on Darwin (clang, python_lib, simulated)` the test_sources must be in common lib. + } else { + # Common library should have all the individual unit tests, in addition to the common sources. + if (!defined(invoker.sources)) { + invoker.sources = [] + } + if (defined(invoker.test_sources)) { + invoker.sources += invoker.test_sources + } } + # Target for the common library. Contains all the common sources, and sometimes all the individual test sources. if (chip_build_test_static_libraries) { _target_type = "static_library" } else { _target_type = "source_set" } target(_target_type, "${_suite_name}.lib") { - forward_variables_from(invoker, "*", [ "tests" ]) + forward_variables_from(invoker, "*", exclude_variables) output_dir = "${root_out_dir}/lib" @@ -102,6 +93,8 @@ template("chip_test_suite") { public_deps += [ "${chip_root}/src/platform/logging:default" ] } } + + # Build a source_set or a flashable executable for each individual unit test source, which also includes the common files. if (chip_link_tests) { tests = [] @@ -115,6 +108,7 @@ template("chip_test_suite") { } pw_test(_test_name) { + # Forward certain variables from the invoker. forward_variables_from(invoker, [ "deps", @@ -122,43 +116,30 @@ template("chip_test_suite") { "cflags", "configs", ]) + + # Link to the common lib for this suite so we get its `sources`. public_deps += [ ":${_suite_name}.lib" ] - sources = [ _test ] - output_dir = _test_output_dir - } - tests += [ _test_name ] - } - } - if (defined(invoker.tests)) { - foreach(_test, invoker.tests) { - _test_output_dir = "${root_out_dir}/tests" - if (defined(invoker.output_dir)) { - _test_output_dir = invoker.output_dir - } + # Set variables that the platform executable may need. + if (test_executable_output_name != "") { + output_name = test_executable_output_name + _test_name + + test_executable_output_name_suffix + } + ldflags = test_executable_ldflags + + # Add the individual test source file (e.g. "TestSomething.cpp"). + sources = [ _test ] - pw_test(_test) { - forward_variables_from(invoker, - [ - "deps", - "public_deps", - "cflags", - "configs", - ]) - public_deps += [ ":${_suite_name}.lib" ] - test_main = "" - sources = [ - "${_test}.cpp", - "${_test}Driver.cpp", - ] output_dir = _test_output_dir } - tests += [ _test ] + tests += [ _test_name ] } } group(_suite_name) { deps = [] + + # Add each individual unit test. foreach(_test, tests) { deps += [ ":${_test}" ] } @@ -167,6 +148,8 @@ template("chip_test_suite") { if (chip_pw_run_tests) { group("${_suite_name}_run") { deps = [] + + # Add the .run targets created by pw_test. foreach(_test, tests) { deps += [ ":${_test}.run" ] } diff --git a/build/chip/fuzz_test.gni b/build/chip/fuzz_test.gni index 784ed60273b02a..b48c3182b1b724 100644 --- a/build/chip/fuzz_test.gni +++ b/build/chip/fuzz_test.gni @@ -14,12 +14,20 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") +import("//build_overrides/pigweed.gni") + import("${build_root}/config/compiler/compiler.gni") import("${chip_root}/build/chip/tests.gni") +import("${dir_pw_unit_test}/test.gni") declare_args() { - enable_fuzz_test_targets = is_clang && chip_build_tests && - (current_os == "linux" || current_os == "mac") + #Fuzz testing using libfuzzer + enable_fuzz_test_targets = + (is_libfuzzer || oss_fuzz) && is_clang && chip_build_tests && + (current_os == "linux" || current_os == "mac") + + #Fuzz testing using pw_fuzzer and FuzzTest Framework + pw_enable_fuzz_test_targets = false } # Define a fuzz target for chip. @@ -66,3 +74,57 @@ template("chip_fuzz_target") { } } } + +# Define a fuzz target for Matter using pw_fuzzer and Google FuzzTest Framework. +# +# Google FuzzTest is only supported on Linux and MacOS using Clang: +# +# Sample usage +# +# chip_pw_fuzz_target("fuzz-target-name") { +# test_source = [ +# "FuzzTarget.cpp", # Fuzz target +# ] +# +# public_deps = [ +# "${chip_root}/src/lib/foo", # add dependencies here +# ] +# } +# +# +template("chip_pw_fuzz_target") { + if (defined(invoker.test_source)) { + _test_output_dir = "${root_out_dir}/tests" + + if (defined(invoker.output_dir)) { + _test_output_dir = invoker.output_dir + } + + pw_test(target_name) { + forward_variables_from(invoker, + [ + "deps", + "public_deps", + "cflags", + "configs", + "remove_configs", + ]) + + # TODO: remove this after pw_fuzzer's integration with OSS-Fuzz is complete. + #just a test for running FuzzTest with libfuzzer-compatibility mode, since this is the mode supported by OSS-fuzz + # defines = [ + # "FUZZTEST_COMPATIBILITY_MODE=libfuzzer", + # "MAKE_BUILD_TYPE=RelWithDebug", + # ] + + sources = invoker.test_source + output_dir = _test_output_dir + + deps = [ "$dir_pw_fuzzer:fuzztest" ] + + # this is necessary so FuzzTest is compiled into an executable in third_party/pigweed/repo/pw_unit_test/test.gni + # otherwise it will be built successfully but with FuzzTarget.DISABLED.ninja and no executable. + enable_if = true + } + } +} diff --git a/build/toolchain/flashable_executable.gni b/build/toolchain/flashable_executable.gni index 6233d58382b43d..b7f96b95f46f08 100644 --- a/build/toolchain/flashable_executable.gni +++ b/build/toolchain/flashable_executable.gni @@ -86,6 +86,10 @@ template("gen_flashing_script") { template("flashable_executable") { executable_target = "$target_name.executable" + if (!defined(invoker.output_dir)) { + invoker.output_dir = root_out_dir + } + if (defined(invoker.flashing_script_name)) { # Generating the flashing script is the final target. final_target = "$target_name.flashing" @@ -110,7 +114,10 @@ template("flashable_executable") { data_deps += invoker.data_deps } - write_runtime_deps = "${root_out_dir}/${flashbundle_name}" + # Invoker can stop this template from creating the flashbundle.txt by setting flashbundle_name to empty string. + if (flashbundle_name != "") { + write_runtime_deps = "${invoker.output_dir}/${flashbundle_name}" + } } if (defined(invoker.objcopy_image_name)) { @@ -124,8 +131,8 @@ template("flashable_executable") { objcopy = invoker.objcopy objcopy_convert(image_target) { - conversion_input = "${root_out_dir}/${invoker.output_name}" - conversion_output = "${root_out_dir}/${image_name}" + conversion_input = "${invoker.output_dir}/${invoker.output_name}" + conversion_output = "${invoker.output_dir}/${image_name}" conversion_target_format = image_format deps = [ ":$executable_target" ] } @@ -141,7 +148,8 @@ template("flashable_executable") { gen_flashing_script("$target_name.flashing") { flashing_script_generator = invoker.flashing_script_generator flashing_script_inputs = invoker.flashing_script_inputs - flashing_script_name = "$root_out_dir/${invoker.flashing_script_name}" + flashing_script_name = + "${invoker.output_dir}/${invoker.flashing_script_name}" if (defined(invoker.flashing_options)) { flashing_options = invoker.flashing_options } else { @@ -155,7 +163,7 @@ template("flashable_executable") { flashing_options += [ "--application", - rebase_path(image_name, root_out_dir, root_out_dir), + rebase_path(image_name, invoker.output_dir, invoker.output_dir), ] data_deps = [ ":$image_target" ] } diff --git a/build/toolchain/pw_fuzzer/BUILD.gn b/build/toolchain/pw_fuzzer/BUILD.gn new file mode 100644 index 00000000000000..385e57cc81be39 --- /dev/null +++ b/build/toolchain/pw_fuzzer/BUILD.gn @@ -0,0 +1,70 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import("//build_overrides/build.gni") +import("//build_overrides/pigweed.gni") + +import("$dir_pigweed/targets/host/target_toolchains.gni") +import("${build_root}/toolchain/gcc_toolchain.gni") + +# creating a secondary toolchain to be used with pw_fuzzer FuzzTests +# This toolchain is downstreamed from pigweed's pw_target_toolchain_host.clang_fuzz +# it allows us to specifically use googletest for fuzzing (instead of the lighter version of googletest used for unit testing) + +gcc_toolchain("chip_pw_fuzztest") { + forward_variables_from(pw_target_toolchain_host.clang_fuzz, "*", [ "name" ]) + + toolchain_args = { + # This is needed to have the defaults passed from pw_target_toolchain_host.clang_fuzz to the current scope + forward_variables_from(defaults, "*") + + pw_unit_test_MAIN = "$dir_pw_fuzzer:fuzztest_main" + pw_unit_test_BACKEND = "$dir_pw_fuzzer:gtest" + + # The next three lines are needed by the gcc_toolchain template + current_os = host_os + current_cpu = host_cpu + is_clang = true + + # the upstream pigweed host_clang toolchain defines a default sysroot, which results in build errors + # since it does not include SSL lib and is supposed to be minimal by design. + # by removing this default config, we will use the system's libs. Otherwise we can define our own sysroot. + # discussion on: https://discord.com/channels/691686718377558037/1275092695764959232 + remove_default_configs = [ "$dir_pw_toolchain/host_clang:linux_sysroot" ] + + # when is_debug = true, we pass -O0 to cflags and ldflags, while upstream pw_fuzzer toolchain defines "optimize_speed" config that passes -O2. + # This condition was added to prevent mixing the flags + if (is_debug) { + remove_default_configs += [ "$dir_pw_build:optimize_speed" ] + } + + # removing pigweed downstreamed configs related to warnings + # These are triggering an error related to -Wcast-qual in third_party/nlio + remove_default_configs += [ + "$dir_pw_build:strict_warnings", + "$dir_pw_build:extra_strict_warnings", + ] + + # the third_party abseil-cpp triggers warnings related to [-Wformat-nonliteral] + treat_warnings_as_errors = false + + dir_pw_third_party_abseil_cpp = "//third_party/abseil-cpp/src" + dir_pw_third_party_fuzztest = "//third_party/fuzztest" + dir_pw_third_party_googletest = "//third_party/googletest" + + # TODO: Seems that re2 support within FuzzTest was deprecated, keeping it defined is triggering warning + # Remove if re2 is indeed not needed + # dir_pw_third_party_re2 = "//third_party/re2/src" + } +} diff --git a/config/esp32/components/chip/CMakeLists.txt b/config/esp32/components/chip/CMakeLists.txt index 7e9894a8d66065..85141d5f962241 100644 --- a/config/esp32/components/chip/CMakeLists.txt +++ b/config/esp32/components/chip/CMakeLists.txt @@ -87,25 +87,25 @@ if (CONFIG_CHIP_CONFIG_IM_PRETTY_PRINT) endif() # Config the chip log level by IDF menuconfig -if (CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 1) +if (CONFIG_CHIP_LOG_DEFAULT_LEVEL GREATER_EQUAL 1) chip_gn_arg_bool ("chip_error_logging" "true") else() chip_gn_arg_bool ("chip_error_logging" "false") endif() -if (CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 3) +if (CONFIG_CHIP_LOG_DEFAULT_LEVEL GREATER_EQUAL 3) chip_gn_arg_bool ("chip_progress_logging" "true") else() chip_gn_arg_bool ("chip_progress_logging" "false") endif() -if (CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 4) +if (CONFIG_CHIP_LOG_DEFAULT_LEVEL GREATER_EQUAL 4) chip_gn_arg_bool ("chip_detail_logging" "true") else() chip_gn_arg_bool ("chip_detail_logging" "false") endif() -if (CONFIG_LOG_DEFAULT_LEVEL GREATER_EQUAL 5) +if (CONFIG_CHIP_LOG_DEFAULT_LEVEL GREATER_EQUAL 5) chip_gn_arg_bool ("chip_automation_logging" "true") else() chip_gn_arg_bool ("chip_automation_logging" "false") diff --git a/config/esp32/components/chip/Kconfig b/config/esp32/components/chip/Kconfig index d3f621f98f4024..de2963901fd7be 100644 --- a/config/esp32/components/chip/Kconfig +++ b/config/esp32/components/chip/Kconfig @@ -163,6 +163,46 @@ menu "CHIP Core" help Option to enable/disable CHIP data model. + config CHIP_SYSTEM_CONFIG_POOL_USE_HEAP + bool "Use heap memory to allocate object pools" + default n + help + This option enables the use of heap memory to allocate object pools. + When enabled, object pools are not pre-allocated. + Additionally, the maximum number of entries that can be allocated is + only limited by the available heap memory. + + This option can be useful if you encounter static DRAM overflow. + + NOTE: Since there is no cap on pool sizes, this may lead to issues + where embedded code assumes the pool size is limited, and no other + mechanisms are in place to restrict the size of allocations. + + NOTE: If enabled and the free heap is exhausted, this may result in + undefined behavior, potential non-compliance with specifications, + or failure during certification tests. Even if it passes, it may fail + to function properly with actual controllers. + + config MAX_GROUP_ENDPOINTS_PER_FABRIC + int "Maximum Group Endpoints per Fabric" + default 1 + help + Specifies the maximum number of group endpoints supported per fabric. + + config MAX_GROUPS_PER_FABRIC_PER_ENDPOINT + int "Maximum Groups per Fabric per Endpoint" + default 4 + help + Specifies the maximum number of groups per fabric for each endpoint. + The value of CHIP_CONFIG_MAX_GROUPS_PER_FABRIC is calculated as: + (MAX_GROUP_ENDPOINTS_PER_FABRIC * MAX_GROUPS_PER_FABRIC_PER_ENDPOINT) + + config MAX_GROUP_KEYS_PER_FABRIC + int "Maximum Number of Group Key Sets per Fabric" + default 3 + help + Specifies the maximum number of group key sets supported per fabric. + endmenu # "General Options" menu "Networking Options" @@ -1132,6 +1172,36 @@ menu "CHIP Device Layer" To see detailed logging please set default log level to Debug. (Component config --> Log output --> Default log verbosity --> Debug) + choice CHIP_LOG_DEFAULT_LEVEL + bool "CHIP default log verbosity" + default CHIP_LOG_DEFAULT_LEVEL_EQUALS_LOG_DEFAULT_LEVEL + help + Default log level for CHIP logs. Note that CHIP_LOG_DEFAULT_LEVEL can only be less than or equal to LOG_DEFAULT_LEVEL. + + config CHIP_LOG_DEFAULT_LEVEL_EQUALS_LOG_DEFAULT_LEVEL + bool "Same as default log level" + config CHIP_LOG_DEFAULT_LEVEL_NONE + bool "CHIP logging disabled" + config CHIP_LOG_DEFAULT_LEVEL_ERROR + bool "Enable Error Logs" + config CHIP_LOG_DEFAULT_LEVEL_PROGRESS + bool "Enable Progress Logs" + config CHIP_LOG_DEFAULT_LEVEL_DETAIL + bool "Enable Detail Logs" + config CHIP_LOG_DEFAULT_LEVEL_AUTOMATION + bool "Enable Automation Logs" + endchoice + + config CHIP_LOG_DEFAULT_LEVEL + int + range 0 LOG_DEFAULT_LEVEL + default LOG_DEFAULT_LEVEL if CHIP_LOG_DEFAULT_LEVEL_EQUALS_LOG_DEFAULT_LEVEL + default 0 if CHIP_LOG_DEFAULT_LEVEL_NONE + default 1 if CHIP_LOG_DEFAULT_LEVEL_ERROR + default 3 if CHIP_LOG_DEFAULT_LEVEL_PROGRESS + default 4 if CHIP_LOG_DEFAULT_LEVEL_DETAIL + default 5 if CHIP_LOG_DEFAULT_LEVEL_AUTOMATION + endmenu config CHIP_ENABLE_BDX_LOG_TRANSFER diff --git a/config/esp32/components/chip/idf_component.yml b/config/esp32/components/chip/idf_component.yml index b56040ea3aaa07..aeffec708dba8c 100644 --- a/config/esp32/components/chip/idf_component.yml +++ b/config/esp32/components/chip/idf_component.yml @@ -27,7 +27,7 @@ dependencies: - if: "target != esp32h2" espressif/esp_rcp_update: - version: "1.0.3" + version: "1.2.0" rules: - if: "idf_version >=5.0" diff --git a/config/nrfconnect/chip-module/CMakeLists.txt b/config/nrfconnect/chip-module/CMakeLists.txt index 20c5c692b68633..ee169106ffc8f9 100644 --- a/config/nrfconnect/chip-module/CMakeLists.txt +++ b/config/nrfconnect/chip-module/CMakeLists.txt @@ -147,6 +147,7 @@ if (CONFIG_CHIP_ENABLE_ICD_SUPPORT) matter_add_gn_arg_bool ("chip_enable_icd_lit" CONFIG_CHIP_ICD_LIT_SUPPORT) matter_add_gn_arg_bool ("chip_enable_icd_checkin" CONFIG_CHIP_ICD_CHECK_IN_SUPPORT) matter_add_gn_arg_bool ("chip_enable_icd_user_active_mode_trigger" CONFIG_CHIP_ICD_UAT_SUPPORT) + matter_add_gn_arg_bool ("icd_enforce_sit_slow_poll_limit" TRUE) endif() if (CONFIG_CHIP_FACTORY_DATA OR CONFIG_CHIP_FACTORY_DATA_CUSTOM_BACKEND) diff --git a/config/nrfconnect/chip-module/Kconfig.features b/config/nrfconnect/chip-module/Kconfig.features index fbae62d28e1f24..a610c37eed70d8 100644 --- a/config/nrfconnect/chip-module/Kconfig.features +++ b/config/nrfconnect/chip-module/Kconfig.features @@ -162,6 +162,7 @@ config CHIP_DFU_OVER_BT_SMP # Enable custom SMP request to erase settings partition. select MCUMGR_GRP_ZBASIC select MCUMGR_GRP_ZBASIC_STORAGE_ERASE + select MCUMGR_TRANSPORT_BT_REASSEMBLY help Enables Device Firmware Upgrade over Bluetooth LE with SMP and configures the set of options related to that feature. diff --git a/config/zephyr/Kconfig b/config/zephyr/Kconfig index fb06e106e29a38..62efe30c07fda4 100644 --- a/config/zephyr/Kconfig +++ b/config/zephyr/Kconfig @@ -354,6 +354,15 @@ config CHIP_ICD_SLOW_POLL_INTERVAL device is in the idle mode. It determines the fastest frequency at which the device will be able to receive the messages in the idle mode. +config CHIP_ICD_SIT_SLOW_POLL_LIMIT + int "Intermittently Connected Device slow polling interval limit for device in SIT mode (ms)" + default 15000 + range 0 15000 + help + Provides the limit for Intermittently Connected Device slow polling interval in milliseconds while the + device is in the SIT mode. By spec, this value cannot exceed 15 s (spec 9.16.1.5). This value can be + used for the LIT device, to limit the slow poll interval used while temporarily working in the SIT mode. + config CHIP_ICD_FAST_POLLING_INTERVAL int "Intermittently Connected Device fast polling interval (ms)" default 200 diff --git a/config/zephyr/chip-module/CMakeLists.txt b/config/zephyr/chip-module/CMakeLists.txt index 575e4ff24b4827..8449398b4f480b 100644 --- a/config/zephyr/chip-module/CMakeLists.txt +++ b/config/zephyr/chip-module/CMakeLists.txt @@ -1,140 +1,142 @@ # -# Copyright (c) 2022-2023 Project CHIP Authors +# Copyright (c) 2022-2023 Project CHIP Authors # -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at # -# http://www.apache.org/licenses/LICENSE-2.0 +# http://www.apache.org/licenses/LICENSE-2.0 # -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. # # -# @file -# CMake sub-project defining 'chip' target which represents CHIP library -# Since CHIP doesn't provide native CMake support, ExternalProject -# module is used to build the required artifacts with GN meta-build -# system. It is assumed that find_package(Zephyr) has been called before -# including this file. +# @file +# CMake sub-project defining 'chip' target which represents CHIP library +# Since CHIP doesn't provide native CMake support, ExternalProject +# module is used to build the required artifacts with GN meta-build +# system. It is assumed that find_package(Zephyr) has been called before +# including this file. # -if (CONFIG_CHIP) - -include(ExternalProject) -include(../zephyr-util.cmake) - -# -# ============================================================================== -# Prepare CHIP configuration based on the project Kconfig configuration -# ============================================================================== -# Set paths -if (NOT CHIP_ROOT) - get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH) -endif() -get_filename_component(GN_ROOT_TARGET ${CHIP_ROOT}/config/zephyr/chip-gn REALPATH) -get_filename_component(COMMON_CMAKE_SOURCE_DIR ${CHIP_ROOT}/config/common/cmake REALPATH) - - -# Get common Cmake sources -include(${COMMON_CMAKE_SOURCE_DIR}/chip_gn_args.cmake) -include(${COMMON_CMAKE_SOURCE_DIR}/chip_gn.cmake) - -if (CONFIG_POSIX_API) - matter_add_flags(-D_DEFAULT_SOURCE) - matter_add_flags(-isystem${ZEPHYR_BASE}/include/zephyr/posix) -endif() - -if(CONFIG_MBEDTLS) - zephyr_include_directories($) - zephyr_compile_definitions($) -endif() - -zephyr_get_compile_flags(ZEPHYR_CFLAGS_C C) -matter_add_cflags("${ZEPHYR_CFLAGS_C}") -zephyr_get_compile_flags(ZEPHYR_CFLAGS_CC CXX) -matter_add_cxxflags("${ZEPHYR_CFLAGS_CC}") -zephyr_get_gnu_cpp_standard(ZEPHYR_GNU_CPP_STD) -matter_add_cxxflags("${ZEPHYR_GNU_CPP_STD}") - -# Set up custom OpenThread configuration - -if (CONFIG_CHIP_OPENTHREAD_CONFIG) - get_filename_component(CHIP_OPENTHREAD_CONFIG - ${CONFIG_CHIP_OPENTHREAD_CONFIG} - REALPATH - BASE_DIR ${CMAKE_SOURCE_DIR} +if(CONFIG_CHIP) + include(ExternalProject) + include(../zephyr-util.cmake) + + # + # ============================================================================== + # Prepare CHIP configuration based on the project Kconfig configuration + # ============================================================================== + # Set paths + if(NOT CHIP_ROOT) + get_filename_component(CHIP_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../../.. REALPATH) + endif() + + get_filename_component(GN_ROOT_TARGET ${CHIP_ROOT}/config/zephyr/chip-gn REALPATH) + get_filename_component(COMMON_CMAKE_SOURCE_DIR ${CHIP_ROOT}/config/common/cmake REALPATH) + + # Get common Cmake sources + include(${COMMON_CMAKE_SOURCE_DIR}/chip_gn_args.cmake) + include(${COMMON_CMAKE_SOURCE_DIR}/chip_gn.cmake) + + if(CONFIG_POSIX_API) + matter_add_flags(-D_DEFAULT_SOURCE) + matter_add_flags(-isystem${ZEPHYR_BASE}/include/zephyr/posix) + endif() + + if(CONFIG_MBEDTLS) + zephyr_include_directories($) + zephyr_compile_definitions($) + endif() + + zephyr_get_compile_flags(ZEPHYR_CFLAGS_C C) + matter_add_cflags("${ZEPHYR_CFLAGS_C}") + zephyr_get_compile_flags(ZEPHYR_CFLAGS_CC CXX) + matter_add_cxxflags("${ZEPHYR_CFLAGS_CC}") + zephyr_get_gnu_cpp_standard(ZEPHYR_GNU_CPP_STD) + matter_add_cxxflags("${ZEPHYR_GNU_CPP_STD}") + + # Set up custom OpenThread configuration + if(CONFIG_CHIP_OPENTHREAD_CONFIG) + get_filename_component(CHIP_OPENTHREAD_CONFIG + ${CONFIG_CHIP_OPENTHREAD_CONFIG} + REALPATH + BASE_DIR ${CMAKE_SOURCE_DIR} + ) + zephyr_set_openthread_config(${CHIP_OPENTHREAD_CONFIG}) + endif() + + # ============================================================================== + # Generate configuration for CHIP GN build system + # ============================================================================== + matter_common_gn_args( + DEBUG CONFIG_DEBUG + LIB_SHELL CONFIG_CHIP_LIB_SHELL + LIB_TESTS CONFIG_CHIP_BUILD_TESTS + PROJECT_CONFIG ${CONFIG_CHIP_PROJECT_CONFIG} ) - zephyr_set_openthread_config(${CHIP_OPENTHREAD_CONFIG}) -endif() - -# ============================================================================== -# Generate configuration for CHIP GN build system -# ============================================================================== -matter_common_gn_args( - DEBUG CONFIG_DEBUG - LIB_SHELL CONFIG_CHIP_LIB_SHELL - LIB_TESTS CONFIG_CHIP_BUILD_TESTS - PROJECT_CONFIG ${CONFIG_CHIP_PROJECT_CONFIG} -) - -matter_add_gn_arg_string("zephyr_ar" ${CMAKE_AR}) -matter_add_gn_arg_string("zephyr_cc" ${CMAKE_C_COMPILER}) -matter_add_gn_arg_string("zephyr_cxx" ${CMAKE_CXX_COMPILER}) -matter_add_gn_arg_bool ("chip_logging" CONFIG_LOG) -matter_add_gn_arg_bool ("chip_error_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 1) -matter_add_gn_arg_bool ("chip_progress_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 3) -matter_add_gn_arg_bool ("chip_detail_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 4) -matter_add_gn_arg_bool ("chip_automation_logging" FALSE) -matter_add_gn_arg_bool ("chip_enable_openthread" CONFIG_NET_L2_OPENTHREAD) -matter_add_gn_arg_bool ("chip_openthread_ftd" CONFIG_OPENTHREAD_FTD) -matter_add_gn_arg_bool ("chip_inet_config_enable_ipv4" CONFIG_CHIP_IPV4) -matter_add_gn_arg_bool ("chip_enable_wifi" CONFIG_WIFI) -matter_add_gn_arg_bool ("chip_config_network_layer_ble" CONFIG_BT) -matter_add_gn_arg_bool ("chip_mdns_minimal" CONFIG_WIFI) -matter_add_gn_arg_bool ("chip_mdns_minimal" CONFIG_NET_L2_ETHERNET) -matter_add_gn_arg_bool ("chip_mdns_platform" CONFIG_NET_L2_OPENTHREAD) -matter_add_gn_arg_bool ("chip_inet_config_enable_tcp_endpoint" CONFIG_CHIP_BUILD_TESTS) -matter_add_gn_arg_bool ("chip_inet_config_enable_udp_endpoint" CONFIG_NET_UDP) -matter_add_gn_arg_bool ("chip_inet_config_enable_tcp_endpoint" CONFIG_NET_TCP) -matter_add_gn_arg_bool ("chip_malloc_sys_heap" CONFIG_CHIP_MALLOC_SYS_HEAP) - - -if (CONFIG_CHIP_ENABLE_DNSSD_SRP) - matter_add_gn_arg_string("chip_mdns" "platform") -endif() - -if(CONFIG_WIFI) - matter_add_gn_arg_string("chip_mdns" "minimal") -elseif (CONFIG_NET_L2_ETHERNET) - matter_add_gn_arg_string("chip_mdns" "minimal") -elseif (CONFIG_NET_L2_OPENTHREAD) - matter_add_gn_arg_string("chip_mdns" "platform") -else() - matter_add_gn_arg_string("chip_mdns" "none") -endif() - -if (CONFIG_CHIP_PW_RPC) - set(PIGWEED_DIR "//third_party/pigweed/repo") - matter_add_gn_arg_string("pw_assert_BACKEND" ${PIGWEED_DIR}/pw_assert_log:check_backend) - matter_add_gn_arg_string("pw_log_BACKEND" ${PIGWEED_DIR}/pw_log_basic) - matter_add_gn_arg("pw_build_LINK_DEPS" [\"${PIGWEED_DIR}/pw_assert:impl\",\ \"${PIGWEED_DIR}/pw_log:impl\"]) -endif() - -matter_generate_args_tmp_file() - -# ============================================================================== -# Build chip library -# ============================================================================== -matter_build(chip - LIB_SHELL ${CONFIG_CHIP_LIB_SHELL} - LIB_TESTS ${CONFIG_CHIP_BUILD_TESTS} - GN_DEPENDENCIES kernel -) -set_property(GLOBAL APPEND PROPERTY ZEPHYR_INTERFACE_LIBS chip) + matter_add_gn_arg_string("zephyr_ar" ${CMAKE_AR}) + matter_add_gn_arg_string("zephyr_cc" ${CMAKE_C_COMPILER}) + matter_add_gn_arg_string("zephyr_cxx" ${CMAKE_CXX_COMPILER}) + matter_add_gn_arg_bool("chip_logging" CONFIG_LOG) + matter_add_gn_arg_bool("chip_error_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 1) + matter_add_gn_arg_bool("chip_progress_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 3) + matter_add_gn_arg_bool("chip_detail_logging" CONFIG_MATTER_LOG_LEVEL GREATER_EQUAL 4) + matter_add_gn_arg_bool("chip_automation_logging" FALSE) + matter_add_gn_arg_bool("chip_enable_openthread" CONFIG_NET_L2_OPENTHREAD) + matter_add_gn_arg_bool("chip_openthread_ftd" CONFIG_OPENTHREAD_FTD) + matter_add_gn_arg_bool("chip_inet_config_enable_ipv4" CONFIG_CHIP_IPV4) + matter_add_gn_arg_bool("chip_enable_wifi" CONFIG_WIFI) + matter_add_gn_arg_bool("chip_config_network_layer_ble" CONFIG_BT) + matter_add_gn_arg_bool("chip_mdns_minimal" CONFIG_WIFI) + matter_add_gn_arg_bool("chip_mdns_minimal" CONFIG_NET_L2_ETHERNET) + matter_add_gn_arg_bool("chip_mdns_platform" CONFIG_NET_L2_OPENTHREAD) + matter_add_gn_arg_bool("chip_inet_config_enable_tcp_endpoint" CONFIG_CHIP_BUILD_TESTS) + matter_add_gn_arg_bool("chip_malloc_sys_heap" CONFIG_CHIP_MALLOC_SYS_HEAP) + matter_add_gn_arg_bool("chip_inet_config_enable_tcp_endpoint" FALSE) + matter_add_gn_arg_bool("chip_enable_read_client" CONFIG_CHIP_ENABLE_READ_CLIENT) + + if(BOARD STREQUAL "native_posix") + matter_add_gn_arg_string("target_cpu" "x86") + elseif(BOARD STREQUAL "native_posix_64") + matter_add_gn_arg_string("target_cpu" "x64") + endif() + + if(CONFIG_CHIP_ENABLE_DNSSD_SRP) + matter_add_gn_arg_string("chip_mdns" "platform") + endif() + + if(CONFIG_WIFI) + matter_add_gn_arg_string("chip_mdns" "minimal") + elseif(CONFIG_NET_L2_ETHERNET) + matter_add_gn_arg_string("chip_mdns" "minimal") + elseif(CONFIG_NET_L2_OPENTHREAD) + matter_add_gn_arg_string("chip_mdns" "platform") + else() + matter_add_gn_arg_string("chip_mdns" "none") + endif() + + if(CONFIG_CHIP_PW_RPC) + set(PIGWEED_DIR "//third_party/pigweed/repo") + matter_add_gn_arg_string("pw_assert_BACKEND" ${PIGWEED_DIR}/pw_assert_log:check_backend) + matter_add_gn_arg_string("pw_log_BACKEND" ${PIGWEED_DIR}/pw_log_basic) + matter_add_gn_arg("pw_build_LINK_DEPS" [\"${PIGWEED_DIR}/pw_assert:impl\",\ \"${PIGWEED_DIR}/pw_log:impl\"]) + endif() + + matter_generate_args_tmp_file() + + # ============================================================================== + # Build chip library + # ============================================================================== + matter_build(chip + LIB_SHELL ${CONFIG_CHIP_LIB_SHELL} + LIB_TESTS ${CONFIG_CHIP_BUILD_TESTS} + GN_DEPENDENCIES kernel + ) + set_property(GLOBAL APPEND PROPERTY ZEPHYR_INTERFACE_LIBS chip) endif() # CONFIG_CHIP \ No newline at end of file diff --git a/config/zephyr/chip-module/Kconfig.mbedtls b/config/zephyr/chip-module/Kconfig.mbedtls index 3e4fdc1895db3c..72b1563b1e808d 100644 --- a/config/zephyr/chip-module/Kconfig.mbedtls +++ b/config/zephyr/chip-module/Kconfig.mbedtls @@ -61,4 +61,11 @@ config MBEDTLS_ECDH_C config MBEDTLS_ECDSA_C default y -endif #CHIP \ No newline at end of file +config MBEDTLS_X509_CSR_WRITE_C + default y + +config MBEDTLS_PK_WRITE_C + default y + +endif #CHIP + diff --git a/data_model/in_progress/clusters/ACL-Cluster.xml b/data_model/in_progress/clusters/ACL-Cluster.xml new file mode 100644 index 00000000000000..15eebb425286a4 --- /dev/null +++ b/data_model/in_progress/clusters/ACL-Cluster.xml @@ -0,0 +1,352 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/AccountLogin.xml b/data_model/in_progress/clusters/AccountLogin.xml new file mode 100644 index 00000000000000..6205fb6cb73261 --- /dev/null +++ b/data_model/in_progress/clusters/AccountLogin.xml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/AdminCommissioningCluster.xml b/data_model/in_progress/clusters/AdminCommissioningCluster.xml new file mode 100644 index 00000000000000..77a8862b2eedc7 --- /dev/null +++ b/data_model/in_progress/clusters/AdminCommissioningCluster.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/AirQuality.xml b/data_model/in_progress/clusters/AirQuality.xml new file mode 100644 index 00000000000000..69387d451a38c0 --- /dev/null +++ b/data_model/in_progress/clusters/AirQuality.xml @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/AlarmBase.xml b/data_model/in_progress/clusters/AlarmBase.xml new file mode 100644 index 00000000000000..e374dcc382d208 --- /dev/null +++ b/data_model/in_progress/clusters/AlarmBase.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ApplicationBasic.xml b/data_model/in_progress/clusters/ApplicationBasic.xml new file mode 100644 index 00000000000000..93ffeeb958ad3a --- /dev/null +++ b/data_model/in_progress/clusters/ApplicationBasic.xml @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ApplicationLauncher.xml b/data_model/in_progress/clusters/ApplicationLauncher.xml new file mode 100644 index 00000000000000..51fcde769007e9 --- /dev/null +++ b/data_model/in_progress/clusters/ApplicationLauncher.xml @@ -0,0 +1,172 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/AudioOutput.xml b/data_model/in_progress/clusters/AudioOutput.xml new file mode 100644 index 00000000000000..9972a8a87e7a6f --- /dev/null +++ b/data_model/in_progress/clusters/AudioOutput.xml @@ -0,0 +1,139 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/BallastConfiguration.xml b/data_model/in_progress/clusters/BallastConfiguration.xml new file mode 100644 index 00000000000000..9dbf4e61887d76 --- /dev/null +++ b/data_model/in_progress/clusters/BallastConfiguration.xml @@ -0,0 +1,164 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/BasicInformationCluster.xml b/data_model/in_progress/clusters/BasicInformationCluster.xml new file mode 100644 index 00000000000000..168a0353761159 --- /dev/null +++ b/data_model/in_progress/clusters/BasicInformationCluster.xml @@ -0,0 +1,339 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Binding-Cluster.xml b/data_model/in_progress/clusters/Binding-Cluster.xml new file mode 100644 index 00000000000000..72fc1eb6b3282d --- /dev/null +++ b/data_model/in_progress/clusters/Binding-Cluster.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/BooleanState.xml b/data_model/in_progress/clusters/BooleanState.xml new file mode 100644 index 00000000000000..9754a7af60b57a --- /dev/null +++ b/data_model/in_progress/clusters/BooleanState.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/BooleanStateConfiguration.xml b/data_model/in_progress/clusters/BooleanStateConfiguration.xml new file mode 100644 index 00000000000000..d4ae791ad7649f --- /dev/null +++ b/data_model/in_progress/clusters/BooleanStateConfiguration.xml @@ -0,0 +1,220 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Channel.xml b/data_model/in_progress/clusters/Channel.xml new file mode 100644 index 00000000000000..02bfcf3b25c854 --- /dev/null +++ b/data_model/in_progress/clusters/Channel.xml @@ -0,0 +1,465 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ColorControl.xml b/data_model/in_progress/clusters/ColorControl.xml new file mode 100644 index 00000000000000..fa14aca0f8b5f4 --- /dev/null +++ b/data_model/in_progress/clusters/ColorControl.xml @@ -0,0 +1,1162 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/CommissionerControlCluster.xml b/data_model/in_progress/clusters/CommissionerControlCluster.xml new file mode 100644 index 00000000000000..d3b8380aaba929 --- /dev/null +++ b/data_model/in_progress/clusters/CommissionerControlCluster.xml @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ConcentrationMeasurement.xml b/data_model/in_progress/clusters/ConcentrationMeasurement.xml new file mode 100644 index 00000000000000..68d4b7937bf717 --- /dev/null +++ b/data_model/in_progress/clusters/ConcentrationMeasurement.xml @@ -0,0 +1,263 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ContentAppObserver.xml b/data_model/in_progress/clusters/ContentAppObserver.xml new file mode 100644 index 00000000000000..7ffe0b11d04377 --- /dev/null +++ b/data_model/in_progress/clusters/ContentAppObserver.xml @@ -0,0 +1,106 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ContentControl.xml b/data_model/in_progress/clusters/ContentControl.xml new file mode 100644 index 00000000000000..6b72a298ebeead --- /dev/null +++ b/data_model/in_progress/clusters/ContentControl.xml @@ -0,0 +1,430 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ContentLauncher.xml b/data_model/in_progress/clusters/ContentLauncher.xml new file mode 100644 index 00000000000000..5470a14ce1da64 --- /dev/null +++ b/data_model/in_progress/clusters/ContentLauncher.xml @@ -0,0 +1,374 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/DemandResponseLoadControl.xml b/data_model/in_progress/clusters/DemandResponseLoadControl.xml new file mode 100644 index 00000000000000..1acd1ea26c6088 --- /dev/null +++ b/data_model/in_progress/clusters/DemandResponseLoadControl.xml @@ -0,0 +1,453 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Descriptor-Cluster.xml b/data_model/in_progress/clusters/Descriptor-Cluster.xml new file mode 100644 index 00000000000000..e30b12ea713d6b --- /dev/null +++ b/data_model/in_progress/clusters/Descriptor-Cluster.xml @@ -0,0 +1,118 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/DeviceEnergyManagement.xml b/data_model/in_progress/clusters/DeviceEnergyManagement.xml new file mode 100644 index 00000000000000..776a06f20b3fd4 --- /dev/null +++ b/data_model/in_progress/clusters/DeviceEnergyManagement.xml @@ -0,0 +1,674 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/DiagnosticLogsCluster.xml b/data_model/in_progress/clusters/DiagnosticLogsCluster.xml new file mode 100644 index 00000000000000..9dc7f4c7ef448d --- /dev/null +++ b/data_model/in_progress/clusters/DiagnosticLogsCluster.xml @@ -0,0 +1,136 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/DiagnosticsEthernet.xml b/data_model/in_progress/clusters/DiagnosticsEthernet.xml new file mode 100644 index 00000000000000..f000669f64156c --- /dev/null +++ b/data_model/in_progress/clusters/DiagnosticsEthernet.xml @@ -0,0 +1,178 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/DiagnosticsGeneral.xml b/data_model/in_progress/clusters/DiagnosticsGeneral.xml new file mode 100644 index 00000000000000..1266705ba6d0dc --- /dev/null +++ b/data_model/in_progress/clusters/DiagnosticsGeneral.xml @@ -0,0 +1,373 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/DiagnosticsSoftware.xml b/data_model/in_progress/clusters/DiagnosticsSoftware.xml new file mode 100644 index 00000000000000..55e865af040763 --- /dev/null +++ b/data_model/in_progress/clusters/DiagnosticsSoftware.xml @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/DiagnosticsThread.xml b/data_model/in_progress/clusters/DiagnosticsThread.xml new file mode 100644 index 00000000000000..a55412d7fd3eff --- /dev/null +++ b/data_model/in_progress/clusters/DiagnosticsThread.xml @@ -0,0 +1,711 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/DiagnosticsWiFi.xml b/data_model/in_progress/clusters/DiagnosticsWiFi.xml new file mode 100644 index 00000000000000..87f7e44dc92b55 --- /dev/null +++ b/data_model/in_progress/clusters/DiagnosticsWiFi.xml @@ -0,0 +1,260 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/DishwasherAlarm.xml b/data_model/in_progress/clusters/DishwasherAlarm.xml new file mode 100644 index 00000000000000..bdc399f9399486 --- /dev/null +++ b/data_model/in_progress/clusters/DishwasherAlarm.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/DoorLock.xml b/data_model/in_progress/clusters/DoorLock.xml new file mode 100644 index 00000000000000..46d659da94a690 --- /dev/null +++ b/data_model/in_progress/clusters/DoorLock.xml @@ -0,0 +1,2020 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ElectricalEnergyMeasurement.xml b/data_model/in_progress/clusters/ElectricalEnergyMeasurement.xml new file mode 100644 index 00000000000000..259f9f512aec02 --- /dev/null +++ b/data_model/in_progress/clusters/ElectricalEnergyMeasurement.xml @@ -0,0 +1,224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ElectricalPowerMeasurement.xml b/data_model/in_progress/clusters/ElectricalPowerMeasurement.xml new file mode 100644 index 00000000000000..5953d36b9d992e --- /dev/null +++ b/data_model/in_progress/clusters/ElectricalPowerMeasurement.xml @@ -0,0 +1,317 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/EnergyCalendar.xml b/data_model/in_progress/clusters/EnergyCalendar.xml new file mode 100644 index 00000000000000..2ba93203618609 --- /dev/null +++ b/data_model/in_progress/clusters/EnergyCalendar.xml @@ -0,0 +1,287 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/EnergyEVSE.xml b/data_model/in_progress/clusters/EnergyEVSE.xml new file mode 100644 index 00000000000000..a4c865c3096a60 --- /dev/null +++ b/data_model/in_progress/clusters/EnergyEVSE.xml @@ -0,0 +1,599 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/EnergyPreference.xml b/data_model/in_progress/clusters/EnergyPreference.xml new file mode 100644 index 00000000000000..2534ccfc8474c6 --- /dev/null +++ b/data_model/in_progress/clusters/EnergyPreference.xml @@ -0,0 +1,146 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/FanControl.xml b/data_model/in_progress/clusters/FanControl.xml new file mode 100644 index 00000000000000..ec05b6f74e069d --- /dev/null +++ b/data_model/in_progress/clusters/FanControl.xml @@ -0,0 +1,298 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/FlowMeasurement.xml b/data_model/in_progress/clusters/FlowMeasurement.xml new file mode 100644 index 00000000000000..7ee97f586e708a --- /dev/null +++ b/data_model/in_progress/clusters/FlowMeasurement.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/GeneralCommissioningCluster.xml b/data_model/in_progress/clusters/GeneralCommissioningCluster.xml new file mode 100644 index 00000000000000..a569fef5d44118 --- /dev/null +++ b/data_model/in_progress/clusters/GeneralCommissioningCluster.xml @@ -0,0 +1,242 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Group-Key-Management-Cluster.xml b/data_model/in_progress/clusters/Group-Key-Management-Cluster.xml new file mode 100644 index 00000000000000..784bdc903ec186 --- /dev/null +++ b/data_model/in_progress/clusters/Group-Key-Management-Cluster.xml @@ -0,0 +1,235 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Groups.xml b/data_model/in_progress/clusters/Groups.xml new file mode 100644 index 00000000000000..214e6c18280afa --- /dev/null +++ b/data_model/in_progress/clusters/Groups.xml @@ -0,0 +1,197 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Humidistat.xml b/data_model/in_progress/clusters/Humidistat.xml new file mode 100644 index 00000000000000..1af54698489d31 --- /dev/null +++ b/data_model/in_progress/clusters/Humidistat.xml @@ -0,0 +1,283 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ICDManagement.xml b/data_model/in_progress/clusters/ICDManagement.xml new file mode 100644 index 00000000000000..830f62fba2a63f --- /dev/null +++ b/data_model/in_progress/clusters/ICDManagement.xml @@ -0,0 +1,279 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Identify.xml b/data_model/in_progress/clusters/Identify.xml new file mode 100644 index 00000000000000..ddc3e33e9d28d3 --- /dev/null +++ b/data_model/in_progress/clusters/Identify.xml @@ -0,0 +1,154 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/IlluminanceMeasurement.xml b/data_model/in_progress/clusters/IlluminanceMeasurement.xml new file mode 100644 index 00000000000000..d7cb9a993d0e4e --- /dev/null +++ b/data_model/in_progress/clusters/IlluminanceMeasurement.xml @@ -0,0 +1,114 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/JointFabricDatastoreCluster.xml b/data_model/in_progress/clusters/JointFabricDatastoreCluster.xml new file mode 100644 index 00000000000000..137edd2857f74d --- /dev/null +++ b/data_model/in_progress/clusters/JointFabricDatastoreCluster.xml @@ -0,0 +1,516 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/JointFabricPKICluster.xml b/data_model/in_progress/clusters/JointFabricPKICluster.xml new file mode 100644 index 00000000000000..847d2548e3b1f1 --- /dev/null +++ b/data_model/in_progress/clusters/JointFabricPKICluster.xml @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/KeypadInput.xml b/data_model/in_progress/clusters/KeypadInput.xml new file mode 100644 index 00000000000000..efeb92ba28fb73 --- /dev/null +++ b/data_model/in_progress/clusters/KeypadInput.xml @@ -0,0 +1,367 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Label-Cluster-FixedLabelCluster.xml b/data_model/in_progress/clusters/Label-Cluster-FixedLabelCluster.xml new file mode 100644 index 00000000000000..a172d1e281eff5 --- /dev/null +++ b/data_model/in_progress/clusters/Label-Cluster-FixedLabelCluster.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Label-Cluster-LabelCluster.xml b/data_model/in_progress/clusters/Label-Cluster-LabelCluster.xml new file mode 100644 index 00000000000000..2f8a371f74042c --- /dev/null +++ b/data_model/in_progress/clusters/Label-Cluster-LabelCluster.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Label-Cluster-UserLabelCluster.xml b/data_model/in_progress/clusters/Label-Cluster-UserLabelCluster.xml new file mode 100644 index 00000000000000..466550f12520f1 --- /dev/null +++ b/data_model/in_progress/clusters/Label-Cluster-UserLabelCluster.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/LaundryDryerControls.xml b/data_model/in_progress/clusters/LaundryDryerControls.xml new file mode 100644 index 00000000000000..85f7871b267be5 --- /dev/null +++ b/data_model/in_progress/clusters/LaundryDryerControls.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/LaundryWasherControls.xml b/data_model/in_progress/clusters/LaundryWasherControls.xml new file mode 100644 index 00000000000000..046ecc3c51d697 --- /dev/null +++ b/data_model/in_progress/clusters/LaundryWasherControls.xml @@ -0,0 +1,134 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/LevelControl.xml b/data_model/in_progress/clusters/LevelControl.xml new file mode 100644 index 00000000000000..de342812287b0f --- /dev/null +++ b/data_model/in_progress/clusters/LevelControl.xml @@ -0,0 +1,318 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/LocalizationConfiguration.xml b/data_model/in_progress/clusters/LocalizationConfiguration.xml new file mode 100644 index 00000000000000..6bc3abd50600ab --- /dev/null +++ b/data_model/in_progress/clusters/LocalizationConfiguration.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/LocalizationTimeFormat.xml b/data_model/in_progress/clusters/LocalizationTimeFormat.xml new file mode 100644 index 00000000000000..2de3724879701d --- /dev/null +++ b/data_model/in_progress/clusters/LocalizationTimeFormat.xml @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/LocalizationUnit.xml b/data_model/in_progress/clusters/LocalizationUnit.xml new file mode 100644 index 00000000000000..e08ce0e8810f26 --- /dev/null +++ b/data_model/in_progress/clusters/LocalizationUnit.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/LowPower.xml b/data_model/in_progress/clusters/LowPower.xml new file mode 100644 index 00000000000000..2e91a02c16a4b3 --- /dev/null +++ b/data_model/in_progress/clusters/LowPower.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/MediaInput.xml b/data_model/in_progress/clusters/MediaInput.xml new file mode 100644 index 00000000000000..c01567f6e1ae3e --- /dev/null +++ b/data_model/in_progress/clusters/MediaInput.xml @@ -0,0 +1,168 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/MediaPlayback.xml b/data_model/in_progress/clusters/MediaPlayback.xml new file mode 100644 index 00000000000000..e37d5944aeb366 --- /dev/null +++ b/data_model/in_progress/clusters/MediaPlayback.xml @@ -0,0 +1,475 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Messages.xml b/data_model/in_progress/clusters/Messages.xml new file mode 100644 index 00000000000000..d2dbd28ba87f81 --- /dev/null +++ b/data_model/in_progress/clusters/Messages.xml @@ -0,0 +1,333 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/MicrowaveOvenControl.xml b/data_model/in_progress/clusters/MicrowaveOvenControl.xml new file mode 100644 index 00000000000000..2169f7b1437945 --- /dev/null +++ b/data_model/in_progress/clusters/MicrowaveOvenControl.xml @@ -0,0 +1,192 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ModeBase.xml b/data_model/in_progress/clusters/ModeBase.xml new file mode 100644 index 00000000000000..c874eee69d3eb6 --- /dev/null +++ b/data_model/in_progress/clusters/ModeBase.xml @@ -0,0 +1,158 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ModeSelect.xml b/data_model/in_progress/clusters/ModeSelect.xml new file mode 100644 index 00000000000000..6e6f062182e503 --- /dev/null +++ b/data_model/in_progress/clusters/ModeSelect.xml @@ -0,0 +1,148 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Mode_DeviceEnergyManagement.xml b/data_model/in_progress/clusters/Mode_DeviceEnergyManagement.xml new file mode 100644 index 00000000000000..48cf6df4955a15 --- /dev/null +++ b/data_model/in_progress/clusters/Mode_DeviceEnergyManagement.xml @@ -0,0 +1,104 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Mode_Dishwasher.xml b/data_model/in_progress/clusters/Mode_Dishwasher.xml new file mode 100644 index 00000000000000..1c3a99b9e3d245 --- /dev/null +++ b/data_model/in_progress/clusters/Mode_Dishwasher.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Mode_EVSE.xml b/data_model/in_progress/clusters/Mode_EVSE.xml new file mode 100644 index 00000000000000..025e9de9884c89 --- /dev/null +++ b/data_model/in_progress/clusters/Mode_EVSE.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Mode_LaundryWasher.xml b/data_model/in_progress/clusters/Mode_LaundryWasher.xml new file mode 100644 index 00000000000000..b5f557a4b46a4b --- /dev/null +++ b/data_model/in_progress/clusters/Mode_LaundryWasher.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Mode_MicrowaveOven.xml b/data_model/in_progress/clusters/Mode_MicrowaveOven.xml new file mode 100644 index 00000000000000..24d682fecac68b --- /dev/null +++ b/data_model/in_progress/clusters/Mode_MicrowaveOven.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Mode_Oven.xml b/data_model/in_progress/clusters/Mode_Oven.xml new file mode 100644 index 00000000000000..a3e3323fe98777 --- /dev/null +++ b/data_model/in_progress/clusters/Mode_Oven.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Mode_RVCClean.xml b/data_model/in_progress/clusters/Mode_RVCClean.xml new file mode 100644 index 00000000000000..b73a4a5361d81f --- /dev/null +++ b/data_model/in_progress/clusters/Mode_RVCClean.xml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Mode_RVCRun.xml b/data_model/in_progress/clusters/Mode_RVCRun.xml new file mode 100644 index 00000000000000..c65bc3850473bd --- /dev/null +++ b/data_model/in_progress/clusters/Mode_RVCRun.xml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Mode_Refrigerator.xml b/data_model/in_progress/clusters/Mode_Refrigerator.xml new file mode 100644 index 00000000000000..2728ac0f42b8fb --- /dev/null +++ b/data_model/in_progress/clusters/Mode_Refrigerator.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Mode_WaterHeater.xml b/data_model/in_progress/clusters/Mode_WaterHeater.xml new file mode 100644 index 00000000000000..cc9c96e484bce2 --- /dev/null +++ b/data_model/in_progress/clusters/Mode_WaterHeater.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/NetworkCommissioningCluster.xml b/data_model/in_progress/clusters/NetworkCommissioningCluster.xml new file mode 100644 index 00000000000000..1a511ed18fda3a --- /dev/null +++ b/data_model/in_progress/clusters/NetworkCommissioningCluster.xml @@ -0,0 +1,513 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/OTAProvider.xml b/data_model/in_progress/clusters/OTAProvider.xml new file mode 100644 index 00000000000000..f300a419518675 --- /dev/null +++ b/data_model/in_progress/clusters/OTAProvider.xml @@ -0,0 +1,203 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/OTARequestor.xml b/data_model/in_progress/clusters/OTARequestor.xml new file mode 100644 index 00000000000000..ea7ec03c717fd3 --- /dev/null +++ b/data_model/in_progress/clusters/OTARequestor.xml @@ -0,0 +1,228 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/OccupancySensing.xml b/data_model/in_progress/clusters/OccupancySensing.xml new file mode 100644 index 00000000000000..7ca0d3631dbe05 --- /dev/null +++ b/data_model/in_progress/clusters/OccupancySensing.xml @@ -0,0 +1,430 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/OnOff.xml b/data_model/in_progress/clusters/OnOff.xml new file mode 100644 index 00000000000000..b1ea6ebba4af7d --- /dev/null +++ b/data_model/in_progress/clusters/OnOff.xml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/OperationalCredentialCluster.xml b/data_model/in_progress/clusters/OperationalCredentialCluster.xml new file mode 100644 index 00000000000000..338a8af007c5b9 --- /dev/null +++ b/data_model/in_progress/clusters/OperationalCredentialCluster.xml @@ -0,0 +1,325 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/OperationalState.xml b/data_model/in_progress/clusters/OperationalState.xml new file mode 100644 index 00000000000000..354efa2400bda7 --- /dev/null +++ b/data_model/in_progress/clusters/OperationalState.xml @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/OperationalState_Oven.xml b/data_model/in_progress/clusters/OperationalState_Oven.xml new file mode 100644 index 00000000000000..710dea9806bf57 --- /dev/null +++ b/data_model/in_progress/clusters/OperationalState_Oven.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/OperationalState_RVC.xml b/data_model/in_progress/clusters/OperationalState_RVC.xml new file mode 100644 index 00000000000000..9b83bc4dfde257 --- /dev/null +++ b/data_model/in_progress/clusters/OperationalState_RVC.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/PowerSourceCluster.xml b/data_model/in_progress/clusters/PowerSourceCluster.xml new file mode 100644 index 00000000000000..a0b6b91c565dd8 --- /dev/null +++ b/data_model/in_progress/clusters/PowerSourceCluster.xml @@ -0,0 +1,830 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/PowerSourceConfigurationCluster.xml b/data_model/in_progress/clusters/PowerSourceConfigurationCluster.xml new file mode 100644 index 00000000000000..61df60149ca00f --- /dev/null +++ b/data_model/in_progress/clusters/PowerSourceConfigurationCluster.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/PowerTopology.xml b/data_model/in_progress/clusters/PowerTopology.xml new file mode 100644 index 00000000000000..eb0a2d74f5e585 --- /dev/null +++ b/data_model/in_progress/clusters/PowerTopology.xml @@ -0,0 +1,102 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/PressureMeasurement.xml b/data_model/in_progress/clusters/PressureMeasurement.xml new file mode 100644 index 00000000000000..09b9577cc84585 --- /dev/null +++ b/data_model/in_progress/clusters/PressureMeasurement.xml @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ProxyConfiguration-Cluster.xml b/data_model/in_progress/clusters/ProxyConfiguration-Cluster.xml new file mode 100644 index 00000000000000..6796e79ac9bf59 --- /dev/null +++ b/data_model/in_progress/clusters/ProxyConfiguration-Cluster.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ProxyDiscovery-Cluster.xml b/data_model/in_progress/clusters/ProxyDiscovery-Cluster.xml new file mode 100644 index 00000000000000..7353386929c109 --- /dev/null +++ b/data_model/in_progress/clusters/ProxyDiscovery-Cluster.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/PumpConfigurationControl.xml b/data_model/in_progress/clusters/PumpConfigurationControl.xml new file mode 100644 index 00000000000000..9b7e4ab56dc5c2 --- /dev/null +++ b/data_model/in_progress/clusters/PumpConfigurationControl.xml @@ -0,0 +1,453 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/RefrigeratorAlarm.xml b/data_model/in_progress/clusters/RefrigeratorAlarm.xml new file mode 100644 index 00000000000000..a3a75011813cd1 --- /dev/null +++ b/data_model/in_progress/clusters/RefrigeratorAlarm.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ResourceMonitoring.xml b/data_model/in_progress/clusters/ResourceMonitoring.xml new file mode 100644 index 00000000000000..911ad11373b948 --- /dev/null +++ b/data_model/in_progress/clusters/ResourceMonitoring.xml @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Scenes.xml b/data_model/in_progress/clusters/Scenes.xml new file mode 100644 index 00000000000000..1479d3ffd7de86 --- /dev/null +++ b/data_model/in_progress/clusters/Scenes.xml @@ -0,0 +1,403 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ServiceArea.xml b/data_model/in_progress/clusters/ServiceArea.xml new file mode 100644 index 00000000000000..2533d4b549d2f0 --- /dev/null +++ b/data_model/in_progress/clusters/ServiceArea.xml @@ -0,0 +1,238 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/SmokeCOAlarm.xml b/data_model/in_progress/clusters/SmokeCOAlarm.xml new file mode 100644 index 00000000000000..482a8a82f2abf5 --- /dev/null +++ b/data_model/in_progress/clusters/SmokeCOAlarm.xml @@ -0,0 +1,308 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Switch.xml b/data_model/in_progress/clusters/Switch.xml new file mode 100644 index 00000000000000..8662d262f0b50e --- /dev/null +++ b/data_model/in_progress/clusters/Switch.xml @@ -0,0 +1,223 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/TargetNavigator.xml b/data_model/in_progress/clusters/TargetNavigator.xml new file mode 100644 index 00000000000000..b1fcff6d60cd1e --- /dev/null +++ b/data_model/in_progress/clusters/TargetNavigator.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/TemperatureControl.xml b/data_model/in_progress/clusters/TemperatureControl.xml new file mode 100644 index 00000000000000..511761b24b9e89 --- /dev/null +++ b/data_model/in_progress/clusters/TemperatureControl.xml @@ -0,0 +1,147 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/TemperatureMeasurement.xml b/data_model/in_progress/clusters/TemperatureMeasurement.xml new file mode 100644 index 00000000000000..5c1df46ccbf115 --- /dev/null +++ b/data_model/in_progress/clusters/TemperatureMeasurement.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Thermostat.xml b/data_model/in_progress/clusters/Thermostat.xml new file mode 100644 index 00000000000000..6c5584e087d47c --- /dev/null +++ b/data_model/in_progress/clusters/Thermostat.xml @@ -0,0 +1,1224 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ThermostatUserInterfaceConfiguration.xml b/data_model/in_progress/clusters/ThermostatUserInterfaceConfiguration.xml new file mode 100644 index 00000000000000..d6a52248282321 --- /dev/null +++ b/data_model/in_progress/clusters/ThermostatUserInterfaceConfiguration.xml @@ -0,0 +1,122 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ThreadBorderRouterManagement.xml b/data_model/in_progress/clusters/ThreadBorderRouterManagement.xml new file mode 100644 index 00000000000000..7ae4edab62f8b3 --- /dev/null +++ b/data_model/in_progress/clusters/ThreadBorderRouterManagement.xml @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ThreadNetworkDirectory.xml b/data_model/in_progress/clusters/ThreadNetworkDirectory.xml new file mode 100644 index 00000000000000..e5112991e6ff06 --- /dev/null +++ b/data_model/in_progress/clusters/ThreadNetworkDirectory.xml @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/TimeSync.xml b/data_model/in_progress/clusters/TimeSync.xml new file mode 100644 index 00000000000000..e72a9d32467983 --- /dev/null +++ b/data_model/in_progress/clusters/TimeSync.xml @@ -0,0 +1,411 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ValidProxies-Cluster.xml b/data_model/in_progress/clusters/ValidProxies-Cluster.xml new file mode 100644 index 00000000000000..51cfeedb46926d --- /dev/null +++ b/data_model/in_progress/clusters/ValidProxies-Cluster.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/ValveConfigurationControl.xml b/data_model/in_progress/clusters/ValveConfigurationControl.xml new file mode 100644 index 00000000000000..6f38375a1a31c6 --- /dev/null +++ b/data_model/in_progress/clusters/ValveConfigurationControl.xml @@ -0,0 +1,220 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/WakeOnLAN.xml b/data_model/in_progress/clusters/WakeOnLAN.xml new file mode 100644 index 00000000000000..092e0a8ea8f4de --- /dev/null +++ b/data_model/in_progress/clusters/WakeOnLAN.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/WaterContentMeasurement.xml b/data_model/in_progress/clusters/WaterContentMeasurement.xml new file mode 100644 index 00000000000000..b613bf4e1522fb --- /dev/null +++ b/data_model/in_progress/clusters/WaterContentMeasurement.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/WaterHeaterManagement.xml b/data_model/in_progress/clusters/WaterHeaterManagement.xml new file mode 100644 index 00000000000000..96dcc2b112461b --- /dev/null +++ b/data_model/in_progress/clusters/WaterHeaterManagement.xml @@ -0,0 +1,193 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/WiFiNetworkManagement.xml b/data_model/in_progress/clusters/WiFiNetworkManagement.xml new file mode 100644 index 00000000000000..3aad5935d2843d --- /dev/null +++ b/data_model/in_progress/clusters/WiFiNetworkManagement.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/WindowCovering.xml b/data_model/in_progress/clusters/WindowCovering.xml new file mode 100644 index 00000000000000..09133513af736a --- /dev/null +++ b/data_model/in_progress/clusters/WindowCovering.xml @@ -0,0 +1,691 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/bridge-clusters-ActionsCluster.xml b/data_model/in_progress/clusters/bridge-clusters-ActionsCluster.xml new file mode 100644 index 00000000000000..4874aca26bc504 --- /dev/null +++ b/data_model/in_progress/clusters/bridge-clusters-ActionsCluster.xml @@ -0,0 +1,380 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml b/data_model/in_progress/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml new file mode 100644 index 00000000000000..62633f55cf08cc --- /dev/null +++ b/data_model/in_progress/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml @@ -0,0 +1,194 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/bridge-clusters-EcosystemInformationCluster.xml b/data_model/in_progress/clusters/bridge-clusters-EcosystemInformationCluster.xml new file mode 100644 index 00000000000000..ddebe95679370e --- /dev/null +++ b/data_model/in_progress/clusters/bridge-clusters-EcosystemInformationCluster.xml @@ -0,0 +1,137 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/cluster_ids.json b/data_model/in_progress/clusters/cluster_ids.json new file mode 100644 index 00000000000000..9de2f243b377d6 --- /dev/null +++ b/data_model/in_progress/clusters/cluster_ids.json @@ -0,0 +1,124 @@ +{ + "3": "Identify", + "4": "Groups", + "6": "On/Off", + "8": "Level Control", + "29": "Descriptor", + "30": "Binding", + "31": "AccessControl", + "37": "Actions", + "40": "Basic Information", + "41": "OTA Software Update Provider", + "42": "OTA Software Update Requestor", + "43": "Localization Configuration", + "44": "Time Format Localization", + "45": "Unit Localization", + "46": "Power Source Configuration", + "47": "Power Source", + "48": "General Commissioning", + "49": "Network Commissioning", + "50": "Diagnostic Logs", + "51": "General Diagnostics", + "52": "Software Diagnostics", + "53": "Thread Network Diagnostics", + "54": "Wi-Fi Network Diagnostics", + "55": "Ethernet Network Diagnostics", + "56": "Time Synchronization", + "57": "Bridged Device Basic Information", + "59": "Switch", + "60": "Administrator Commissioning", + "62": "Operational Credentials", + "63": "GroupKeyManagement", + "64": "Fixed Label", + "65": "User Label", + "66": "ProxyConfiguration", + "67": "ProxyDiscovery", + "68": "ValidProxies", + "69": "Boolean State", + "70": "ICDManagement", + "72": "Oven Cavity Operational State", + "73": "Oven Mode", + "74": "Laundry Dryer Controls", + "80": "Mode Select", + "81": "Laundry Washer Mode", + "82": "Refrigerator And Temperature Controlled Cabinet Mode", + "83": "Laundry Washer Controls", + "84": "RVC Run Mode", + "85": "RVC Clean Mode", + "86": "Temperature Control", + "87": "Refrigerator Alarm", + "89": "Dishwasher Mode", + "91": "Air Quality", + "92": "Smoke CO Alarm", + "93": "Dishwasher Alarm", + "94": "Microwave Oven Mode", + "95": "Microwave Oven Control", + "96": "Operational State", + "97": "RVC Operational State", + "98": "Scenes Management", + "113": "HEPA Filter Monitoring", + "114": "Activated Carbon Filter Monitoring", + "121": "Water Tank Level Monitoring", + "128": "Boolean State Configuration", + "129": "Valve Configuration and Control", + "144": "Electrical Power Measurement", + "145": "Electrical Energy Measurement", + "148": "Water Heater Management", + "150": "Demand Response Load Control", + "151": "Messages", + "152": "Device Energy Management", + "153": "Energy EVSE", + "154": "Energy Calendar", + "155": "Energy Preference", + "156": "Power Topology", + "157": "Energy EVSE Mode", + "158": "Water Heater Mode", + "159": "Device Energy Management Mode", + "257": "Door Lock", + "258": "Window Covering", + "336": "Service Area", + "512": "Pump Configuration and Control", + "513": "Thermostat", + "514": "Fan Control", + "516": "Thermostat User Interface Configuration", + "517": "Humidistat", + "768": "Color Control", + "769": "Ballast Configuration", + "1024": "Illuminance Measurement", + "1026": "Temperature Measurement", + "1027": "Pressure Measurement", + "1028": "Flow Measurement", + "1029": "Relative Humidity Measurement", + "1030": "Occupancy Sensing", + "1036": "Carbon Monoxide Concentration Measurement", + "1037": "Carbon Dioxide Concentration Measurement", + "1043": "Nitrogen Dioxide Concentration Measurement", + "1045": "Ozone Concentration Measurement", + "1066": "PM2.5 Concentration Measurement", + "1067": "Formaldehyde Concentration Measurement", + "1068": "PM1 Concentration Measurement", + "1069": "PM10 Concentration Measurement", + "1070": "Total Volatile Organic Compounds Concentration Measurement", + "1071": "Radon Concentration Measurement", + "1105": "Wi-Fi Network Management", + "1106": "Thread Border Router Management", + "1107": "Thread Network Directory", + "1283": "Wake on LAN", + "1284": "Channel", + "1285": "Target Navigator", + "1286": "Media Playback", + "1287": "Media Input", + "1288": "Low Power", + "1289": "Keypad Input", + "1290": "Content Launcher", + "1291": "Audio Output", + "1292": "Application Launcher", + "1293": "Application Basic", + "1294": "Account Login", + "1295": "Content Control", + "1296": "Content App Observer", + "1872": "Ecosystem Information", + "1873": "Commissioner Control", + "1874": "Joint Fabric Datastore Cluster", + "1875": "Joint Fabric PKI" +} diff --git a/data_model/in_progress/device_types/Aggregator.xml b/data_model/in_progress/device_types/Aggregator.xml new file mode 100644 index 00000000000000..a99ee1108c3b50 --- /dev/null +++ b/data_model/in_progress/device_types/Aggregator.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/AirPurifier.xml b/data_model/in_progress/device_types/AirPurifier.xml new file mode 100644 index 00000000000000..62045f090c71a5 --- /dev/null +++ b/data_model/in_progress/device_types/AirPurifier.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/AirQualitySensor.xml b/data_model/in_progress/device_types/AirQualitySensor.xml new file mode 100644 index 00000000000000..756b42e437ac9a --- /dev/null +++ b/data_model/in_progress/device_types/AirQualitySensor.xml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/BaseDeviceType.xml b/data_model/in_progress/device_types/BaseDeviceType.xml new file mode 100644 index 00000000000000..272b74feb5ff67 --- /dev/null +++ b/data_model/in_progress/device_types/BaseDeviceType.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/BasicVideoPlayer.xml b/data_model/in_progress/device_types/BasicVideoPlayer.xml new file mode 100644 index 00000000000000..d35bbed3211422 --- /dev/null +++ b/data_model/in_progress/device_types/BasicVideoPlayer.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/BatteryStorage.xml b/data_model/in_progress/device_types/BatteryStorage.xml new file mode 100644 index 00000000000000..5f09eeb1d2dac9 --- /dev/null +++ b/data_model/in_progress/device_types/BatteryStorage.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/BridgedNode.xml b/data_model/in_progress/device_types/BridgedNode.xml new file mode 100644 index 00000000000000..6f309001975627 --- /dev/null +++ b/data_model/in_progress/device_types/BridgedNode.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/CastingVideoClient.xml b/data_model/in_progress/device_types/CastingVideoClient.xml new file mode 100644 index 00000000000000..949142a6bca151 --- /dev/null +++ b/data_model/in_progress/device_types/CastingVideoClient.xml @@ -0,0 +1,121 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/CastingVideoPlayer.xml b/data_model/in_progress/device_types/CastingVideoPlayer.xml new file mode 100644 index 00000000000000..5c88cf92947e0b --- /dev/null +++ b/data_model/in_progress/device_types/CastingVideoPlayer.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/ColorDimmerSwitch.xml b/data_model/in_progress/device_types/ColorDimmerSwitch.xml new file mode 100644 index 00000000000000..abc027eaec711c --- /dev/null +++ b/data_model/in_progress/device_types/ColorDimmerSwitch.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/ColorTemperatureLight.xml b/data_model/in_progress/device_types/ColorTemperatureLight.xml new file mode 100644 index 00000000000000..56db5416cf02c9 --- /dev/null +++ b/data_model/in_progress/device_types/ColorTemperatureLight.xml @@ -0,0 +1,140 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/ContactSensor.xml b/data_model/in_progress/device_types/ContactSensor.xml new file mode 100644 index 00000000000000..2767e5e37a384b --- /dev/null +++ b/data_model/in_progress/device_types/ContactSensor.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/ContentApp.xml b/data_model/in_progress/device_types/ContentApp.xml new file mode 100644 index 00000000000000..81b967db9c8dc1 --- /dev/null +++ b/data_model/in_progress/device_types/ContentApp.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/ControlBridge.xml b/data_model/in_progress/device_types/ControlBridge.xml new file mode 100644 index 00000000000000..ab07228e728f52 --- /dev/null +++ b/data_model/in_progress/device_types/ControlBridge.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/CookSurface.xml b/data_model/in_progress/device_types/CookSurface.xml new file mode 100644 index 00000000000000..3a0e8f062c7495 --- /dev/null +++ b/data_model/in_progress/device_types/CookSurface.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/Cooktop.xml b/data_model/in_progress/device_types/Cooktop.xml new file mode 100644 index 00000000000000..9164641c06f2c1 --- /dev/null +++ b/data_model/in_progress/device_types/Cooktop.xml @@ -0,0 +1,77 @@ + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/DeviceEnergyManagement.xml b/data_model/in_progress/device_types/DeviceEnergyManagement.xml new file mode 100644 index 00000000000000..86efccc02f6b2d --- /dev/null +++ b/data_model/in_progress/device_types/DeviceEnergyManagement.xml @@ -0,0 +1,88 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/DimmableLight.xml b/data_model/in_progress/device_types/DimmableLight.xml new file mode 100644 index 00000000000000..4d6c53e4ae36fd --- /dev/null +++ b/data_model/in_progress/device_types/DimmableLight.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/DimmablePlug-InUnit.xml b/data_model/in_progress/device_types/DimmablePlug-InUnit.xml new file mode 100644 index 00000000000000..73fd2a37c48bab --- /dev/null +++ b/data_model/in_progress/device_types/DimmablePlug-InUnit.xml @@ -0,0 +1,127 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/DimmerSwitch.xml b/data_model/in_progress/device_types/DimmerSwitch.xml new file mode 100644 index 00000000000000..9dce28fdd7ce71 --- /dev/null +++ b/data_model/in_progress/device_types/DimmerSwitch.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/Dishwasher.xml b/data_model/in_progress/device_types/Dishwasher.xml new file mode 100644 index 00000000000000..b13f9a42ebcc49 --- /dev/null +++ b/data_model/in_progress/device_types/Dishwasher.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/DoorLock.xml b/data_model/in_progress/device_types/DoorLock.xml new file mode 100644 index 00000000000000..e2eb1e9152085d --- /dev/null +++ b/data_model/in_progress/device_types/DoorLock.xml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/DoorLockController.xml b/data_model/in_progress/device_types/DoorLockController.xml new file mode 100644 index 00000000000000..40749d77b3c783 --- /dev/null +++ b/data_model/in_progress/device_types/DoorLockController.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/EVSE.xml b/data_model/in_progress/device_types/EVSE.xml new file mode 100644 index 00000000000000..d468cb8a180f22 --- /dev/null +++ b/data_model/in_progress/device_types/EVSE.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/ElectricalSensor.xml b/data_model/in_progress/device_types/ElectricalSensor.xml new file mode 100644 index 00000000000000..75c4b0bb7cbbed --- /dev/null +++ b/data_model/in_progress/device_types/ElectricalSensor.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/EnergyTariff.xml b/data_model/in_progress/device_types/EnergyTariff.xml new file mode 100644 index 00000000000000..887bfa420d8fd8 --- /dev/null +++ b/data_model/in_progress/device_types/EnergyTariff.xml @@ -0,0 +1,64 @@ + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/EnergyTariffCalendar.xml b/data_model/in_progress/device_types/EnergyTariffCalendar.xml new file mode 100644 index 00000000000000..70d74b7239f41c --- /dev/null +++ b/data_model/in_progress/device_types/EnergyTariffCalendar.xml @@ -0,0 +1,64 @@ + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/ExtendedColorLight.xml b/data_model/in_progress/device_types/ExtendedColorLight.xml new file mode 100644 index 00000000000000..0678094669459f --- /dev/null +++ b/data_model/in_progress/device_types/ExtendedColorLight.xml @@ -0,0 +1,152 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/ExtractorHood.xml b/data_model/in_progress/device_types/ExtractorHood.xml new file mode 100644 index 00000000000000..3e8064adb149f4 --- /dev/null +++ b/data_model/in_progress/device_types/ExtractorHood.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/Fan.xml b/data_model/in_progress/device_types/Fan.xml new file mode 100644 index 00000000000000..e5184cfe22aec7 --- /dev/null +++ b/data_model/in_progress/device_types/Fan.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/FlowSensor.xml b/data_model/in_progress/device_types/FlowSensor.xml new file mode 100644 index 00000000000000..6a9023060e12f9 --- /dev/null +++ b/data_model/in_progress/device_types/FlowSensor.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/GenericSwitch.xml b/data_model/in_progress/device_types/GenericSwitch.xml new file mode 100644 index 00000000000000..b8bc394b96e2e8 --- /dev/null +++ b/data_model/in_progress/device_types/GenericSwitch.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/HeatPump.xml b/data_model/in_progress/device_types/HeatPump.xml new file mode 100644 index 00000000000000..61f556c6ed2a9b --- /dev/null +++ b/data_model/in_progress/device_types/HeatPump.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/HumidifierDehumidifier.xml b/data_model/in_progress/device_types/HumidifierDehumidifier.xml new file mode 100644 index 00000000000000..973919635fb4ae --- /dev/null +++ b/data_model/in_progress/device_types/HumidifierDehumidifier.xml @@ -0,0 +1,63 @@ + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/HumiditySensor.xml b/data_model/in_progress/device_types/HumiditySensor.xml new file mode 100644 index 00000000000000..c6def400a2a6bb --- /dev/null +++ b/data_model/in_progress/device_types/HumiditySensor.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/JointFabricAdmin.xml b/data_model/in_progress/device_types/JointFabricAdmin.xml new file mode 100644 index 00000000000000..6c63dc9bdd96a1 --- /dev/null +++ b/data_model/in_progress/device_types/JointFabricAdmin.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/LaundryDryer.xml b/data_model/in_progress/device_types/LaundryDryer.xml new file mode 100644 index 00000000000000..36dc182c393bd7 --- /dev/null +++ b/data_model/in_progress/device_types/LaundryDryer.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/LaundryWasher.xml b/data_model/in_progress/device_types/LaundryWasher.xml new file mode 100644 index 00000000000000..d88ee7e9fd94ca --- /dev/null +++ b/data_model/in_progress/device_types/LaundryWasher.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/LightSensor.xml b/data_model/in_progress/device_types/LightSensor.xml new file mode 100644 index 00000000000000..e7200e347726aa --- /dev/null +++ b/data_model/in_progress/device_types/LightSensor.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/MicrowaveOven.xml b/data_model/in_progress/device_types/MicrowaveOven.xml new file mode 100644 index 00000000000000..98d2902d049610 --- /dev/null +++ b/data_model/in_progress/device_types/MicrowaveOven.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/ModeSelectDeviceType.xml b/data_model/in_progress/device_types/ModeSelectDeviceType.xml new file mode 100644 index 00000000000000..ad4cf56671243b --- /dev/null +++ b/data_model/in_progress/device_types/ModeSelectDeviceType.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/MountedDimmableLoadControl.xml b/data_model/in_progress/device_types/MountedDimmableLoadControl.xml new file mode 100644 index 00000000000000..d0cee6e5ef37cd --- /dev/null +++ b/data_model/in_progress/device_types/MountedDimmableLoadControl.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/MountedOnOffControl.xml b/data_model/in_progress/device_types/MountedOnOffControl.xml new file mode 100644 index 00000000000000..09628bb4e0e9f0 --- /dev/null +++ b/data_model/in_progress/device_types/MountedOnOffControl.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/NetworkInfraIntro.xml b/data_model/in_progress/device_types/NetworkInfraIntro.xml new file mode 100644 index 00000000000000..e5bc56b1f095ac --- /dev/null +++ b/data_model/in_progress/device_types/NetworkInfraIntro.xml @@ -0,0 +1,58 @@ + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/NetworkInfraManager.xml b/data_model/in_progress/device_types/NetworkInfraManager.xml new file mode 100644 index 00000000000000..58cbae2e7ab440 --- /dev/null +++ b/data_model/in_progress/device_types/NetworkInfraManager.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/OccupancySensor.xml b/data_model/in_progress/device_types/OccupancySensor.xml new file mode 100644 index 00000000000000..f257bab38a7686 --- /dev/null +++ b/data_model/in_progress/device_types/OccupancySensor.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/OnOffLight.xml b/data_model/in_progress/device_types/OnOffLight.xml new file mode 100644 index 00000000000000..c74f5f79000919 --- /dev/null +++ b/data_model/in_progress/device_types/OnOffLight.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/OnOffLightSwitch.xml b/data_model/in_progress/device_types/OnOffLightSwitch.xml new file mode 100644 index 00000000000000..0cfa5ba7a3702c --- /dev/null +++ b/data_model/in_progress/device_types/OnOffLightSwitch.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/OnOffPlug-inUnit.xml b/data_model/in_progress/device_types/OnOffPlug-inUnit.xml new file mode 100644 index 00000000000000..946f7919516e2d --- /dev/null +++ b/data_model/in_progress/device_types/OnOffPlug-inUnit.xml @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/OnOffSensor.xml b/data_model/in_progress/device_types/OnOffSensor.xml new file mode 100644 index 00000000000000..0fc76f8314a6b5 --- /dev/null +++ b/data_model/in_progress/device_types/OnOffSensor.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/OtaProvider.xml b/data_model/in_progress/device_types/OtaProvider.xml new file mode 100644 index 00000000000000..b148d27ebb74e5 --- /dev/null +++ b/data_model/in_progress/device_types/OtaProvider.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/OtaRequestor.xml b/data_model/in_progress/device_types/OtaRequestor.xml new file mode 100644 index 00000000000000..d782ee992c454b --- /dev/null +++ b/data_model/in_progress/device_types/OtaRequestor.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/Oven.xml b/data_model/in_progress/device_types/Oven.xml new file mode 100644 index 00000000000000..d34bc4c52bfbb6 --- /dev/null +++ b/data_model/in_progress/device_types/Oven.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/PowerSource.xml b/data_model/in_progress/device_types/PowerSource.xml new file mode 100644 index 00000000000000..4e6c6defabccf9 --- /dev/null +++ b/data_model/in_progress/device_types/PowerSource.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/PressureSensor.xml b/data_model/in_progress/device_types/PressureSensor.xml new file mode 100644 index 00000000000000..5b7ef86c25cc3d --- /dev/null +++ b/data_model/in_progress/device_types/PressureSensor.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/Pump.xml b/data_model/in_progress/device_types/Pump.xml new file mode 100644 index 00000000000000..a39cd97b87e7ad --- /dev/null +++ b/data_model/in_progress/device_types/Pump.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/PumpController.xml b/data_model/in_progress/device_types/PumpController.xml new file mode 100644 index 00000000000000..25e9a8e982b5ff --- /dev/null +++ b/data_model/in_progress/device_types/PumpController.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/RainSensor.xml b/data_model/in_progress/device_types/RainSensor.xml new file mode 100644 index 00000000000000..a03060c5415dc0 --- /dev/null +++ b/data_model/in_progress/device_types/RainSensor.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/Refrigerator.xml b/data_model/in_progress/device_types/Refrigerator.xml new file mode 100644 index 00000000000000..c8bdf86e3ef737 --- /dev/null +++ b/data_model/in_progress/device_types/Refrigerator.xml @@ -0,0 +1,86 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/RoboticVacuumCleaner.xml b/data_model/in_progress/device_types/RoboticVacuumCleaner.xml new file mode 100644 index 00000000000000..fd30668cd2e084 --- /dev/null +++ b/data_model/in_progress/device_types/RoboticVacuumCleaner.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/RoomAirConditioner.xml b/data_model/in_progress/device_types/RoomAirConditioner.xml new file mode 100644 index 00000000000000..e2b3061a42b515 --- /dev/null +++ b/data_model/in_progress/device_types/RoomAirConditioner.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/RootNodeDeviceType.xml b/data_model/in_progress/device_types/RootNodeDeviceType.xml new file mode 100644 index 00000000000000..c96759503bfb13 --- /dev/null +++ b/data_model/in_progress/device_types/RootNodeDeviceType.xml @@ -0,0 +1,169 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/SecondaryNetworkInterface.xml b/data_model/in_progress/device_types/SecondaryNetworkInterface.xml new file mode 100644 index 00000000000000..8217aea71529d0 --- /dev/null +++ b/data_model/in_progress/device_types/SecondaryNetworkInterface.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/SmokeCOAlarm.xml b/data_model/in_progress/device_types/SmokeCOAlarm.xml new file mode 100644 index 00000000000000..769e6f5f91bbe1 --- /dev/null +++ b/data_model/in_progress/device_types/SmokeCOAlarm.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/SolarPower.xml b/data_model/in_progress/device_types/SolarPower.xml new file mode 100644 index 00000000000000..7556fb519a685d --- /dev/null +++ b/data_model/in_progress/device_types/SolarPower.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/Speaker.xml b/data_model/in_progress/device_types/Speaker.xml new file mode 100644 index 00000000000000..d3f9b1166e4458 --- /dev/null +++ b/data_model/in_progress/device_types/Speaker.xml @@ -0,0 +1,72 @@ + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/TemperatureControlledCabinet.xml b/data_model/in_progress/device_types/TemperatureControlledCabinet.xml new file mode 100644 index 00000000000000..68788e22d7db06 --- /dev/null +++ b/data_model/in_progress/device_types/TemperatureControlledCabinet.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/TemperatureSensor.xml b/data_model/in_progress/device_types/TemperatureSensor.xml new file mode 100644 index 00000000000000..bf3221858dc103 --- /dev/null +++ b/data_model/in_progress/device_types/TemperatureSensor.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/Thermostat.xml b/data_model/in_progress/device_types/Thermostat.xml new file mode 100644 index 00000000000000..dfc55d628a5b6e --- /dev/null +++ b/data_model/in_progress/device_types/Thermostat.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/ThreadBorderRouter.xml b/data_model/in_progress/device_types/ThreadBorderRouter.xml new file mode 100644 index 00000000000000..792f002801b9a0 --- /dev/null +++ b/data_model/in_progress/device_types/ThreadBorderRouter.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/VideoRemoteControl.xml b/data_model/in_progress/device_types/VideoRemoteControl.xml new file mode 100644 index 00000000000000..de83b02508a89f --- /dev/null +++ b/data_model/in_progress/device_types/VideoRemoteControl.xml @@ -0,0 +1,112 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/WaterFreezeDetector.xml b/data_model/in_progress/device_types/WaterFreezeDetector.xml new file mode 100644 index 00000000000000..b2f4a49a7847e4 --- /dev/null +++ b/data_model/in_progress/device_types/WaterFreezeDetector.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/WaterHeater.xml b/data_model/in_progress/device_types/WaterHeater.xml new file mode 100644 index 00000000000000..9d038d89c55563 --- /dev/null +++ b/data_model/in_progress/device_types/WaterHeater.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/WaterLeakDetector.xml b/data_model/in_progress/device_types/WaterLeakDetector.xml new file mode 100644 index 00000000000000..7277ce69908fb6 --- /dev/null +++ b/data_model/in_progress/device_types/WaterLeakDetector.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/WaterValve.xml b/data_model/in_progress/device_types/WaterValve.xml new file mode 100644 index 00000000000000..21b77edf5fc614 --- /dev/null +++ b/data_model/in_progress/device_types/WaterValve.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/WindowCovering.xml b/data_model/in_progress/device_types/WindowCovering.xml new file mode 100644 index 00000000000000..da8780b3c94be4 --- /dev/null +++ b/data_model/in_progress/device_types/WindowCovering.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/device_types/WindowCoveringController.xml b/data_model/in_progress/device_types/WindowCoveringController.xml new file mode 100644 index 00000000000000..189fee3d9d6303 --- /dev/null +++ b/data_model/in_progress/device_types/WindowCoveringController.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/scraper_version b/data_model/in_progress/scraper_version new file mode 100644 index 00000000000000..c813fe116c9f9e --- /dev/null +++ b/data_model/in_progress/scraper_version @@ -0,0 +1 @@ +1.2.5 diff --git a/data_model/in_progress/spec_sha b/data_model/in_progress/spec_sha new file mode 100644 index 00000000000000..a399f222280c76 --- /dev/null +++ b/data_model/in_progress/spec_sha @@ -0,0 +1 @@ +ec20ddf482db8deffe8b2eb745e34d2f9cea72b2 diff --git a/data_model/master/clusters/ACL-Cluster.xml b/data_model/master/clusters/ACL-Cluster.xml index 2278f7c7920ce4..15eebb425286a4 100644 --- a/data_model/master/clusters/ACL-Cluster.xml +++ b/data_model/master/clusters/ACL-Cluster.xml @@ -68,9 +68,7 @@ Davis, CA 95616, USA - - - + @@ -274,7 +272,7 @@ Davis, CA 95616, USA - + @@ -333,13 +331,7 @@ Davis, CA 95616, USA - - - - - - - + @@ -348,13 +340,11 @@ Davis, CA 95616, USA - - + - - - + + diff --git a/data_model/master/clusters/Channel.xml b/data_model/master/clusters/Channel.xml index a2edf151cb6001..02bfcf3b25c854 100644 --- a/data_model/master/clusters/Channel.xml +++ b/data_model/master/clusters/Channel.xml @@ -366,7 +366,6 @@ Davis, CA 95616, USA - @@ -401,7 +400,6 @@ Davis, CA 95616, USA - @@ -414,7 +412,6 @@ Davis, CA 95616, USA - @@ -440,7 +437,6 @@ Davis, CA 95616, USA - diff --git a/data_model/master/clusters/ColorControl.xml b/data_model/master/clusters/ColorControl.xml index 6901b6ee4130c6..fa14aca0f8b5f4 100644 --- a/data_model/master/clusters/ColorControl.xml +++ b/data_model/master/clusters/ColorControl.xml @@ -65,8 +65,10 @@ Davis, CA 95616, USA - + @@ -291,7 +293,7 @@ Davis, CA 95616, USA - + @@ -666,14 +668,14 @@ Davis, CA 95616, USA - + - + - + @@ -699,7 +701,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/master/clusters/CommissionerControlCluster.xml b/data_model/master/clusters/CommissionerControlCluster.xml index 9cda8f414c89da..d3b8380aaba929 100644 --- a/data_model/master/clusters/CommissionerControlCluster.xml +++ b/data_model/master/clusters/CommissionerControlCluster.xml @@ -80,13 +80,13 @@ Davis, CA 95616, USA - + - + - + @@ -97,22 +97,15 @@ Davis, CA 95616, USA - + - + - - - - - - - - + @@ -139,15 +132,15 @@ Davis, CA 95616, USA - + - + - + - + diff --git a/data_model/master/clusters/ConcentrationMeasurement.xml b/data_model/master/clusters/ConcentrationMeasurement.xml index b622a3560b4ff0..68d4b7937bf717 100644 --- a/data_model/master/clusters/ConcentrationMeasurement.xml +++ b/data_model/master/clusters/ConcentrationMeasurement.xml @@ -193,7 +193,6 @@ Davis, CA 95616, USA - diff --git a/data_model/master/clusters/DeviceEnergyManagement.xml b/data_model/master/clusters/DeviceEnergyManagement.xml index cb7f46c008f5e1..776a06f20b3fd4 100644 --- a/data_model/master/clusters/DeviceEnergyManagement.xml +++ b/data_model/master/clusters/DeviceEnergyManagement.xml @@ -62,7 +62,7 @@ Davis, CA 95616, USA - + @@ -123,27 +123,27 @@ Davis, CA 95616, USA - + - + - + - + - + - + - + @@ -230,13 +230,13 @@ Davis, CA 95616, USA - + - + - + @@ -255,13 +255,13 @@ Davis, CA 95616, USA - + - + - + @@ -359,12 +359,14 @@ Davis, CA 95616, USA + + @@ -495,17 +497,18 @@ Davis, CA 95616, USA + - + - + diff --git a/data_model/master/clusters/EnergyCalendar.xml b/data_model/master/clusters/EnergyCalendar.xml index 5be0f8ff520aea..2ba93203618609 100644 --- a/data_model/master/clusters/EnergyCalendar.xml +++ b/data_model/master/clusters/EnergyCalendar.xml @@ -158,7 +158,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/master/clusters/FanControl.xml b/data_model/master/clusters/FanControl.xml index 9eba1df549981c..ec05b6f74e069d 100644 --- a/data_model/master/clusters/FanControl.xml +++ b/data_model/master/clusters/FanControl.xml @@ -57,13 +57,12 @@ Davis, CA 95616, USA :xrefstyle: short --> - + - @@ -211,7 +210,6 @@ Davis, CA 95616, USA - @@ -233,7 +231,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/master/clusters/FlowMeasurement.xml b/data_model/master/clusters/FlowMeasurement.xml index 85879977faa509..7ee97f586e708a 100644 --- a/data_model/master/clusters/FlowMeasurement.xml +++ b/data_model/master/clusters/FlowMeasurement.xml @@ -78,13 +78,13 @@ Davis, CA 95616, USA - + - + diff --git a/data_model/master/clusters/GeneralCommissioningCluster.xml b/data_model/master/clusters/GeneralCommissioningCluster.xml index 2d9e65848f0c85..2342e6704c25c8 100644 --- a/data_model/master/clusters/GeneralCommissioningCluster.xml +++ b/data_model/master/clusters/GeneralCommissioningCluster.xml @@ -65,7 +65,7 @@ Davis, CA 95616, USA - + @@ -91,12 +91,12 @@ Davis, CA 95616, USA - + - + @@ -150,24 +150,35 @@ Davis, CA 95616, USA + + + + + + + + + + + diff --git a/data_model/master/clusters/Identify.xml b/data_model/master/clusters/Identify.xml index a6682b7233d30a..ddc3e33e9d28d3 100644 --- a/data_model/master/clusters/Identify.xml +++ b/data_model/master/clusters/Identify.xml @@ -63,7 +63,7 @@ Davis, CA 95616, USA - + @@ -122,7 +122,6 @@ Davis, CA 95616, USA - diff --git a/data_model/master/clusters/IlluminanceMeasurement.xml b/data_model/master/clusters/IlluminanceMeasurement.xml index f24df314ca2ead..d7cb9a993d0e4e 100644 --- a/data_model/master/clusters/IlluminanceMeasurement.xml +++ b/data_model/master/clusters/IlluminanceMeasurement.xml @@ -92,13 +92,13 @@ Davis, CA 95616, USA - + - + diff --git a/data_model/master/clusters/JointFabricDatastoreCluster.xml b/data_model/master/clusters/JointFabricDatastoreCluster.xml index 79143f34d03f55..137edd2857f74d 100644 --- a/data_model/master/clusters/JointFabricDatastoreCluster.xml +++ b/data_model/master/clusters/JointFabricDatastoreCluster.xml @@ -55,12 +55,12 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + - + @@ -267,6 +267,10 @@ Davis, CA 95616, USA + + + + diff --git a/data_model/master/clusters/JointFabricPKICluster.xml b/data_model/master/clusters/JointFabricPKICluster.xml index b8c9474b0163d8..847d2548e3b1f1 100644 --- a/data_model/master/clusters/JointFabricPKICluster.xml +++ b/data_model/master/clusters/JointFabricPKICluster.xml @@ -55,12 +55,12 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + - + @@ -68,32 +68,73 @@ Davis, CA 95616, USA - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - + - + - + - + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/master/clusters/LevelControl.xml b/data_model/master/clusters/LevelControl.xml index 28f88b96832c32..de342812287b0f 100644 --- a/data_model/master/clusters/LevelControl.xml +++ b/data_model/master/clusters/LevelControl.xml @@ -136,7 +136,7 @@ Davis, CA 95616, USA - + @@ -145,7 +145,6 @@ Davis, CA 95616, USA - diff --git a/data_model/master/clusters/MeterIdentification.xml b/data_model/master/clusters/MeterIdentification.xml new file mode 100644 index 00000000000000..1ed47d5d3da3af --- /dev/null +++ b/data_model/master/clusters/MeterIdentification.xml @@ -0,0 +1,130 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/master/clusters/Mode_DeviceEnergyManagement.xml b/data_model/master/clusters/Mode_DeviceEnergyManagement.xml index ff8f7e910e94b0..48cf6df4955a15 100644 --- a/data_model/master/clusters/Mode_DeviceEnergyManagement.xml +++ b/data_model/master/clusters/Mode_DeviceEnergyManagement.xml @@ -57,9 +57,10 @@ Davis, CA 95616, USA :xrefstyle: basic --> - + + @@ -67,6 +68,11 @@ Davis, CA 95616, USA + + + + + @@ -81,4 +87,18 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/master/clusters/Mode_Dishwasher.xml b/data_model/master/clusters/Mode_Dishwasher.xml index 8069fdddcf0cc3..1c3a99b9e3d245 100644 --- a/data_model/master/clusters/Mode_Dishwasher.xml +++ b/data_model/master/clusters/Mode_Dishwasher.xml @@ -66,6 +66,11 @@ Davis, CA 95616, USA + + + + + @@ -80,11 +85,6 @@ Davis, CA 95616, USA - - - - - diff --git a/data_model/master/clusters/Mode_EVSE.xml b/data_model/master/clusters/Mode_EVSE.xml index daf8042cc3293b..025e9de9884c89 100644 --- a/data_model/master/clusters/Mode_EVSE.xml +++ b/data_model/master/clusters/Mode_EVSE.xml @@ -57,14 +57,20 @@ Davis, CA 95616, USA :xrefstyle: basic --> - + + + + + + + @@ -79,11 +85,6 @@ Davis, CA 95616, USA - - - - - @@ -92,10 +93,10 @@ Davis, CA 95616, USA - + - + \ No newline at end of file diff --git a/data_model/master/clusters/Mode_LaundryWasher.xml b/data_model/master/clusters/Mode_LaundryWasher.xml index 444d536fd178fd..b5f557a4b46a4b 100644 --- a/data_model/master/clusters/Mode_LaundryWasher.xml +++ b/data_model/master/clusters/Mode_LaundryWasher.xml @@ -66,6 +66,11 @@ Davis, CA 95616, USA + + + + + @@ -80,11 +85,6 @@ Davis, CA 95616, USA - - - - - diff --git a/data_model/master/clusters/Mode_MicrowaveOven.xml b/data_model/master/clusters/Mode_MicrowaveOven.xml index b5076d8c270099..24d682fecac68b 100644 --- a/data_model/master/clusters/Mode_MicrowaveOven.xml +++ b/data_model/master/clusters/Mode_MicrowaveOven.xml @@ -66,7 +66,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/master/clusters/Mode_Oven.xml b/data_model/master/clusters/Mode_Oven.xml index f7e8c8a4268cf2..a3e3323fe98777 100644 --- a/data_model/master/clusters/Mode_Oven.xml +++ b/data_model/master/clusters/Mode_Oven.xml @@ -65,6 +65,11 @@ Davis, CA 95616, USA + + + + + @@ -79,11 +84,6 @@ Davis, CA 95616, USA - - - - - diff --git a/data_model/master/clusters/Mode_RVCClean.xml b/data_model/master/clusters/Mode_RVCClean.xml index 26b5d15c185fe3..4ead99f0915adf 100644 --- a/data_model/master/clusters/Mode_RVCClean.xml +++ b/data_model/master/clusters/Mode_RVCClean.xml @@ -67,6 +67,14 @@ Davis, CA 95616, USA + + + + + + + + @@ -81,11 +89,6 @@ Davis, CA 95616, USA - - - - - @@ -97,7 +100,7 @@ Davis, CA 95616, USA - + \ No newline at end of file diff --git a/data_model/master/clusters/Mode_RVCRun.xml b/data_model/master/clusters/Mode_RVCRun.xml index ad0d7601a45c22..f1d89e4c747106 100644 --- a/data_model/master/clusters/Mode_RVCRun.xml +++ b/data_model/master/clusters/Mode_RVCRun.xml @@ -67,6 +67,14 @@ Davis, CA 95616, USA + + + + + + + + @@ -81,11 +89,6 @@ Davis, CA 95616, USA - - - - - @@ -97,7 +100,7 @@ Davis, CA 95616, USA - + \ No newline at end of file diff --git a/data_model/master/clusters/Mode_Refrigerator.xml b/data_model/master/clusters/Mode_Refrigerator.xml index 84410d1ddfc465..2728ac0f42b8fb 100644 --- a/data_model/master/clusters/Mode_Refrigerator.xml +++ b/data_model/master/clusters/Mode_Refrigerator.xml @@ -66,6 +66,11 @@ Davis, CA 95616, USA + + + + + @@ -80,11 +85,6 @@ Davis, CA 95616, USA - - - - - diff --git a/data_model/master/clusters/Mode_WaterHeater.xml b/data_model/master/clusters/Mode_WaterHeater.xml index 1779e74bab8c84..cc9c96e484bce2 100644 --- a/data_model/master/clusters/Mode_WaterHeater.xml +++ b/data_model/master/clusters/Mode_WaterHeater.xml @@ -65,6 +65,11 @@ Davis, CA 95616, USA + + + + + @@ -79,4 +84,18 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/master/clusters/OTARequestor.xml b/data_model/master/clusters/OTARequestor.xml index 83314d14d9551a..ea7ec03c717fd3 100644 --- a/data_model/master/clusters/OTARequestor.xml +++ b/data_model/master/clusters/OTARequestor.xml @@ -136,6 +136,7 @@ Davis, CA 95616, USA + diff --git a/data_model/master/clusters/OccupancySensing.xml b/data_model/master/clusters/OccupancySensing.xml index 4cd027deb07279..7ca0d3631dbe05 100644 --- a/data_model/master/clusters/OccupancySensing.xml +++ b/data_model/master/clusters/OccupancySensing.xml @@ -68,6 +68,7 @@ Davis, CA 95616, USA add sensitivity setting (via co-located BooleanStateConfiguration cluster on same endpoint); add new attribute for tuning the sensor's reporting; add event OccupancyChanged; + add `N` quality for HoldTime and other timing attributes; describe how to accommodate legacy clients"/> @@ -134,11 +135,12 @@ Davis, CA 95616, USA - + + @@ -171,8 +173,9 @@ Davis, CA 95616, USA - + + @@ -185,6 +188,7 @@ Davis, CA 95616, USA + @@ -210,6 +214,7 @@ Davis, CA 95616, USA + @@ -257,6 +262,7 @@ Davis, CA 95616, USA + @@ -305,6 +311,7 @@ Davis, CA 95616, USA + @@ -317,6 +324,7 @@ Davis, CA 95616, USA + @@ -336,6 +344,7 @@ Davis, CA 95616, USA + @@ -356,6 +365,7 @@ Davis, CA 95616, USA + @@ -368,6 +378,7 @@ Davis, CA 95616, USA + @@ -387,6 +398,7 @@ Davis, CA 95616, USA + diff --git a/data_model/master/clusters/OperationalState_RVC.xml b/data_model/master/clusters/OperationalState_RVC.xml index 5d2d28db2c2cad..9b83bc4dfde257 100644 --- a/data_model/master/clusters/OperationalState_RVC.xml +++ b/data_model/master/clusters/OperationalState_RVC.xml @@ -108,10 +108,10 @@ Davis, CA 95616, USA - + - + diff --git a/data_model/master/clusters/PressureMeasurement.xml b/data_model/master/clusters/PressureMeasurement.xml index bf9b6a9286e381..09b9577cc84585 100644 --- a/data_model/master/clusters/PressureMeasurement.xml +++ b/data_model/master/clusters/PressureMeasurement.xml @@ -83,18 +83,18 @@ Davis, CA 95616, USA - + - + - + @@ -110,7 +110,7 @@ Davis, CA 95616, USA - + @@ -118,21 +118,21 @@ Davis, CA 95616, USA - + - + - + \ No newline at end of file diff --git a/data_model/master/clusters/PumpConfigurationControl.xml b/data_model/master/clusters/PumpConfigurationControl.xml index 95ede00d0eb72e..9b7e4ab56dc5c2 100644 --- a/data_model/master/clusters/PumpConfigurationControl.xml +++ b/data_model/master/clusters/PumpConfigurationControl.xml @@ -55,13 +55,12 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + - @@ -97,37 +96,44 @@ Davis, CA 95616, USA - + - + - + - + - + - + - + @@ -137,7 +143,8 @@ Davis, CA 95616, USA - + @@ -331,12 +338,12 @@ Davis, CA 95616, USA - + - + @@ -346,7 +353,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/master/clusters/ResourceMonitoring.xml b/data_model/master/clusters/ResourceMonitoring.xml index b9d26ff6dd9ecf..911ad11373b948 100644 --- a/data_model/master/clusters/ResourceMonitoring.xml +++ b/data_model/master/clusters/ResourceMonitoring.xml @@ -74,7 +74,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/master/clusters/ServiceArea.xml b/data_model/master/clusters/ServiceArea.xml index 6a54264a94928b..2533d4b549d2f0 100644 --- a/data_model/master/clusters/ServiceArea.xml +++ b/data_model/master/clusters/ServiceArea.xml @@ -113,7 +113,7 @@ Davis, CA 95616, USA - + @@ -121,7 +121,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/master/clusters/Switch.xml b/data_model/master/clusters/Switch.xml index 92489c1e9228a3..8662d262f0b50e 100644 --- a/data_model/master/clusters/Switch.xml +++ b/data_model/master/clusters/Switch.xml @@ -60,7 +60,7 @@ Davis, CA 95616, USA + Introduction of ActionSwitch feature flag."/> diff --git a/data_model/master/clusters/TemperatureControl.xml b/data_model/master/clusters/TemperatureControl.xml index 79519716ea1cf8..511761b24b9e89 100644 --- a/data_model/master/clusters/TemperatureControl.xml +++ b/data_model/master/clusters/TemperatureControl.xml @@ -113,7 +113,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/master/clusters/TemperatureMeasurement.xml b/data_model/master/clusters/TemperatureMeasurement.xml index 0935b18edab675..5c1df46ccbf115 100644 --- a/data_model/master/clusters/TemperatureMeasurement.xml +++ b/data_model/master/clusters/TemperatureMeasurement.xml @@ -79,18 +79,18 @@ Davis, CA 95616, USA - + - + - + \ No newline at end of file diff --git a/data_model/master/clusters/Thermostat.xml b/data_model/master/clusters/Thermostat.xml index de1743d8addf1a..6c5584e087d47c 100644 --- a/data_model/master/clusters/Thermostat.xml +++ b/data_model/master/clusters/Thermostat.xml @@ -55,7 +55,7 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + @@ -63,9 +63,9 @@ Davis, CA 95616, USA - + @@ -652,12 +652,12 @@ Davis, CA 95616, USA - + - + @@ -995,7 +995,7 @@ Davis, CA 95616, USA - + @@ -1215,6 +1215,7 @@ Davis, CA 95616, USA + diff --git a/data_model/master/clusters/ThreadNetworkDirectory.xml b/data_model/master/clusters/ThreadNetworkDirectory.xml index 098b490fa5d369..e5112991e6ff06 100644 --- a/data_model/master/clusters/ThreadNetworkDirectory.xml +++ b/data_model/master/clusters/ThreadNetworkDirectory.xml @@ -101,7 +101,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/master/clusters/ValveConfigurationControl.xml b/data_model/master/clusters/ValveConfigurationControl.xml index 03d40acd480ff4..6f38375a1a31c6 100644 --- a/data_model/master/clusters/ValveConfigurationControl.xml +++ b/data_model/master/clusters/ValveConfigurationControl.xml @@ -57,10 +57,9 @@ Davis, CA 95616, USA :xrefstyle: basic --> - + - @@ -143,7 +142,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/master/clusters/WaterContentMeasurement.xml b/data_model/master/clusters/WaterContentMeasurement.xml index af11c9cf8d514c..b613bf4e1522fb 100644 --- a/data_model/master/clusters/WaterContentMeasurement.xml +++ b/data_model/master/clusters/WaterContentMeasurement.xml @@ -78,18 +78,18 @@ Davis, CA 95616, USA - + - + - + \ No newline at end of file diff --git a/data_model/master/clusters/WaterHeaterManagement.xml b/data_model/master/clusters/WaterHeaterManagement.xml index cadf8e0a8af53b..96dcc2b112461b 100644 --- a/data_model/master/clusters/WaterHeaterManagement.xml +++ b/data_model/master/clusters/WaterHeaterManagement.xml @@ -57,9 +57,10 @@ Davis, CA 95616, USA :xrefstyle: basic --> - + + @@ -69,7 +70,7 @@ Davis, CA 95616, USA - + @@ -82,48 +83,58 @@ Davis, CA 95616, USA - - + + - + - + - + - + - - - - - - - - - - - - - - + + - - + + + + + + + + + + + + + + + + + + + + + + + + - + - + @@ -138,6 +149,7 @@ Davis, CA 95616, USA + @@ -154,27 +166,9 @@ Davis, CA 95616, USA - + - - - - - - - - - - - - - - - - - - - + @@ -182,4 +176,18 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/master/clusters/WindowCovering.xml b/data_model/master/clusters/WindowCovering.xml index f8c60b46901dc9..09133513af736a 100644 --- a/data_model/master/clusters/WindowCovering.xml +++ b/data_model/master/clusters/WindowCovering.xml @@ -57,14 +57,13 @@ Davis, CA 95616, USA :xrefstyle: basic --> - + - @@ -420,7 +419,7 @@ Davis, CA 95616, USA - + @@ -432,7 +431,7 @@ Davis, CA 95616, USA - + @@ -464,7 +463,7 @@ Davis, CA 95616, USA - + @@ -474,7 +473,7 @@ Davis, CA 95616, USA - + @@ -517,7 +516,7 @@ Davis, CA 95616, USA - + @@ -528,7 +527,7 @@ Davis, CA 95616, USA - + @@ -652,12 +651,8 @@ Davis, CA 95616, USA - - - - - - + + @@ -687,12 +682,8 @@ Davis, CA 95616, USA - - - - - - + + diff --git a/data_model/master/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml b/data_model/master/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml index 4368d991c832f4..62633f55cf08cc 100644 --- a/data_model/master/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml +++ b/data_model/master/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml @@ -69,7 +69,7 @@ Davis, CA 95616, USA - + @@ -154,6 +154,10 @@ Davis, CA 95616, USA + + + + diff --git a/data_model/master/clusters/bridge-clusters-EcosystemInformationCluster.xml b/data_model/master/clusters/bridge-clusters-EcosystemInformationCluster.xml index 22cc88097acf75..ddebe95679370e 100644 --- a/data_model/master/clusters/bridge-clusters-EcosystemInformationCluster.xml +++ b/data_model/master/clusters/bridge-clusters-EcosystemInformationCluster.xml @@ -84,12 +84,10 @@ Davis, CA 95616, USA - - - + - + @@ -123,24 +121,17 @@ Davis, CA 95616, USA - - - - - - + - + - - + - + - \ No newline at end of file diff --git a/data_model/master/clusters/cluster_ids.json b/data_model/master/clusters/cluster_ids.json index e04a90b04a76d8..ee34f4df93d55f 100644 --- a/data_model/master/clusters/cluster_ids.json +++ b/data_model/master/clusters/cluster_ids.json @@ -120,5 +120,8 @@ "1295": "Content Control", "1296": "Content App Observer", "1872": "Ecosystem Information", - "1873": "Commissioner Control" + "1873": "Commissioner Control", + "1874": "Joint Fabric Datastore Cluster", + "1875": "Joint Fabric PKI", + "2822": "Meter Identification" } diff --git a/data_model/master/device_types/Cooktop.xml b/data_model/master/device_types/Cooktop.xml index 2c7795de12233b..9164641c06f2c1 100644 --- a/data_model/master/device_types/Cooktop.xml +++ b/data_model/master/device_types/Cooktop.xml @@ -68,7 +68,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/master/device_types/DeviceEnergyManagement.xml b/data_model/master/device_types/DeviceEnergyManagement.xml index 85f7c5d9a7cd66..86efccc02f6b2d 100644 --- a/data_model/master/device_types/DeviceEnergyManagement.xml +++ b/data_model/master/device_types/DeviceEnergyManagement.xml @@ -55,9 +55,10 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + + @@ -66,11 +67,21 @@ Davis, CA 95616, USA + + + + + + + - + + + + diff --git a/data_model/master/device_types/DoorLock.xml b/data_model/master/device_types/DoorLock.xml index 121ea179d14589..e2eb1e9152085d 100644 --- a/data_model/master/device_types/DoorLock.xml +++ b/data_model/master/device_types/DoorLock.xml @@ -70,7 +70,7 @@ Davis, CA 95616, USA - + @@ -95,49 +95,14 @@ Davis, CA 95616, USA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/data_model/master/device_types/DoorLockController.xml b/data_model/master/device_types/DoorLockController.xml index 101dc46f5ccd40..40749d77b3c783 100644 --- a/data_model/master/device_types/DoorLockController.xml +++ b/data_model/master/device_types/DoorLockController.xml @@ -67,15 +67,15 @@ Davis, CA 95616, USA - + + + + - - - diff --git a/data_model/master/device_types/JointFabricAdmin.xml b/data_model/master/device_types/JointFabricAdmin.xml index 7d29cbba1305d5..6c63dc9bdd96a1 100644 --- a/data_model/master/device_types/JointFabricAdmin.xml +++ b/data_model/master/device_types/JointFabricAdmin.xml @@ -55,16 +55,16 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + - + - + diff --git a/data_model/master/device_types/MountedDimmableLoadControl.xml b/data_model/master/device_types/MountedDimmableLoadControl.xml index 2527eb6aaefcd2..d0cee6e5ef37cd 100644 --- a/data_model/master/device_types/MountedDimmableLoadControl.xml +++ b/data_model/master/device_types/MountedDimmableLoadControl.xml @@ -55,7 +55,7 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/MountedOnOffControl.xml b/data_model/master/device_types/MountedOnOffControl.xml index 1be3cf746418aa..09628bb4e0e9f0 100644 --- a/data_model/master/device_types/MountedOnOffControl.xml +++ b/data_model/master/device_types/MountedOnOffControl.xml @@ -55,7 +55,7 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + diff --git a/data_model/master/device_types/ThreadBorderRouter.xml b/data_model/master/device_types/ThreadBorderRouter.xml index abe38a81396cd6..792f002801b9a0 100644 --- a/data_model/master/device_types/ThreadBorderRouter.xml +++ b/data_model/master/device_types/ThreadBorderRouter.xml @@ -68,5 +68,8 @@ Davis, CA 95616, USA + + + \ No newline at end of file diff --git a/data_model/master/device_types/WindowCovering.xml b/data_model/master/device_types/WindowCovering.xml index a2e16beba60ee1..da8780b3c94be4 100644 --- a/data_model/master/device_types/WindowCovering.xml +++ b/data_model/master/device_types/WindowCovering.xml @@ -78,42 +78,12 @@ Davis, CA 95616, USA - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/data_model/master/spec_sha b/data_model/master/spec_sha index 16b2cbb1caa026..a399f222280c76 100644 --- a/data_model/master/spec_sha +++ b/data_model/master/spec_sha @@ -1 +1 @@ -12e2fa3014b316b202eed892cb50dec7b6851d8e +ec20ddf482db8deffe8b2eb745e34d2f9cea72b2 diff --git a/docs/ERROR_CODES.md b/docs/ERROR_CODES.md index 5799c7a3f1b885..ff549e6df6b6dc 100644 --- a/docs/ERROR_CODES.md +++ b/docs/ERROR_CODES.md @@ -118,6 +118,7 @@ This file was **AUTOMATICALLY** generated by | 165 | 0xA5 | `CHIP_ERROR_ACCESS_DENIED` | | 166 | 0xA6 | `CHIP_ERROR_UNKNOWN_RESOURCE_ID` | | 167 | 0xA7 | `CHIP_ERROR_VERSION_MISMATCH` | +| 168 | 0xA8 | `CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL` | | 171 | 0xAB | `CHIP_ERROR_EVENT_ID_FOUND` | | 172 | 0xAC | `CHIP_ERROR_INTERNAL` | | 173 | 0xAD | `CHIP_ERROR_OPEN_FAILED` | @@ -252,6 +253,7 @@ This file was **AUTOMATICALLY** generated by | 1426 | 0x592 | `DATA_VERSION_MISMATCH` | | 1428 | 0x594 | `TIMEOUT` | | 1436 | 0x59C | `BUSY` | +| 1437 | 0x59D | `ACCESS_RESTRICTED` | | 1475 | 0x5C3 | `UNSUPPORTED_CLUSTER` | | 1477 | 0x5C5 | `NO_UPSTREAM_SUBSCRIPTION` | | 1478 | 0x5C6 | `NEEDS_TIMED_INTERACTION` | diff --git a/docs/examples/index.md b/docs/examples/index.md index 9dbb0a5aa4e940..67dcfcf36b0e55 100644 --- a/docs/examples/index.md +++ b/docs/examples/index.md @@ -149,6 +149,15 @@ lighting-app/**/README lighting-app/qpg/APPLICATION ``` +## Lighting example without unique id + +```{toctree} +:glob: +:maxdepth: 1 + +lighting-app-data-mode-no-unique-id/**/README +``` + ## Light switch example ```{toctree} diff --git a/docs/guides/BUILDING.md b/docs/guides/BUILDING.md index 7cd660227ed165..941b5328887e31 100644 --- a/docs/guides/BUILDING.md +++ b/docs/guides/BUILDING.md @@ -382,6 +382,26 @@ They pick up environment variables such as `$CFLAGS`, `$CXXFLAGS` and You likely want `libfuzzer` + `asan` builds instead for local testing. +### `pw_fuzzer` `FuzzTests` + +An Alternative way for writing and running Fuzz Tests is Google's `FuzzTest` +framework, integrated through `pw_fuzzer`. The Tests will have to be built and +executed manually. + +``` +./scripts/build/build_examples.py --target linux-x64-tests-clang-pw-fuzztest build +``` + +NOTE: `asan` is enabled by default in FuzzTest, so please do not add it in +build_examples.py invocation. + +Tests will be located in: +`out/linux-x64-tests-clang-pw-fuzztest/chip_pw_fuzztest/tests/` where +`chip_pw_fuzztest` is the name of the toolchain used. + +- Details on How To Run Fuzz Tests in + [Running FuzzTests](https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/fuzz_testing.md) + ## Build custom configuration The build is configured by setting build arguments. These you can set in one of diff --git a/docs/guides/darwin.md b/docs/guides/darwin.md index d44e44cc04afd9..00165e6fcac14f 100644 --- a/docs/guides/darwin.md +++ b/docs/guides/darwin.md @@ -303,7 +303,6 @@ Example: - [Simulated Linux](./simulated_device_linux.md) - [Telink](/examples/lighting-app/telink/README.md) - [TI Platform](./ti/ti_matter_overview.md) -- [TI All Clusters](/examples/all-clusters-app/cc13x4_26x4/README.md) - [Tizen](/examples/lighting-app/tizen/README.md) ## Providing Feedback to Apple diff --git a/docs/guides/esp32/setup_idf_chip.md b/docs/guides/esp32/setup_idf_chip.md index 035964bdfab1b5..ae507631e463f5 100644 --- a/docs/guides/esp32/setup_idf_chip.md +++ b/docs/guides/esp32/setup_idf_chip.md @@ -16,7 +16,7 @@ step. - [Linux](https://docs.espressif.com/projects/esp-idf/en/v5.3/esp32/get-started/linux-macos-setup.html#for-linux-users) - [macOS](https://docs.espressif.com/projects/esp-idf/en/v5.3/esp32/get-started/linux-macos-setup.html#for-macos-users) -### Get IDF v5.1.2 +### Get ESP-IDF v5.3 - Clone ESP-IDF [v5.3 release](https://github.com/espressif/esp-idf/releases/tag/v5.3 diff --git a/docs/guides/fabric_synchronization_guide.md b/docs/guides/fabric_synchronization_guide.md index 22d616211fbd01..e5d47dda8f9563 100644 --- a/docs/guides/fabric_synchronization_guide.md +++ b/docs/guides/fabric_synchronization_guide.md @@ -107,7 +107,7 @@ fabricsync add-local-bridge 1 Pair the Ecosystem 2 bridge to Ecosystem 1 with node ID 2: ``` -fabricsync add-bridge 2 +fabricsync add-bridge 2 ``` This command will initiate the reverse commissioning process. After a few diff --git a/docs/guides/nrfconnect_examples_configuration.md b/docs/guides/nrfconnect_examples_configuration.md index 1e74d2f4e097ea..d2a135ebdf6d9a 100644 --- a/docs/guides/nrfconnect_examples_configuration.md +++ b/docs/guides/nrfconnect_examples_configuration.md @@ -25,7 +25,7 @@ Regardless of the option, you will need to rebuild your application. This will require you to provide the build target name of the kit you are using. You can find the build target names in the Requirements section of the example you are building or on the -[Board support](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/app_dev/board_support/index.html) +[Board support](https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/board_support/index.html) page in the nRF Connect SDK documentation. ### Temporary changes to configuration @@ -97,7 +97,7 @@ them values of proper type. Few examples: `CONFIG_SAMPLE_STRING_OPTION="some_text"` For more detailed information, read about -[setting Kconfig values](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/kconfig/setting.html#setting-configuration-values) +[setting Kconfig values](https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/build/kconfig/setting.html) in the nRF Connect SDK documentation. Because Kconfig configuration files are used in the building process, make sure @@ -150,7 +150,7 @@ from your perspective: $ west build -b build-target -- -DOVERLAY_CONFIG=overlay_file_name Read the -[Kconfig](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/kconfig/index.html#kconfig) +[Kconfig](https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/build/kconfig/index.html) guide in the nRF Connect SDK's Zephyr documentation if you are interested in getting more advanced and detailed information about the configuration structure. @@ -214,7 +214,7 @@ performance in case it has been polluted with unwanted entries. #### Logging You can enable logging for both the stack and Zephyr’s -[Logging](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/reference/logging/index.html#logging-api) +[Logging](https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/services/logging/index.html) API by setting the `CONFIG_LOG` option. Zephyr allows you to configure log levels of different software modules diff --git a/docs/guides/nrfconnect_examples_software_update.md b/docs/guides/nrfconnect_examples_software_update.md index 9fc1f6e6e5bd3e..d295bae47667a3 100644 --- a/docs/guides/nrfconnect_examples_software_update.md +++ b/docs/guides/nrfconnect_examples_software_update.md @@ -6,7 +6,7 @@ protocols: - Matter-compliant OTA update protocol that uses the Matter operational network for querying and downloading a new firmware image. -- [Simple Management Protocol](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/device_mgmt/smp_protocol.html) +- [Simple Management Protocol](https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/services/device_mgmt/smp_protocol.html) over Bluetooth LE. In this case, the DFU can be done either using a smartphone application or a PC command line tool. Note that this protocol is not part of the Matter specification. @@ -125,11 +125,9 @@ rebooted to apply the update. To upgrade your device firmware over Bluetooth LE using a smartphone, complete the following steps: -1. Install _one_ of the following applications on your smartphone: - - - [nRF Connect for Mobile](https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Connect-for-mobile) - - [nRF Toolbox](https://www.nordicsemi.com/Software-and-Tools/Development-Tools/nRF-Toolbox) - +1. Install the + [nRF Connect Device Manager](https://www.nordicsemi.com/Products/Development-tools/nrf-connect-device-manager) + application on your smartphone. 2. Push the appropriate button on the device to enable the software update functionality (if it is not enabled by default) and start the Bluetooth LE advertising of the SMP service. See the user interface section in the example @@ -138,8 +136,10 @@ the following steps: advertising. See the user interface section in the example documentation to check the button number. 4. Follow the instructions about downloading the new image to a device on the - [FOTA upgrades](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/working_with_nrf/nrf52/developing.html#fota-updates) - page in the nRF Connect SDK documentation. + FOTA updates page for either + [nRF52 Series devices](https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/nrf52/fota_update.html) + or the + [nRF5340 DK](https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/device_guides/nrf53/fota_update_nrf5340.html).
@@ -171,7 +171,7 @@ Complete the following steps to perform DFU using mcumgr: > (for example, `MatterLock`). 1. Install the tool by following the - [mcumgr command line tool installation instructions](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/device_mgmt/index.html#command-line-tool). + [mcumgr command line tool installation instructions](https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/services/device_mgmt/mcumgr.html#command-line_tool). 2. Push the appropriate button on the device to enable the software update functionality (if it is not enabled by default) and start the Bluetooth LE advertising of SMP service. See the user interface section in the example @@ -342,6 +342,6 @@ Swapping operation can take some time, and after it completes, the new firmware is booted. Visit the -[mcumgr image management](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/guides/device_mgmt/indexhtml#image-management) +[mcumgr image management](https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/services/device_mgmt/mcumgr.html#image_management) section to get familiar with all image management commands supported by the tool. diff --git a/docs/guides/nrfconnect_factory_data_configuration.md b/docs/guides/nrfconnect_factory_data_configuration.md index 27595e2888d616..886acc9b3049d3 100644 --- a/docs/guides/nrfconnect_factory_data_configuration.md +++ b/docs/guides/nrfconnect_factory_data_configuration.md @@ -24,7 +24,7 @@ data secure by applying hardware write protection. > **Note:** Due to hardware limitations, in the nRF Connect platform, protection > against writing can be applied only to the internal memory partition. The -> [Fprotect](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/libraries/others/fprotect.html) +> [Fprotect](https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/security/bootloader/fprotect.html) > is the hardware flash protection driver, and we used it to ensure write > protection of the factory data partition in internal flash memory. @@ -643,7 +643,7 @@ $ west build -b nrf52840dk_nrf52840 -- \ The factory data partition is an area in the device's persistent storage where a factory data set is stored. This area is configured using the -[Partition Manager](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/scripts/partition_manager/partition_manager.html), +[Partition Manager](https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/scripts/partition_manager/partition_manager.html), within which all partitions are declared in the `pm_static.yml` file. To prepare an example that supports factory data, add a partition called @@ -845,7 +845,7 @@ snippet: > **Note:** To get more information about how to use the interactive Kconfig > interfaces, read the -> [Kconfig documentation](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/build/kconfig/menuconfig.html). +> [Kconfig documentation](https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/build/kconfig/menuconfig.html). ### Default Kconfig values and developing aspects diff --git a/docs/guides/nrfconnect_platform_overview.md b/docs/guides/nrfconnect_platform_overview.md index ed04f302d72e71..8c570a67899b14 100644 --- a/docs/guides/nrfconnect_platform_overview.md +++ b/docs/guides/nrfconnect_platform_overview.md @@ -18,7 +18,7 @@ communication purposes: ## nRF Connect SDK Nordic Semiconductor's -[nRF Connect SDK](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/index.html) +[nRF Connect SDK](https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/index.html) allows to build a range of applications, including cellular IoT (LTE-M and NB-IoT), Bluetooth Low Energy, Thread, Zigbee, and Bluetooth mesh. The SDK contains samples, libraries and a full set of drivers for Nordic Semiconductor's @@ -57,8 +57,8 @@ Bluetooth LE concurrently with other stacks on the same radio chip. Read more in the nRF Connect SDK documentation: -- [SoftDevice Controller](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/softdevice_controller/README.html) -- [Multiprotocol Service Layer](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/mpsl/README.html) +- [SoftDevice Controller](https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/softdevice_controller/README.html) +- [Multiprotocol Service Layer](https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/mpsl/README.html)
@@ -72,9 +72,9 @@ network layer functionalities provided by the Zephyr. Read more in the nRF Connect SDK documentation: -- [Multiprotocol Service Layer](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/mpsl/README.html) -- [nRF 802.15.4 Radio Driver](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/nrf_802154/README.html) -- [OpenThread integration](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/protocols/thread/overview/ot_integration.html) +- [Multiprotocol Service Layer](https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/mpsl/README.html) +- [nRF 802.15.4 Radio Driver](https://docs.nordicsemi.com/bundle/ncs-latest/page/nrfxlib/nrf_802154/README.html) +- [OpenThread integration](https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/protocols/thread/overview/ot_integration.html)
@@ -105,7 +105,7 @@ agnostic interfaces and no additional platform-related actions are needed to perform communication through the Matter stack. For more information, see the -[Matter integration in the nRF Connect SDK](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/protocols/matter/overview/integration.html) +[Matter integration in the nRF Connect SDK](https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/protocols/matter/overview/integration.html) page in the SDK documentation.
@@ -126,5 +126,5 @@ library file is imported during the compilation process. For more information about the build system in Zephyr and the nRF Connect SDK, see the -[Build and configuration system](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/app_dev/build_and_config_system/index.html) +[Build and configuration system](https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/app_dev/config_and_build/config_and_build_system.html) page in the SDK documentation. diff --git a/docs/guides/nxp/nxp_manufacturing_flow.md b/docs/guides/nxp/nxp_manufacturing_flow.md index bad70db294a9ae..cb8431cc3b3083 100644 --- a/docs/guides/nxp/nxp_manufacturing_flow.md +++ b/docs/guides/nxp/nxp_manufacturing_flow.md @@ -247,24 +247,58 @@ adding the following gn argument `chip_use_plain_dac_key=true`. Supported platforms: -- RW61X - `src/plaftorm/nxp/rt/rw61x/FactoryDataProviderImpl.h` - -For platforms that have a secure subsystem (`SE50`), the DAC private key can be -converted to an encrypted blob. This blob will overwrite the DAC private key in -factory data and will be imported in the `SE50` before to sign, by the factory -data provider instance. - -The conversion process shall happen at manufacturing time and should be run one -time only: - -- Write factory data binary. -- Build the application with - `chip_with_factory_data=1 chip_convert_dac_private_key=1` set. -- Write the application to the board and let it run. - -After the conversion process: - -- Make sure the application is built with `chip_with_factory_data=1`, but - without `chip_convert_dac_private_key` arg, since conversion already - happened. -- Write the application to the board. +- RW61X + +there are three implementations for factory data protection + +- whole factory data protection with AES encryption ( chip_with_factory_data=1 + chip_enable_secure_whole_factory_data=true ) + `examples/platform/nxp/rt/rw61x/factory_data/source/AppFactoryDataExample.cpp`\ + `src/platform/nxp/rt/rw61x/FactoryDataProviderEncImpl.cpp` + +- only dac private key protection ( chip_with_factory_data=1 + chip_enable_secure_dac_private_key_storage=true ) + `examples/platform/nxp/rt/rw61x/factory_data/source/AppFactoryDataExample.cpp` + \ + `src/platform/nxp/rt/rw61x/FactoryDataProviderImpl.cpp` + +- whole factory data protection with hard-coded AES key ( + chip_with_factory_data=1 ) + `examples/platform/nxp/common/factory_data/source/AppFactoryDataDefaultImpl.cpp` + \ + `src/platform/nxp/common/factory_data/FactoryDataProviderFwkImpl.cpp` + +for the first one, the whole factory data is encrypted by an AES-256 key, the +AES key can be passed through serial link when in factory production mode, and +will be provisioned into Edge Lock, and the returned AES Key blob (wrapped key) +can be stored in the end of factory data region in TLV format. for the +decryption process, the blob is retrieved and provisioned into Edge Lock and the +whole factory data can be decrypted using the returned key index in Edge Lock. +Compared with only dac private key protection solution, this solution can avoid +tampering with the original factory data. + +the factory data should be encrypted by an AES-256 key using "--aes256_key" +option in "generate.py" script file. + +it will check whether there is AES key blob in factory data region when in each +initialization, if not, the default AES key is converted and the result is +stored into flash, it run only once. + +for the second one, it only protect the dac private key inside the factory data, +the dac private key is retrieved and provisioned into Edge Lock, the returned +key blob replace the previous dac private key, and also update the overall size +and hash, and re-write the factory data. when device is doing matter +commissioning, the blob is retrieved and provisioned into Edge Lock and the +signing can be done using the returned key index in Edge Lock. + +the factory data should be plain text for the first programming. it will check +whether there is dac private key blob (base on the size of blob, should be 48) +in factory data when in each initialization, if not, the dac private key is +converted and the result is stored into flash, it run only once. + +for the third one, it is a little similar to the first one, the whole factory +data is encrypted by an AES key, but there are two differences: + +- the AES key is hard-coded and not provisioned into Edge Lock +- the factory data should be encrypted by AES-128 key using "--aes128_key" + option in "generate.py" script file. diff --git a/docs/guides/nxp/nxp_mcxw71_ota_guide.md b/docs/guides/nxp/nxp_mcxw71_ota_guide.md new file mode 100644 index 00000000000000..b21bf933d7e98e --- /dev/null +++ b/docs/guides/nxp/nxp_mcxw71_ota_guide.md @@ -0,0 +1,179 @@ +# NXP `MCXW71/K32W1` OTA guide + +### Convert `srec` into `sb3` file + +The OTA image files must be encrypted using Over The Air Programming Tool +([OTAP](https://www.nxp.com/design/microcontrollers-developer-resources/connectivity-tool-suite:CONNECTIVITY-TOOL-SUITE?#downloads)). +Bootloader will load the new OTA image only if it detects that the file was +encrypted with the `OTAP` correct keys. + +`.srec` file is input for Over The air Programming (`OTAP`) application +(unencrypted) and it's converted to `.sb3` format (encrypted). + +In `OTAP` application + +- select OTA protocol => `OTAP` Matter +- Browse File +- follow default options (KW45/K32W148, Preserve NVM) +- image information: will update "Application Core (MCU)" - this will generate + the image only for the CM33 core +- keep other settings at default values + +### Generate `ota` file + +In order to build an OTA image, use the NXP wrapper over the standard tool +`src/app/ota_image_tool.py`: + +- `scripts/tools/nxp/ota/ota_image_tool.py` + +The tool can be used to generate an OTA image with the following format: + +``` + | OTA image header | TLV1 | TLV2 | ... | TLVn | +``` + +where each TLV is in the form `|tag|length|value|`. + +Note that "standard" TLV format is used. Matter TLV format is only used for +factory data TLV value. + +Please see more in the +[OTA image tool guide](../../../scripts/tools/nxp/ota/README.md). + +Here is an example that generates an OTA image with application update TLV from +an `.sb3` file: + +``` +./scripts/tools/nxp/ota/ota_image_tool.py create -v 0xDEAD -p 0xBEEF -vn 2 -vs "2.0" -da sha256 --app-input-file ~/binaries/chip-mcxw71-app.sb3 ~/binaries/chip-mcxw71-app.ota + +``` + +A note regarding OTA image header version (`-vn` option). An application binary +has its own software version (given by +`CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION`, which can be overwritten). In +order to have a correct OTA process, the OTA header version should be the same +as the binary embedded software version. A user can set a custom software +version in the gn build args by setting `nxp_software_version` to the wanted +version. + +### OTA factory data + +A user can update the factory data through OTA, at the same time the application +firmware is updated by enabling the following processor in the `gn args`: + +- `chip_enable_ota_factory_data_processor=1` to enable default factory data + update processor (disabled by default). + +The OTA image used must be updated to include the new factory data. + +[OTA image tool guide](../../../scripts/tools/nxp/ota/README.md). + +### Running OTA + +The OTA topology used for OTA testing is illustrated in the figure below. +Topology is similar with the one used for Matter Test Events. + +![OTA_TOPOLOGY](../../../examples/platform/nxp/mcxw71_k32w1/doc/images/ota_topology.JPG) + +The concept for OTA is the next one: + +- there is an OTA Provider Application that holds the OTA image. In our case, + this is a Linux application running on an Ubuntu based-system; +- the OTA Requestor functionality is embedded inside the reference + application. It will be used for requesting OTA blocks from the OTA + Provider; +- the controller (a linux application called chip-tool) will be used for + commissioning both the device and the OTA Provider App. The device will be + commissioned using the standard Matter flow (BLE + IEEE 802.15.4) while the + OTA Provider Application will be commissioned using the `onnetwork` option + of `chip-tool`; +- during commissioning, each device is assigned a node id by the chip-tool + (can be specified manually by the user). Using the node id of the device and + of the reference application, chip-tool triggers the OTA transfer by + invoking the `announce-ota-provider` command - basically, the OTA Requestor + is informed of the node id of the OTA Provider Application. + +_Computer #1_ can be any system running an Ubuntu distribution. We recommand +using CSA official instructions from +[here](https://groups.csa-iot.org/wg/matter-csg/document/28566), where RPi 4 are +proposed. Also, CSA official instructions document point to the OS/Docker images +that should be used on the RPis. For compatibility reasons, we recommand +compiling chip-tool and OTA Provider applications with the same commit id that +was used for compiling the reference application. Also, please note that there +is a single controller (chip-tool) running on Computer #1 which is used for +commissioning both the device and the OTA Provider Application. If needed, +[these instructions](https://itsfoss.com/connect-wifi-terminal-ubuntu/) could be +used for connecting the RPis to WiFi. + +Build the Linux OTA provider application: + +``` +user@computer1:~/connectedhomeip$ : ./scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/ota-provider-app chip_config_network_layer_ble=false +``` + +Build Linux `chip-tool`: + +``` +user@computer1:~/connectedhomeip$ : ./scripts/examples/gn_build_example.sh examples/chip-tool out/chip-tool-app +``` + +Start the OTA Provider Application: + +``` +user@computer1:~/connectedhomeip$ : rm -rf /tmp/chip_* +user@computer1:~/connectedhomeip$ : ./out/ota-provider-app/chip-ota-provider-app -f chip-mcxw71-app.ota +``` + +Provision the OTA provider application and assign node id _1_. Also, grant ACL +entries to allow OTA requestors: + +``` +user@computer1:~/connectedhomeip$ : rm -rf /tmp/chip_* +user@computer1:~/connectedhomeip$ : ./out/chip-tool-app/chip-tool pairing onnetwork 1 20202021 +user@computer1:~/connectedhomeip$ : ./out/chip-tool-app/chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets": null}]' 1 0 +``` + +Provision the device and assign node id _2_: + +``` +user@computer1:~/connectedhomeip$ : ./out/chip-tool-app/chip-tool pairing ble-thread 2 hex: 20202021 3840 +``` + +Start the OTA process: + +``` +user@computer1:~/connectedhomeip$ : ./out/chip-tool-app/chip-tool otasoftwareupdaterequestor announce-ota-provider 1 0 0 0 2 0 +``` + +### Known issues + +- SRP cache on the openthread border router needs to flushed each time a new + commissioning process is attempted. For this, factory reset the device, then + execute `ot-ctl server disable` followed by `ot-ctl server enable`. After + this step, the commissioning process of the device can start; +- Due to some MDNS issues, the commissioning of the OTA Provider Application + may fail. Please make sure that the SRP cache is disabled + (`ot-ctl srp server disable`) on the openthread border router while + commissioning the OTA Provider Application; +- No other Docker image should be running (e.g.: Docker image needed by Test + Harness) except the OTBR one. A docker image can be killed using the + command: + + ``` + user@computer1:~/connectedhomeip$ : sudo docker kill $container_id + ``` + +- In order to avoid MDNS issues, only one interface should be active at one + time. E.g.: if WiFi is used then disable the Ethernet interface and also + disable multicast on that interface: + + ``` + user@computer1:~/connectedhomeip$ sudo ip link set dev eth0 down + user@computer1:~/connectedhomeip$ sudo ifconfig eth0 -multicast + ``` + +- If OTBR Docker image is used, then the "-B" parameter should point to the + interface used for the backbone. + +- If Wi-Fi is used on a RPI4, then a 5Ghz network should be selected. + Otherwise, issues related to BLE-WiFi combo may appear. diff --git a/docs/guides/nxp/nxp_rw61x_ota_software_update.md b/docs/guides/nxp/nxp_rw61x_ota_software_update.md index 1543b2f94402cf..af67b1419d0526 100644 --- a/docs/guides/nxp/nxp_rw61x_ota_software_update.md +++ b/docs/guides/nxp/nxp_rw61x_ota_software_update.md @@ -48,10 +48,9 @@ MCUBoot is an open-source secure bootloader used by RW61x to apply the self-upgrade. For more details, please refer to the [MCUBoot documentation](https://github.com/mcu-tools/mcuboot/blob/main/docs/design.md). -In our use case, the bootloader runs the application residing in the primary -partition. In order to run the OTA update image, the bootloader will swap the -content of the primary and the secondary partitions. This type of upgrade is -called swap-move and is the default upgrade configured by MCUBoot. +For RW61x platform, the bootloader is configured to use the flash remapping +mechanism by default, in order to perform the image upgrade. This is achieved by +using the `MCUBoot DIRECT-XIP` upgrade mode. ## OTA Software Update process for RW61x example application @@ -86,47 +85,42 @@ J-Link > exec EnableEraseAllFlashBanks J-Link > erase 0x8000000, 0x88a0000 ``` -- Using MCUXPresso, import the `mcuboot_opensource` demo example from the SDK - previously downloaded. The example can be found under the `ota_examples` - folder. - ![mcuboot_demo](../../../examples/platform/nxp/rt/rw61x/doc/images/mcuboot_demo.PNG) -- Before building the demo example, it should be specified that the - application to be run by the bootloader is monolithic. As a result, only one - image will be upgraded by the bootloader. This can be done by defining - `MONOLITHIC_APP` as 1 in the settings of the `mcuboot_opensource` project : +- MCUBoot application can be built with SDK installed, using instructions + + below. + +- Retrieve the mcuboot directory with : ``` -Right click on the Project -> Properties -> C/C++ Build -> Settings -> Tool Settings -> MCU C Compiler -> Preprocessor -> Add "MONOLITHIC_APP=1" in the Defined Symbols +user@ubuntu: cd ~/Desktop/connectedhomeip/third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/examples//ota_examples/mcuboot_opensource/armgcc ``` -![rw610_mcuboot_monolithic](../../../examples/platform/nxp/rt/rw61x/doc/images/mcuboot_monolithic_app.PNG) +``: Supported rw612 boards are: `rdrw612bga` or `frdmrw612` -- Build the demo example project. +- Build the mcuboot application : ``` -Right click on the Project -> Build Project +user@ubuntu: chmod +x build_flash_release.sh +user@ubuntu: export ARMGCC_DIR=/opt/gcc-arm-none-eabi-10.3-2021.10 # with ARMGCC_DIR referencing the compiler path +user@ubuntu: ./build_flash_release.sh ``` -- Program the demo example to the target board. +- Program the generated binary to the target board. ``` -Right click on the Project -> Debug -> As->SEGGER JLink probes -> OK -> Select elf file +J-Link > loadbin ~/Desktop/connectedhomeip/third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/examples//ota_examples/mcuboot_opensource/armgcc/flash_release/mcuboot_opensource.elf ``` -Note : The mcuboot binary is loaded in flash at address 0x8000000. - -- To run the flashed demo, either press the reset button of the device or use - the debugger IDE of MCUXpresso. If it runs successfully, the following logs - will be displayed on the terminal : +- If it runs successfully, the following logs will be displayed on the + terminal : ``` hello sbl. -Bootloader Version 1.9.0 -Primary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3 -Secondary image: magic=unset, swap_type=0x1, copy_done=0x3, image_ok=0x3 -Boot source: none -Swap type: none -erasing trailer; fa_id=2 +Disabling flash remapping function +Bootloader Version 2.0.0 +Image 0 Primary slot: Image not found +Image 0 Secondary slot: Image not found +No slot to load for image 0 Unable to find bootable image ``` @@ -135,7 +129,7 @@ partitions to be the size of 4.4 MB. If the size is to be changed, the partition addresses should be modified in the flash_partitioning.h accordingly. For more information about the flash partitioning with mcuboot, please refer to the dedicated readme.txt located in -"`SDK_RW612/boards/rdrw612bga/ota_examples/mcuboot_opensource/`". +"`/third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/examples//ota_examples/mcuboot_opensource/`". ### Generating and flashing the signed application image @@ -162,15 +156,15 @@ arm-none-eabi-objcopy -R .flash_config -R .NVM -O binary chip-rw61x-all-cluster- To sign the image and wrap the raw binary of the application with the header and trailer, "`imgtool`" is provided in the SDK and can be found in -"`/middleware/mcuboot_opensource/scripts/`". +"`/third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/middleware/mcuboot_opensource/scripts/`". The following commands can be run (make sure to replace the /path/to/file/binary with the adequate files): ``` -user@ubuntu: cd ~/Desktop/SDK_RW612/middleware/mcuboot_opensource/scripts +user@ubuntu: cd ~/Desktop//third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/middleware/mcuboot_opensource/scripts/ -user@ubuntu: python3 imgtool.py sign --key ~/Desktop/SDK_RW612/boards/rdrw612bga/ota_examples/mcuboot_opensource/keys/sign-rsa2048-priv.pem --align 4 --header-size 0x1000 --pad-header --slot-size 0x440000 --max-sectors 1088 --version "1.0" ~/Desktop/connectedhomeip/examples/all-clusters-app/nxp/rt/rw61x/out/debug/chip-rw61x-all-cluster-example.bin ~/Desktop/connectedhomeip/examples/all-clusters-app/nxp/rt/rw61x/out/debug/chip-rw61x-all-cluster-example_SIGNED.bin +user@ubuntu: python3 imgtool.py sign --key ~/Desktop//third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/examples//ota_examples/mcuboot_opensource/keys/sign-rsa2048-priv.pem --align 4 --header-size 0x1000 --pad-header --pad --confirm --slot-size 0x440000 --max-sectors 1088 --version "1.0" ~/Desktop/connectedhomeip/examples/all-clusters-app/nxp/rt/rw61x/out/debug/chip-rw61x-all-cluster-example.bin ~/Desktop/connectedhomeip/examples/all-clusters-app/nxp/rt/rw61x/out/debug/chip-rw61x-all-cluster-example_SIGNED.bin ``` Notes : @@ -182,7 +176,7 @@ Notes : adjusted accordingly. - In this example, the image is signed with the private key provided by the SDK as an example - (`SDK_RW612/boards/rdrw612bga/ota_examples/mcuboot_opensource/keys/sign-rsa2048-priv.pem`), + (`/third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/examples//ota_examples/mcuboot_opensource/keys/sign-rsa2048-priv.pem`), MCUBoot is built with its corresponding public key which would be used to verify the integrity of the image. It is possible to generate a new pair of keys using the following commands. This procedure should be done prior to @@ -201,7 +195,7 @@ user@ubuntu: python3 imgtool.py getpub -k priv_key.pem ``` - The extracted public key can then be copied to the - `SDK_RW612/boards/rdrw612bga/ota_examples/mcuboot_opensource/keys/sign-rsa2048-pub.c`, + `/third_party/nxp/nxp_matter_support/github_sdk/common_sdk/repo/examples//ota_examples/mcuboot_opensource/keys/sign-rsa2048-pub.c`, given as a value to the rsa_pub_key[] array. The resulting output is the signed binary of the application version "1.0". @@ -221,11 +215,12 @@ application and run it. To generate the OTA update image the same procedure can be followed from the [Generating and flashing the signed application image](#generating-and-flashing-the-signed-application-image) sub-section, replacing the "--version "1.0"" argument with "--version "2.0"" -(recent version of the update). +(recent version of the update), without arguments "--pad" "--confirm" when +running `imgtool` script during OTA Update Image generation. Note : When building the update image, the build arguments -`nxp_software_version=2 nxp_sofware_version_string=\"2.0\"` can be added to the -`gn gen` command in order to specify the upgraded version. +nxp_software_version=2 nxp_software_version_string=\"2.0\" can be added to the +gn gen command in order to specify the upgraded version. When the signed binary of the update is generated, the file should be converted into OTA format. To do so, the ota_image_tool is provided in the repo and can be diff --git a/docs/guides/openthread_rcp_nrf_dongle.md b/docs/guides/openthread_rcp_nrf_dongle.md index 57bb716a3ff0d0..e1a9f90a0509b6 100644 --- a/docs/guides/openthread_rcp_nrf_dongle.md +++ b/docs/guides/openthread_rcp_nrf_dongle.md @@ -13,14 +13,14 @@ Once programmed, the dongle can be used for ## Requirements You need to set up the -[nRF Connect SDK](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/index.html) +[nRF Connect SDK](https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/index.html) to build and program the OpenThread Radio Co-Processor to the nRF52840 Dongle. Read the -[nRF Connect SDK Getting started](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/getting_started.html) +[nRF Connect SDK installation](https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/installation.html) documentation for more information. ## Building and programming the RCP firmware onto an nRF52840 Dongle After you set up the nRF Connect SDK, follow the steps in the -[Configuring a radio co-processor](https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/ug_thread_tools.html#configuring-a-radio-co-processor) +[Configuring a radio co-processor](https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/protocols/thread/tools.html#configuring_a_radio_co-processor) section for the nRF52840 Dongle (USB transport). diff --git a/docs/guides/ti/matter-users-guide/enabling_icd_on_ti_devices.md b/docs/guides/ti/matter-users-guide/enabling_icd_on_ti_devices.md index 2603343ac0c26c..50495a601e3fad 100644 --- a/docs/guides/ti/matter-users-guide/enabling_icd_on_ti_devices.md +++ b/docs/guides/ti/matter-users-guide/enabling_icd_on_ti_devices.md @@ -17,6 +17,13 @@ and set the following parameter to true: chip_enable_icd_server = true ``` +To enable LIT ICD behavior, Check In Protocol Support and User Active Mode +Trigger Support, set the following parameter to true: + +``` +chip_enable_icd_lit = true +``` + TI examples have only been tested with the ICD Server configuration. To enable the client configuration, set `chip_enable_icd_client` to true. @@ -43,17 +50,25 @@ mode threshold, and polling intervals can be configured in #define CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL chip::System::Clock::Milliseconds32(100) ``` +To enable LIT ICD behavior, set the polling period to be greater than 15 +seconds, and the active mode threshold to at least 5000 milliseconds. + ## ZAP File Changes Open up the ZAP file (in `examples//-common`) for the example being configured as an ICD. Add the ICD Management Cluster for -Endpoint 0. +Endpoint 0 as either a Server or Client, depending on your configuration. + +To enable LIT ICD behavior, set the FeatureMap to 0x0007 to enable Check-In +Protocol Support, User Active Mode Trigger Support, and Long Idle Time Support. +In addition, enable the UserActiveModeTriggerHint, +UserActiveModeTriggerInstruction, and MaximumCheckInBackOff attributes. -Open up the .matter file (in `examples//-common`) -corresponding to the example and add in the ICDManagement cluster. +After making the desired changes in the zap file, generate the .matter file by +running the following commands: -In addition, each endpoint has a list of clusters that it supports. Add the -ICDManagement cluster to this list. +``` +$ cd /connectedhomeip/scripts/tools/zap +$ ./generate.py examples//-common/-app.zap -The lock-app example's .matter file can be used as a reference. These additions -allow the ICDManagement cluster's callbacks to be accessed. +``` diff --git a/docs/spec_clusters.md b/docs/spec_clusters.md index 05bd215fe583dc..43db0725793a8a 100644 --- a/docs/spec_clusters.md +++ b/docs/spec_clusters.md @@ -125,3 +125,6 @@ This file was **AUTOMATICALLY** generated by `python scripts/generate_spec_xml.p |1296 |0x0510 |Content App Observer | |1872 |0x0750 |Ecosystem Information | |1873 |0x0751 |Commissioner Control | +|1874 |0x0752 |Joint Fabric Datastore Cluster | +|1875 |0x0753 |Joint Fabric PKI | +|2822 |0x0B06 |Meter Identification | diff --git a/docs/testing/fuzz_testing.md b/docs/testing/fuzz_testing.md new file mode 100644 index 00000000000000..b7faeae463a10e --- /dev/null +++ b/docs/testing/fuzz_testing.md @@ -0,0 +1,157 @@ +# Fuzz testing + +- Fuzz Testing involves providing random and unexpected data as input to + functions and methods to uncover bugs, security vulnerabilities, or to + determine if the software crashes. +- it is often continuous; the function under test is called in iteration with + thousands of different inputs. +- Fuzz testing is often done with sanitizers enabled; to catch memory errors + and undefined behavior. +- The most commonly used fuzz testing frameworks for C/C++ are LibFuzzer and + AFL. +- [Google's FuzzTest](https://github.com/google/fuzztest) is a newer framework + that simplifies writing fuzz tests with user-friendly APIs and offers more + control over input generation. It also integrates seamlessly with Google + Test (GTest). + +## `Google's FuzzTest` + +- Google FuzzTest is integrated through Pigweed + [pw_fuzzer](https://pigweed.dev/pw_fuzzer/concepts.html). + +### Use cases + +1. Finding Undefined Behavior with Sanitizers: + + - Running fuzz tests while checking if a crash or other sanitizer-detected + error occurs, allowing detection of subtle memory issues like buffer + overflows and use-after-free errors. + +2. Find Correctness Bugs using Assertions: + - For example, in Round trip Fuzzing, fuzzed input is encoded, decoded, and + then verified to match the original input. An example of this can be found + in src/setup_payload/tests/FuzzBase38PW.cpp. + +- More information can be found in the + [FuzzTest Use Cases](https://github.com/google/fuzztest/blob/main/doc/use-cases.md) + documentation. + +### Writing FuzzTests + +Keywords: Property Function, Input Domain + +- FuzzTests are instantiated through the macro call of `FUZZ_TEST`: + +```cpp +FUZZ_TEST(TLVReader, FuzzTlvReader).WithDomains(fuzztest::Arbitrary>()); +``` + +- The Macro invocation calls the **Property Function**, which is + `FuzzTlvReader` above. + +- The **input domains** define the range and type of inputs that the + **property function** will receive during fuzzing, specified using the + `.WithDomains()` clause. +- In the macro above, FuzzTest will generate a wide range of possible byte + vectors to thoroughly test the `FuzzTlvReader` function. + +#### The Property Function + +```cpp +// The Property Function +void FuzzTlvRead(const std::vector & bytes) +{ + TLVReader reader; + reader.Init(bytes.data(), bytes.size()); + chip::TLV::Utilities::Iterate(reader, FuzzIterator, nullptr); +} +``` + +- The Property Functions must return a `void` +- The function will be run with many different inputs in the same process, + trying to trigger a crash. +- It is possible to include Assertions such as during Round-Trip Fuzzing + +- More Information: + https://github.com/google/fuzztest/blob/main/doc/fuzz-test-macro.md#the-property-function + +#### Input Domains + +- FuzzTest Offers many Input Domains, all of which are part of the + `fuzztest::` namespace. +- All native C++ types can be used through `Arbitrary()`: + +```cpp +FUZZ_TEST(Base38Decoder, FuzzQRCodeSetupPayloadParser).WithDomains(Arbitrary()); +``` + +- using vector domains is one of the most common. It is possible to limit the + size of the input vectors (or any container domain) using `.WithMaxSize()` + or `.WithMinSize()`, as shown below: + +```cpp +FUZZ_TEST(MinimalmDNS, TxtResponderFuzz).WithDomains(Arbitrary>().WithMaxSize(254)); +``` + +- `ElementOf` is particularly useful as it allows us to define a domain by + explicitly enumerating the set of values in it and passing it to FuzzTest + invocation. Example: + +```cpp +auto AnyProtocolID() +{ + return ElementOf({ chip::Protocols::SecureChannel::Id, chip::Protocols::InteractionModel::Id, chip::Protocols::BDX::Id, + chip::Protocols::UserDirectedCommissioning::Id }); +} + +FUZZ_TEST(PayloadDecoder, RunDecodeFuzz).WithDomains(Arbitrary>(), AnyProtocolID(), Arbitrary()); +``` + +- A detailed reference for input domains can be found here: + [FuzzTest Domain Reference](https://github.com/google/fuzztest/blob/main/doc/domains-reference.md#elementof-domains-element-of). + +### Running FuzzTests + +There are several ways to run the tests: + +1. Unit-test mode (where the inputs are only fuzzed for a second): + +```bash +./fuzz-chip-cert-pw +``` + +2. Continuous fuzzing mode; we need to first list the tests, then specify the + FuzzTestCase to run: + +```bash +$ ./fuzz-chip-cert-pw --list_fuzz_tests +[.] Sanitizer coverage enabled. Counter map size: 11134, Cmp map size: 262144 +[*] Fuzz test: ChipCert.ChipCertFuzzer +[*] Fuzz test: ChipCert.DecodeChipCertFuzzer + +$ ./fuzz-chip-cert-pw --fuzz=ChipCert.DecodeChipCertFuzzer +``` + +3. Running all Tests in a TestSuite for a specific time, e.g for 10 minutes + +```bash +#both Fuzz Tests will be run for 10 minutes each +./fuzz-chip-cert-pw --fuzz_for=10m +``` + +4. For Help + +```bash +# FuzzTest related help +./fuzz-chip-cert-pw --helpfull + +# gtest related help +./fuzz-chip-cert-pw --help + +``` + +#### TO ADD: + +- More Information on Test Fixtures (After issues are resolved) +- How to add FuzzTests to the Build System +- More Information on OSS-FUZZ diff --git a/docs/testing/python.md b/docs/testing/python.md index 354490c896c445..ec358b8796403e 100644 --- a/docs/testing/python.md +++ b/docs/testing/python.md @@ -497,6 +497,61 @@ Fabric admin for default controller: second_ctrl = fa.new_fabric_admin.NewController(nodeId=node_id) ``` +## Automating manual steps + +Some test plans have manual steps that require the tester to manually change the +state of the DUT. To run these tests in a CI environment, specific example apps +can be built such that these manual steps can be achieved by Matter or +named-pipe commands. + +In the case that all the manual steps in a test script can be achieved just +using Matter commands, you can check if the `PICS_SDK_CI_ONLY` PICS is set to +decide if the test script should send the required Matter commands to perform +the manual step. + +```python +self.is_ci = self.check_pics("PICS_SDK_CI_ONLY") +``` + +In the case that a test script requires the use of named-pipe commands to +achieve the manual steps, you can use the `write_to_app_pipe(command)` to send +these commands. This command requires the test class to define a `self.app_pipe` +string value with the name of the pipe. This depends on how the app is set up. + +If the name of the pipe is dynamic and based on the app's PID, the following +snippet can be added to the start of tests that use the `write_to_app_pipe` +method. + +```python +app_pid = self.matter_test_config.app_pid +if app_pid != 0: + self.is_ci = true + self.app_pipe = "/tmp/chip__fifo_" + str(app_pid) +``` + +This requires the test to be executed with the `--app-pid` flag set if the +manual steps should be executed by the script. This flag sets the process ID of +the DUT's matter application. + +### Running on a separate machines + +If the DUT and test script are running on different machines, the +`write_to_app_pipe` method can send named-pipe commands to the DUT via ssh. This +requires two additional environment variables: + +- `LINUX_DUT_IP` sets the DUT's IP address +- `LINUX_DUT_UNAME` sets the DUT's ssh username. If not set, this is assumed + to be `root`. + +The `write_to_app_pipe` also requires that ssh-keys are set up to access the DUT +from the machine running the test script without a password. You can follow +these steps to set this up: + +1. If you do not have a key, create one using `ssh-keygen`. +2. Authorize this key on the remote host: run `ssh-copy-id user@ip` once, using + your password. +3. From now on `ssh user@ip` will no longer ask for your password. + ## Other support utilities - `basic_composition_support` @@ -635,9 +690,19 @@ markers must be present. - `test-runner-run//script-args`: Specifies the arguments to be passed to the test script. + - Example: `--storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto` +- `test-runner-run//script-start-delay`: Specifies the number + of seconds to wait before starting the test script. This parameter can be + used to allow the application to initialize itself properly before the test + script will try to commission it (e.g. in case if the application needs to + be commissioned to some other controller first). By default, the delay is 0 + seconds. + + - Example: `10` + This structured format ensures that all necessary configurations are clearly defined and easily understood, allowing for consistent and reliable test execution. diff --git a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter index c35b8b62e24ee6..ef3be8e5f2e630 100644 --- a/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter +++ b/examples/air-purifier-app/air-purifier-common/air-purifier-app.matter @@ -409,14 +409,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -443,7 +439,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both diff --git a/examples/air-purifier-app/air-purifier-common/air-purifier-app.zap b/examples/air-purifier-app/air-purifier-common/air-purifier-app.zap index 9d65016495b691..0ffbbd01e7c139 100644 --- a/examples/air-purifier-app/air-purifier-common/air-purifier-app.zap +++ b/examples/air-purifier-app/air-purifier-common/air-purifier-app.zap @@ -7970,7 +7970,7 @@ "code": 18, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter index 0566f91f67a953..408754950cdf6b 100644 --- a/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter +++ b/examples/air-quality-sensor-app/air-quality-sensor-common/air-quality-sensor-app.matter @@ -409,14 +409,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -443,7 +439,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter index 4180b1eef78e26..cc36d5c6160113 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.matter @@ -811,14 +811,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -845,7 +841,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. */ @@ -2558,7 +2554,7 @@ cluster TimeSynchronization = 56 { Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ cluster Switch = 59 { - revision 1; + revision 2; bitmap Feature : bitmap32 { kLatchingSwitch = 0x1; @@ -2989,6 +2985,16 @@ cluster OvenMode = 73 { revision 1; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kBake = 16384; kConvection = 16385; kGrill = 16386; @@ -3110,6 +3116,16 @@ cluster LaundryWasherMode = 81 { revision 2; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kNormal = 16384; kDelicate = 16385; kHeavy = 16386; @@ -3161,6 +3177,16 @@ cluster RefrigeratorAndTemperatureControlledCabinetMode = 82 { revision 2; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kRapidCool = 16384; kRapidFreeze = 16385; } @@ -3235,9 +3261,19 @@ cluster LaundryWasherControls = 83 { /** Attributes and commands for selecting a mode from a list of supported options. */ cluster RvcRunMode = 84 { - revision 2; + revision 3; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kIdle = 16384; kCleaning = 16385; kMapping = 16386; @@ -3255,7 +3291,7 @@ cluster RvcRunMode = 84 { } bitmap Feature : bitmap32 { - kNoFeatures = 0x0; + kDirectModeChange = 0x10000; } struct ModeTagStruct { @@ -3294,9 +3330,19 @@ cluster RvcRunMode = 84 { /** Attributes and commands for selecting a mode from a list of supported options. */ cluster RvcCleanMode = 85 { - revision 2; + revision 3; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kDeepClean = 16384; kVacuum = 16385; kMop = 16386; @@ -3307,7 +3353,7 @@ cluster RvcCleanMode = 85 { } bitmap Feature : bitmap32 { - kNoFeatures = 0x0; + kDirectModeChange = 0x10000; } struct ModeTagStruct { @@ -3407,6 +3453,16 @@ cluster DishwasherMode = 89 { revision 2; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kNormal = 16384; kHeavy = 16385; kLight = 16386; @@ -3648,6 +3704,16 @@ cluster MicrowaveOvenMode = 94 { revision 1; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kNormal = 16384; kDefrost = 16385; } @@ -3748,6 +3814,10 @@ cluster RvcOperationalState = 97 { revision 1; enum ErrorStateEnum : enum8 { + kNoError = 0; + kUnableToStartOrResume = 1; + kUnableToCompleteOperation = 2; + kCommandInvalidInState = 3; kFailedToFindChargingDock = 64; kStuck = 65; kDustBinMissing = 66; @@ -3759,6 +3829,10 @@ cluster RvcOperationalState = 97 { } enum OperationalStateEnum : enum8 { + kStopped = 0; + kRunning = 1; + kPaused = 2; + kError = 3; kSeekingCharger = 64; kCharging = 65; kDocked = 66; @@ -4907,6 +4981,16 @@ cluster EnergyEvseMode = 157 { revision 1; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kManual = 16384; kTimeOfUse = 16385; kSolarCharging = 16386; @@ -4957,6 +5041,16 @@ cluster WaterHeaterMode = 158 { revision 1; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kOff = 16384; kManual = 16385; kTimed = 16386; @@ -5007,6 +5101,16 @@ provisional cluster DeviceEnergyManagementMode = 159 { revision 1; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kNoOptimization = 16384; kDeviceOptimization = 16385; kLocalOptimization = 16386; @@ -6301,7 +6405,7 @@ cluster RelativeHumidityMeasurement = 1029 { readonly attribute int16u clusterRevision = 65533; } -/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ +/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */ cluster OccupancySensing = 1030 { revision 5; @@ -6339,6 +6443,10 @@ cluster OccupancySensing = 1030 { int16u holdTimeDefault = 2; } + info event OccupancyChanged = 0 { + OccupancyBitmap occupancy = 0; + } + readonly attribute OccupancyBitmap occupancy = 0; readonly attribute OccupancySensorTypeEnum occupancySensorType = 1; readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2; @@ -7303,6 +7411,8 @@ internal cluster UnitTesting = 4294048773 { attribute TestGlobalEnum globalEnum = 51; attribute TestGlobalStruct globalStruct = 52; attribute optional boolean unsupported = 255; + attribute optional int8u readFailureCode = 12288; + attribute optional int32u failureInt32U = 12289; attribute nullable boolean nullableBoolean = 16384; attribute nullable Bitmap8MaskMap nullableBitmap8 = 16385; attribute nullable Bitmap16MaskMap nullableBitmap16 = 16386; @@ -8485,7 +8595,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; callback attribute featureMap; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; handle command ChangeToMode; handle command ChangeToModeResponse; @@ -8499,7 +8609,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; callback attribute featureMap; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; handle command ChangeToMode; handle command ChangeToModeResponse; @@ -9164,10 +9274,10 @@ endpoint 1 { ram attribute colorLoopStartEnhancedHue default = 0x2300; ram attribute colorLoopStoredEnhancedHue default = 0x0000; ram attribute colorCapabilities default = 0x1F; - ram attribute colorTempPhysicalMinMireds default = 0x0000; - ram attribute colorTempPhysicalMaxMireds default = 0xFEFF; + ram attribute colorTempPhysicalMinMireds default = 0x009A; + ram attribute colorTempPhysicalMaxMireds default = 0x01C6; ram attribute coupleColorTempToLevelMinMireds; - persist attribute startUpColorTemperatureMireds; + persist attribute startUpColorTemperatureMireds default = 0x00FA; ram attribute featureMap default = 0x1F; ram attribute clusterRevision default = 7; @@ -9542,6 +9652,8 @@ endpoint 1 { callback attribute clusterErrorBoolean; ram attribute globalEnum; callback attribute globalStruct; + ram attribute readFailureCode default = 1; + callback attribute failureInt32U default = 0; ram attribute nullableBoolean default = false; ram attribute nullableBitmap8 default = 0; ram attribute nullableBitmap16 default = 0; diff --git a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap index 9a736eea56fa30..0140adbbd9a461 100644 --- a/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap +++ b/examples/all-clusters-app/all-clusters-common/all-clusters-app.zap @@ -9648,7 +9648,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -9804,7 +9804,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -13445,7 +13445,7 @@ "code": 0, "mfgCode": null, "side": "server", - "type": "WaterHeaterTypeBitmap", + "type": "WaterHeaterHeatSourceBitmap", "included": 1, "storageOption": "External", "singleton": 0, @@ -13461,7 +13461,7 @@ "code": 1, "mfgCode": null, "side": "server", - "type": "WaterHeaterDemandBitmap", + "type": "WaterHeaterHeatSourceBitmap", "included": 1, "storageOption": "External", "singleton": 0, @@ -17507,7 +17507,7 @@ "code": 5, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "DriftCompensationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -17555,7 +17555,7 @@ "code": 8, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "ColorModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -17571,7 +17571,7 @@ "code": 15, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "OptionsBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -18083,7 +18083,7 @@ "code": 16385, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "EnhancedColorModeEnum", "included": 1, "storageOption": "NVM", "singleton": 0, @@ -18179,7 +18179,7 @@ "code": 16394, "mfgCode": null, "side": "server", - "type": "bitmap16", + "type": "ColorCapabilitiesBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -18200,7 +18200,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x009A", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -18216,7 +18216,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFEFF", + "defaultValue": "0x01C6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -18248,7 +18248,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00FA", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -23327,6 +23327,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "readFailureCode", + "code": 12288, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "failureInt32U", + "code": 12289, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "nullable_boolean", "code": 16384, diff --git a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp index 627709a8c30921..5571834c375646 100644 --- a/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp +++ b/examples/all-clusters-app/all-clusters-common/src/rvc-modes.cpp @@ -16,6 +16,7 @@ * limitations under the License. */ #include +#include #include #include @@ -41,12 +42,15 @@ void RvcRunModeDelegate::HandleChangeToMode(uint8_t NewMode, ModeBase::Commands: { uint8_t currentMode = mInstance->GetCurrentMode(); - // Our business logic states that we can only switch into a running mode from the idle state. - if (NewMode != RvcRunMode::ModeIdle && currentMode != RvcRunMode::ModeIdle) + if (!gRvcRunModeInstance->HasFeature(static_cast(RvcRunMode::Feature::kDirectModeChange))) { - response.status = to_underlying(ModeBase::StatusCode::kInvalidInMode); - response.statusText.SetValue(chip::CharSpan::fromCharString("Change to a running mode is only allowed from idle")); - return; + // Our business logic states that we can only switch into a running mode from the idle state. + if (NewMode != RvcRunMode::ModeIdle && currentMode != RvcRunMode::ModeIdle) + { + response.status = to_underlying(ModeBase::StatusCode::kInvalidInMode); + response.statusText.SetValue(chip::CharSpan::fromCharString("Change to a running mode is only allowed from idle")); + return; + } } auto rvcOpStateInstance = RvcOperationalState::GetRvcOperationalStateInstance(); @@ -123,8 +127,8 @@ void emberAfRvcRunModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. VerifyOrDie(gRvcRunModeDelegate == nullptr && gRvcRunModeInstance == nullptr); gRvcRunModeDelegate = new RvcRunMode::RvcRunModeDelegate; - gRvcRunModeInstance = - new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, chip::to_underlying(RvcRunMode::Feature::kNoFeatures)); + gRvcRunModeInstance = new ModeBase::Instance(gRvcRunModeDelegate, 0x1, RvcRunMode::Id, + chip::to_underlying(RvcRunMode::Feature::kDirectModeChange)); gRvcRunModeInstance->Init(); } @@ -139,14 +143,17 @@ CHIP_ERROR RvcCleanModeDelegate::Init() void RvcCleanModeDelegate::HandleChangeToMode(uint8_t NewMode, ModeBase::Commands::ChangeToModeResponse::Type & response) { - uint8_t rvcRunCurrentMode = gRvcRunModeInstance->GetCurrentMode(); - - if (rvcRunCurrentMode != RvcRunMode::ModeIdle) + if (!gRvcCleanModeInstance->HasFeature(static_cast(RvcCleanMode::Feature::kDirectModeChange))) { - response.status = to_underlying(ModeBase::StatusCode::kInvalidInMode); - response.statusText.SetValue( - chip::CharSpan::fromCharString("Cannot change the cleaning mode when the device is not in idle")); - return; + uint8_t rvcRunCurrentMode = gRvcRunModeInstance->GetCurrentMode(); + + if (rvcRunCurrentMode != RvcRunMode::ModeIdle) + { + response.status = to_underlying(ModeBase::StatusCode::kInvalidInMode); + response.statusText.SetValue( + chip::CharSpan::fromCharString("Cannot change the cleaning mode when the device is not in idle")); + return; + } } response.status = to_underlying(ModeBase::StatusCode::kSuccess); @@ -213,7 +220,7 @@ void emberAfRvcCleanModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(endpointId == 1); // this cluster is only enabled for endpoint 1. VerifyOrDie(gRvcCleanModeDelegate == nullptr && gRvcCleanModeInstance == nullptr); gRvcCleanModeDelegate = new RvcCleanMode::RvcCleanModeDelegate; - gRvcCleanModeInstance = - new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, chip::to_underlying(RvcRunMode::Feature::kNoFeatures)); + gRvcCleanModeInstance = new ModeBase::Instance(gRvcCleanModeDelegate, 0x1, RvcCleanMode::Id, + chip::to_underlying(RvcCleanMode::Feature::kDirectModeChange)); gRvcCleanModeInstance->Init(); } diff --git a/examples/all-clusters-app/ameba/main/chipinterface.cpp b/examples/all-clusters-app/ameba/main/chipinterface.cpp index 99ed719f0fab28..5bf20befc73107 100644 --- a/examples/all-clusters-app/ameba/main/chipinterface.cpp +++ b/examples/all-clusters-app/ameba/main/chipinterface.cpp @@ -23,22 +23,16 @@ #include "DeviceCallbacks.h" #include "Globals.h" #include "LEDWidget.h" -#include "ManualOperationCommand.h" #include "chip_porting.h" #include -#include #include -#include -#include #include #include #include #include -#include -#include #include -#include + #include #include #if CONFIG_ENABLE_AMEBA_CRYPTO @@ -47,11 +41,9 @@ #include #include #include -#include -#include #include + #if CONFIG_ENABLE_AMEBA_TEST_EVENT_TRIGGER -#include #include #endif @@ -76,9 +68,6 @@ constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE; app::Clusters::NetworkCommissioning::Instance sWiFiNetworkCommissioningInstance(kNetworkCommissioningEndpointMain /* Endpoint Id */, &(NetworkCommissioning::AmebaWiFiDriver::GetInstance())); - -app::Clusters::TemperatureControl::AppSupportedTemperatureLevelsDelegate sAppSupportedTemperatureLevelsDelegate; -Clusters::ModeSelect::StaticSupportedModesManager sStaticSupportedModesManager; } // namespace void NetWorkCommissioningInstInit() @@ -180,15 +169,8 @@ static void InitServer(intptr_t context) #if CONFIG_ENABLE_CHIP_SHELL InitBindingHandler(); - InitManualOperation(); -#endif - app::Clusters::TemperatureControl::SetInstance(&sAppSupportedTemperatureLevelsDelegate); - Clusters::ModeSelect::setSupportedModesManager(&sStaticSupportedModesManager); - MatterMicrowaveOvenServerInit(); -#if CONFIG_ENABLE_AMEBA_TEST_EVENT_TRIGGER - static SmokeCOTestEventTriggerHandler sSmokeCOTestEventTriggerHandler; - Server::GetInstance().GetTestEventTriggerDelegate()->AddHandler(&sSmokeCOTestEventTriggerHandler); #endif + chip::Server::GetInstance().GetFabricTable().AddFabricDelegate(&sAmebaObserver); } @@ -231,15 +213,3 @@ bool lowPowerClusterSleep() { return true; } - -using namespace chip::app::Clusters::LaundryWasherControls; -void emberAfLaundryWasherControlsClusterInitCallback(EndpointId endpoint) -{ - LaundryWasherControlsServer::SetDefaultDelegate(endpoint, &LaundryWasherControlDelegate::getLaundryWasherControlDelegate()); -} - -using namespace chip::app::Clusters::LaundryDryerControls; -void emberAfLaundryDryerControlsClusterInitCallback(EndpointId endpoint) -{ - LaundryDryerControlsServer::SetDefaultDelegate(endpoint, &LaundryDryerControlDelegate::getLaundryDryerControlDelegate()); -} diff --git a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn b/examples/all-clusters-app/cc13x4_26x4/BUILD.gn deleted file mode 100644 index bda63caa38dff5..00000000000000 --- a/examples/all-clusters-app/cc13x4_26x4/BUILD.gn +++ /dev/null @@ -1,141 +0,0 @@ -# Copyright (c) 2020 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build_overrides/build.gni") -import("//build_overrides/chip.gni") -import("//build_overrides/openthread.gni") -import("//build_overrides/ti_simplelink_sdk.gni") - -import("${build_root}/config/defaults.gni") - -import("${chip_root}/src/platform/device.gni") - -import("${ti_simplelink_sdk_build_root}/ti_simplelink_executable.gni") -import("${ti_simplelink_sdk_build_root}/ti_simplelink_sdk.gni") - -assert(current_os == "freertos") - -project_dir = "${chip_root}/examples/all-clusters-app/cc13x4_26x4" - -ti_simplelink_sdk("sdk") { - include_dirs = [ "${project_dir}/main/include" ] - public_configs = [ ":all-clusters-app_config" ] -} - -ti_sysconfig("sysconfig") { - sources = [ "${project_dir}/chip.syscfg" ] - - outputs = [ - "ti_radio_config.c", - "ti_radio_config.h", - "ti_drivers_config.c", - "ti_drivers_config.h", - "ti_ble_config.c", - "ti_ble_config.h", - "ti_dmm_application_policy.c", - "ti_dmm_application_policy.h", - ] - - public_configs = [ ":sdk_cc13x4_26x4_dmm_config" ] - - cflags = [ - "-Wno-comment", - "@" + rebase_path("${target_gen_dir}/sysconfig/ti_utils_build_compiler.opt", - root_build_dir), - ] -} - -ti_simplelink_executable("all-clusters-app") { - output_name = "chip-${ti_simplelink_board}-all-clusters-example.out" - - sources = [ - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/bridged-actions-stub.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/concentration-measurement-instances.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/device-energy-management-stub.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/energy-evse-stub.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/fan-stub.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/oven-modes.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/resource-monitoring-delegates.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/smco-stub.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", - "${chip_root}/examples/energy-management-app/energy-management-common/common/src/EnergyTimeUtils.cpp", - "${chip_root}/examples/energy-management-app/energy-management-common/device-energy-management/src/DeviceEnergyManagementDelegateImpl.cpp", - "${chip_root}/examples/energy-management-app/energy-management-common/device-energy-management/src/DeviceEnergyManagementManager.cpp", - "${chip_root}/examples/energy-management-app/energy-management-common/energy-evse/src/ChargingTargetsMemMgr.cpp", - "${chip_root}/examples/energy-management-app/energy-management-common/energy-evse/src/EVSEManufacturerImpl.cpp", - "${chip_root}/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseDelegateImpl.cpp", - "${chip_root}/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseManager.cpp", - "${chip_root}/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseTargetsStore.cpp", - "${chip_root}/examples/energy-management-app/energy-management-common/energy-reporting/src/ElectricalPowerMeasurementDelegate.cpp", - "${chip_root}/examples/providers/DeviceInfoProviderImpl.cpp", - "${chip_root}/src/app/clusters/general-diagnostics-server/GenericFaultTestEventTriggerHandler.cpp", - "${project_dir}/main/AppTask.cpp", - "${project_dir}/main/ClusterManager.cpp", - "${project_dir}/main/Globals.cpp", - "${project_dir}/main/ZclCallbacks.cpp", - "${project_dir}/main/main.cpp", - ] - - public = [ - "${chip_root}/src/platform/cc13xx_26xx/DefaultTestEventTriggerDelegate.h", - ] - - deps = [ - ":sdk", - ":sysconfig", - "${chip_root}/examples/all-clusters-app/all-clusters-common", - "${chip_root}/examples/platform/cc13x4_26x4:cc13x4_26x4-attestation-credentials", - "${chip_root}/src/lib", - "${chip_root}/src/platform/logging:default", - "${chip_root}/third_party/openthread:openthread", - ] - defines = [] - if (custom_factory_data) { - defines += [ "CC13XX_26XX_FACTORY_DATA" ] - } - - if (chip_enable_icd_server) { - defines += [ "TI_ICD_ENABLE_SERVER" ] - } - - include_dirs = [ - "${project_dir}", - "${project_dir}/main", - "${chip_root}/examples/all-clusters-app/all-clusters-common/include", - "${chip_root}/examples/energy-management-app/energy-management-common/common/include", - "${chip_root}/examples/energy-management-app/energy-management-common/device-energy-management/include", - "${chip_root}/examples/energy-management-app/energy-management-common/energy-evse/include", - "${chip_root}/examples/energy-management-app/energy-management-common/energy-reporting/include", - "${chip_root}/examples/providers/", - ] - - cflags = [ - "-Wno-implicit-fallthrough", - "-Wno-sign-compare", - "-Wconversion", - ] - - output_dir = root_out_dir -} - -group("cc13x4_26x4") { - deps = [ ":all-clusters-app" ] -} - -group("default") { - deps = [ ":cc13x4_26x4" ] -} diff --git a/examples/all-clusters-app/cc13x4_26x4/README.md b/examples/all-clusters-app/cc13x4_26x4/README.md deleted file mode 100644 index b90e3933c351e5..00000000000000 --- a/examples/all-clusters-app/cc13x4_26x4/README.md +++ /dev/null @@ -1,310 +0,0 @@ -# Matter All-clusters Example Application - -An example application showing the use of [Matter][matter] on the Texas -Instruments CC13XX_26XX family of Wireless MCUs. - ---- - -- [Matter All Clusters Example Application](#matter-all-clusters-example-application) - - [Introduction](#introduction) - - [Device UI](#device-ui) - - [Building](#building) - - [Preparation](#preparation) - - [Compilation](#compilation) - - [Programming](#programming) - - [Code Composer Studio](#code-composer-studio) - - [UniFlash](#uniflash) - - [Running the Example](#running-the-example) - - [Provisioning](#provisioning) - - [Bluetooth LE Advertising](#bluetooth-le-advertising) - - [Bluetooth LE Rendezvous](#bluetooth-le-rendezvous) - - [TI Support](#ti-support) - ---- - -## Introduction - -The CC13XX_26XX all clusters example application provides the basis to query and -run commands for all currently implemented Matter clusters. This uses the -open-source Matter implementation and the Texas Instruments SimpleLink™ CC13XX -and CC26XX software development kit. - -This example is enabled to build for CC1354P10 devices. - -The all-clusters example is intended to serve both as a means to explore the -workings of Matter, as well as a template for creating real products based on -the Texas Instruments devices. - -## Device UI - -| Action | Functionality | -| ------------------------------------------------ | --------------------------------------------- | -| Left Button (`BTN-1`) Press (more than 1000 ms) | Factory Reset | -| Right Button (`BTN-2`) Press (more than 1000 ms) | BLE Advertisement (Enable/Disable) | -| Red LED Solid Blinking State | Identify Trigger Effect in progress (`EP0/1`) | -| Red LED Off State | No Identify Trigger Effect in progress | -| Green LED Blinking State | Identify Trigger Effect in progress (`EP2`) | -| Green LED Off State | No Identify Trigger Effect in progress | - -## Building - -### Preparation - -Some initial setup is necessary for preparing the build environment. This -section will need to be done when migrating to new versions of the SDK. This -guide assumes that the environment is linux based, and recommends Ubuntu 20.04. - -- Download and install [SysConfig][sysconfig]. This can be done simply with - the following commands. - - ``` - $ cd ~ - $ wget https://dr-download.ti.com/software-development/ide-configuration-compiler-or-debugger/MD-nsUM6f7Vvb/1.18.1.3343/sysconfig-1.18.1_3343-setup.run - $ chmod +x sysconfig-1.18.1_3343-setup.run - $ ./sysconfig-1.18.1_3343-setup.run - ``` - -- Run the bootstrap script to setup the build environment. -- Note, a recursive submodule checkout is required to utilize TI's Openthread - reference commit. -- Note, in order to build the chip-tool and ota-provider examples, a recursive - submodule checkout is required for the linux platform as seen in the command - below. - - ``` - $ cd ~/connectedhomeip - $ source ./scripts/bootstrap.sh - $ ./scripts/checkout_submodules.py --shallow --platform cc13xx_26xx linux --recursive - - ``` - -### Compilation - -It is necessary to activate the environment in every new shell. Then run GN and -Ninja to build the executable. - -- Activate the build environment with the repository activate script. - - ``` - $ cd ~/connectedhomeip - $ source ./scripts/activate.sh - - ``` - -- Run the build to produce a default executable. By default on Linux both the - TI SimpleLink SDK and Sysconfig are located in a `ti` folder in the user's - home directory, and you must provide the absolute path to them. For example - `/home/username/ti/sysconfig_1.18.1`. On Windows the default directory is - `C:\ti`. Take note of this install path, as it will be used in the next - step. - - ``` - $ cd ~/connectedhomeip/examples/all-clusters-minimal-app/cc13x4_26x4 - $ gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\"" - $ ninja -C out/debug - - ``` - - If you would like to define arguments on the command line you may add them - to the GN call. - - ``` - gn gen out/debug --args="ti_sysconfig_root=\"$HOME/ti/sysconfig_1.18.1\" target_defines=[\"CC13X4_26X4_ATTESTATION_CREDENTIALS=1\"] chip_generate_link_map_file=true" - ``` - -## Programming - -Loading the built image onto a LaunchPad is supported through two methods; -Uniflash and Code Composer Studio (CCS). UniFlash can be used to load the image. -Code Composer Studio can be used to load the image and debug the source code. - -### Code Composer Studio - -Programming with CCS will allow for a full debug environment within the IDE. -This is accomplished by creating a target connection to the XDS110 debugger and -starting a project-less debug session. The CCS IDE will attempt to find the -source files on the local machine based on the debug information embedded within -the ELF. CCS may prompt you to find the source code if the image was built on -another machine or the source code is located in a different location than is -recorded within the ELF. - -Download and install [Code Composer Studio][ccs]. - -First open CCS and create a new workspace. - -Create a target connection (sometimes called the CCXML) for your target SoC and -debugger as described in the [Manual Method][ccs_manual_method] section of the -CCS User's Guide. - -Next initiate a project-less debug session as described in the [Manual -Launch][ccs_manual_launch] section of the CCS User's Guide. - -CCS should switch to the debug view described in the [After -Launch][ccs_after_launch] section of the User's Guide. The SoC core will likely -be disconnected and symbols will not be loaded. Connect to the core as described -in the [Debug View][ccs_debug_view] section of the User's Guide. Once the core -is connected, use the `Load` button on the toolbar to load the ELF image. - -Note that the default configuration of the CCXML uses 2-wire cJTAG instead of -the full 4-wire JTAG connection to match the default jumper configuration of the -LaunchPad. - -### UniFlash - -Uniflash is Texas Instrument's uniform programming tool for embedded processors. -This will allow you to erase, flash, and inspect the SoC without setting up a -debugging environment. - -Download and install [UniFlash][uniflash]. - -First open UniFlash. Debug probes connected to the computer will usually be -displayed under the Detected Devices due to the automatic device detection -feature. If your device does not show up in this view it my be disconnected, or -you may have to create a New Configuration. If you already have a CCXML for your -SoC and debug connection you can use that in the section at the bottom. Once -your device is selected, click the `Start` button within the section to launch -the session. - -Select the ELF image to load on the device with the `Browse` button. This file -is placed in the `out/debug` folder by this guide and ends with the `*.out` file -extension. For OTA enabled applications, the standalone image will instead end -with the `*-mcuboot.hex` file extension. This this is a combined image with -application and `MCUBoot` included. The flag to enable or disable the OTA -feature is determined by "chip_enable_ota_requestor" in the application's -args.gni file. - -Finally click the `Load Image` button to load the executable image onto the -device. You should be able to see the log output over the XDS110 User UART. - -Note that programming the device through JTAG sets the Halt-in-Boot flag and may -cause issues when performing a software reset. This flag can be reset by -power-cycling the LaunchPad. - -## Running the Example - -By default the log output will be sent to the Application/User UART. Open a -terminal emulator to that port to see the output with the following options: - -| Parameter | Value | -| ------------ | -------- | -| Speed (baud) | `115200` | -| Data bits | `8` | -| Stop bits | `1` | -| Parity | `None` | -| Flow control | `None` | - -## Running the Example - -Once a device has been flashed with this example, it can now join and operate in -an existing Matter network. The following sections assume that a Matter network -is already active, and has at least one [OpenThread Border -Router][ot_border_router_setup]. - -For insight into what other components are needed to run this example, please -refer to our [Matter Getting Started Guide][matter-e2e-faq]. - -The steps below should be followed to commission the device onto the network and -control it once it has been commissioned. - -**Step 0** - -Set up the CHIP tool by following the instructions outlined in our [Matter -Getting Started Guide][matter-e2e-faq]. - -**Step 1** - -Commission the device onto the Matter network. Run the following command on the -CHIP tool: - -``` - -./chip-tool pairing ble-thread hex: 20202021 3840 - -``` - -Interacting with the application begins by enabling BLE advertisements and then -pairing the device into a Thread network. To provision this example onto a -Matter network, the device must be discoverable over Bluetooth LE. - -On the LaunchPad, press and hold the right button, labeled `BTN-2`, for more -than 1 second. Upon release, the Bluetooth LE advertising will begin. Once the -device is fully provisioned, BLE advertising will stop. - -Once the device has been successfully commissioned, you will see the following -message on the CHIP tool output: - -``` - -[1677648218.370754][39785:39790] CHIP:CTL: Received CommissioningComplete response, errorCode=0 -[1677648218.370821][39785:39790] CHIP:CTL: Successfully finished commissioning step 'SendComplete' - -``` - -An accompanying message will be seen from the device: - -``` - -Commissioning complete, notify platform driver to persist network credentials. - -``` - -**Step 2** - -Send commands to the all-cluster-app. Here are some example commands: - -Basic - -``` -./chip-tool basic read e.g. ./chip-tool basic read product-id 1 0 -``` - -Identify - -``` -./chip-tool identify identify e.g. ./chip-tool identify identify 100 1 1 -``` - -### Provisioning - -Interacting with the application begins by enabling BLE advertisements and then -pairing the device into a Thread network. - -#### Bluetooth LE Advertising - -To provision this example onto a Thread network, the device must be discoverable -over Bluetooth LE. BLE advertising is started by long pressing the right button -(greater than 1000ms), labeled `BTN-2` on the silkscreen. Once the device is -fully provisioned, BLE advertising will stop. - -#### Bluetooth LE Rendezvous - -Pairing this application with `ble-thread` can be done with any of the enabled -[CHIP Controller](../../../src/controller/README.md) applications. Use the -information printed on the console to aide in pairing the device. The controller -application can also be used to control the example app with the cluster -commands. - -## TI Support - -For technical support, please consider creating a post on TI's [E2E forum][e2e]. -Additionally, we welcome any feedback. - -[matter]: https://csa-iot.org/all-solutions/matter/ -[ccs]: https://www.ti.com/tool/CCSTUDIO -[ccs_after_launch]: - https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_debug-main.html?configuration#after-launch -[ccs_debug_view]: - https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_debug-main.html?configuration#debug-view -[ccs_manual_launch]: - https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_debug-main.html?configuration#manual-launch -[ccs_manual_method]: - https://software-dl.ti.com/ccs/esd/documents/users_guide/ccs_debug-main.html?configuration#manual-method -[e2e]: - https://e2e.ti.com/support/wireless-connectivity/zigbee-thread-group/zigbee-and-thread/f/zigbee-thread-forum -[matter-e2e-faq]: - https://e2e.ti.com/support/wireless-connectivity/zigbee-thread-group/zigbee-and-thread/f/zigbee-thread-forum/1082428/faq-cc2652r7-matter----getting-started-guide -[sysconfig]: https://www.ti.com/tool/SYSCONFIG -[ti_thread_dnd]: - https://www.ti.com/wireless-connectivity/thread/design-development.html -[ot_border_router_setup]: https://openthread.io/guides/border-router/build -[uniflash]: https://www.ti.com/tool/download/UNIFLASH diff --git a/examples/all-clusters-app/cc13x4_26x4/args.gni b/examples/all-clusters-app/cc13x4_26x4/args.gni deleted file mode 100644 index 56b7504ebf03f5..00000000000000 --- a/examples/all-clusters-app/cc13x4_26x4/args.gni +++ /dev/null @@ -1,72 +0,0 @@ -# Copyright (c) 2020 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -import("//build_overrides/chip.gni") -import("//build_overrides/freertos.gni") -import("${chip_root}/config/standalone/args.gni") -import("${chip_root}/examples/platform/cc13x4_26x4/args.gni") - -ti_simplelink_sdk_target = get_label_info(":sdk", "label_no_toolchain") -ti_simplelink_sysconfig_target = - get_label_info(":sysconfig", "label_no_toolchain") - -ti_simplelink_board = "LP_EM_CC1354P10_6" - -# Size Optimizations -# use -Os instead of -Og, LWIP release build -optimize_debug_level = "s" -lwip_debug = false - -chip_enable_ota_requestor = true - -openthread_external_platform = - "${chip_root}/third_party/openthread/platforms/ti:libopenthread-ti" - -# When using TI Certified Openthread libs set to ${chip_root}/third_party/openthread/platforms/ti:ot-ti-cert -# For source builds, set to empty string. -chip_openthread_target = - "${chip_root}/third_party/openthread/platforms/ti:ot-ti-cert" - -chip_openthread_ftd = true - -# Disable CHIP Logging -#chip_progress_logging = false -#chip_detail_logging = false -#chip_automation_logging = false - -# BLE options -chip_config_network_layer_ble = true - -# Disable lock tracking, since our FreeRTOS configuration does not set -# INCLUDE_xSemaphoreGetMutexHolder -chip_stack_lock_tracking = "none" - -matter_device_vid = "0xFFF1" -matter_device_pid = "0x8006" -matter_software_ver = "0x0001" -matter_software_ver_str = "1.0.1+1" - -custom_factory_data = true - -# ICD Default configurations -chip_enable_icd_server = false -chip_persist_subscriptions = false -chip_subscription_timeout_resumption = false - -freertos_root = "//third_party/connectedhomeip/third_party/ti_simplelink_sdk/repo_cc13xx_cc26xx/source/third_party/freertos" - -if (chip_openthread_target != "") { - openthread_root = - "//third_party/connectedhomeip/third_party/openthread/ot-ti/openthread" -} diff --git a/examples/all-clusters-app/cc13x4_26x4/chip.syscfg b/examples/all-clusters-app/cc13x4_26x4/chip.syscfg deleted file mode 100644 index 16ce3520e42674..00000000000000 --- a/examples/all-clusters-app/cc13x4_26x4/chip.syscfg +++ /dev/null @@ -1,241 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - - -/* Modules */ -var AESCCM = scripting.addModule("/ti/drivers/AESCCM"); -var AESECB = scripting.addModule("/ti/drivers/AESECB"); -var Button = scripting.addModule("/ti/drivers/apps/Button"); -var LED = scripting.addModule("/ti/drivers/apps/LED"); -var NVS = scripting.addModule("/ti/drivers/NVS"); -var RF = scripting.addModule("/ti/drivers/RF"); -var RFDesign = scripting.addModule("ti/devices/radioconfig/rfdesign"); -var RFCustom = scripting.addModule("/ti/devices/radioconfig/custom"); -var TRNG = scripting.addModule("/ti/drivers/TRNG"); -var SHA2 = scripting.addModule("/ti/drivers/SHA2"); -var UART2 = scripting.addModule("/ti/drivers/UART2"); -var ble = scripting.addModule("/ti/ble5stack/ble"); -var dmm = scripting.addModule("/ti/dmm/dmm"); -var AESCTRDRBG = scripting.addModule("/ti/drivers/AESCTRDRBG"); -var ECDH = scripting.addModule("/ti/drivers/ECDH"); - -/* Instances */ -var AESCCM1 = AESCCM.addInstance(); -var AESECB1 = AESECB.addInstance(); -var AESECB2 = AESECB.addInstance(); -var Button1 = Button.addInstance(); -var Button2 = Button.addInstance(); -var NVS1 = NVS.addInstance(); -var NVS2 = NVS.addInstance(); -var SHA21 = SHA2.addInstance(); -var LED1 = LED.addInstance(); -var LED2 = LED.addInstance(); -var TRNG1 = TRNG.addInstance(); -var TRNG2 = TRNG.addInstance(); -var TRNG3 = TRNG.addInstance(); -var UART2 = UART2.addInstance(); -var AESCTRDRBG1 = AESCTRDRBG.addInstance(); -var ECDH1 = ECDH.addInstance(); - -AESCTRDRBG1.$name = "CONFIG_AESCTRDRBG_0"; - -AESCCM1.$name = "CONFIG_AESCCM0"; - -AESECB1.$name = "CONFIG_AESECB0"; -AESECB2.$name = "CONFIG_AESECB_1"; - -ECDH1.$name = "CONFIG_ECDH0"; - -/* Left Button */ -Button1.$name = "CONFIG_BTN_LEFT"; -Button1.$hardware = system.deviceData.board.components["BTN-1"]; -Button1.gpioPin.$name = "CONFIG_GPIO_BTN1"; -Button1.gpioPin.pull = "Pull Up"; -Button1.gpioPin.interruptTrigger = "Falling Edge"; - -/* Left Button */ -Button2.$name = "CONFIG_BTN_RIGHT"; -Button2.$hardware = system.deviceData.board.components["BTN-2"]; -Button2.gpioPin.$name = "CONFIG_GPIO_BTN2"; -Button2.gpioPin.pull = "Pull Up"; -Button2.gpioPin.interruptTrigger = "Falling Edge"; - -/* ======== CCFG ======== */ -var CCFG = scripting.addModule("/ti/devices/CCFG"); -const ccfgSettings = system.getScript("/ti/common/lprf_ccfg_settings.js").ccfgSettings; -for(var setting in ccfgSettings) -{ - CCFG[setting] = ccfgSettings[setting]; -} - -/* disable CCFG for OTA-able application */ -CCFG.enableCodeGeneration = false; - - -/* NVS */ -NVS1.$name = "CONFIG_NVSINTERNAL"; -NVS1.internalFlash.regionBase = 0xF8800; -NVS1.internalFlash.regionSize = 0x6000; - - -NVS2.$name = "CONFIG_NVSEXTERNAL"; -NVS2.nvsType = "External"; // NVS Region Type -NVS2.$hardware = system.deviceData.board.components.MX25R8035F; - -/* RF */ -/* if an antenna component exists, assign it to the rf instance */ -if (system.deviceData.board && system.deviceData.board.components.RF) { - RF.$hardware = system.deviceData.board.components.RF; -} - -const rfDesignSettings = system.getScript("/ti/common/lprf_rf_design_settings.js").rfDesignSettings; -for(var setting in rfDesignSettings) -{ - RFDesign[setting] = rfDesignSettings[setting]; -} - - - -/* Handling for RF frontend characterization */ -if(RFDesign.rfDesign.match(/LP_CC2652PSIP/)) -{ - RFCustom.ieee = ["ieee154p10"]; - var rfCodeExportConfig = RFCustom.radioConfigieee154p10.codeExportConfig -} -else -{ - RFCustom.ieee = ["ieee154"]; - var rfCodeExportConfig = RFCustom.radioConfigieee154.codeExportConfig -} - -var cmdList = [ - "cmdIeeeTx", - "cmdIeeeRx", - "cmdIeeeCsma", - "cmdIeeeEdScan", - "cmdIeeeRxAck", - "cmdTxTest" -]; - -rfCodeExportConfig.useConst = true; -rfCodeExportConfig.useMulti = true; -rfCodeExportConfig.symGenMethod = "Custom"; - -const deviceId = system.deviceData.deviceId; - -// Add high PA options if present -if(deviceId.match(/CC(265[12]R|2674R|1352R1|1354R)/)) -{ - cmdList.push("cmdRadioSetup"); - rfCodeExportConfig.cmdRadioSetup = "RF_cmdIeeeRadioSetup"; -} -else if(deviceId.match(/CC(265[12]P|2674P|1352P)/)) -{ - cmdList.push("cmdRadioSetupPa"); - rfCodeExportConfig.cmdRadioSetupPa = "RF_cmdIeeeRadioSetup"; - rfCodeExportConfig.paExport = "combined"; -} -else if(deviceId.match(/CC(265[34]|1354)P/)) -{ - cmdList.push("cmdRadioSetupPa"); - rfCodeExportConfig.cmdRadioSetupPa = "RF_cmdIeeeRadioSetup"; - // currently not characterized for high PA -} -else -{ - throw new Error("Could not match platform to any known platform types"); -} - -rfCodeExportConfig.cmdList_ieee_15_4 = cmdList; - -/* Red LED */ -LED1.$name = "CONFIG_LED_RED"; -LED1.$hardware = system.deviceData.board.components.LED_RED; -LED1.gpioPin.$name = "CONFIG_GPIO_RLED"; -LED1.gpioPin.mode = "Output"; - -/* Green LED */ -LED2.$name = "CONFIG_LED_GREEN"; -LED2.$hardware = system.deviceData.board.components.LED_GREEN; -LED2.gpioPin.$name = "CONFIG_GPIO_GLED"; -LED2.gpioPin.mode = "Output"; - -/* Debug UART */ -UART2.$hardware = system.deviceData.board.components.XDS110UART; -UART2.$name = "CONFIG_UART2_DEBUG"; - -/* TRNG */ -TRNG1.$name = "CONFIG_TRNG_0"; -TRNG2.$name = "CONFIG_TRNG_THREAD"; -TRNG3.$name = "CONFIG_TRNG_APP"; - -/* BLE */ -ble.addressMode = "ADDRMODE_RP_WITH_PUBLIC_ID"; -ble.maxConnNum = 1; -ble.numOfAdvSets = 1; -ble.lockProject = true; -ble.oneLibSizeOpt = true; -ble.maxPDUSize = 255; -ble.radioConfig.codeExportConfig.$name = "ti_devices_radioconfig_code_export_param1"; -ble.connUpdateParamsPeripheral.$name = "ti_ble5stack_general_ble_conn_update_params0"; -ble.connUpdateParamsPeripheral.reqMinConnInt = 30; -ble.connUpdateParamsPeripheral.reqMaxConnInt = 50; - -ble.advSet1.$name = "ti_ble5stack_broadcaster_advertisement_set0"; -ble.advSet1.advParam1.$name = "ti_ble5stack_broadcaster_advertisement_params0"; - -ble.rfDesign = "LP_EM_CC1354P10_6"; - -ble.thorPg = 2; -/* DMM */ -dmm.project = "ti_thread_thermostat_remote_display"; -dmm.stackRoles = ["blePeripheral","threadFTD"]; -dmm.lockStackRoles = true; -dmm.numApplicationStates = 10; -dmm.applicationState0 = "ANY"; -dmm.applicationState1 = "DMMPOLICY_BLE_IDLE"; -dmm.applicationState2 = "DMMPOLICY_BLE_ADV"; -dmm.applicationState3 = "DMMPOLICY_BLE_CONNECTING"; -dmm.applicationState4 = "DMMPOLICY_BLE_HIGH_BANDWIDTH"; -dmm.applicationState5 = "DMMPOLICY_BLE_CONNECTED"; -dmm.applicationState6 = "DMMPOLICY_BLE_OAD"; -dmm.applicationState7 = "DMMPOLICY_THREAD_IDLE"; -dmm.applicationState8 = "DMMPOLICY_THREAD_LINK_EST"; -dmm.applicationState9 = "DMMPOLICY_THREAD_DATA"; -dmm.policyArray.create(4); -dmm.policyArray[0].$name = "ti_dmm_policy_dmm_policy0"; -dmm.policyArray[0].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble0"; -dmm.policyArray[0].blePeripheral.applicationStates = ["applicationState6"]; -dmm.policyArray[0].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread0"; -dmm.policyArray[0].threadFTD.pause = "DMMPOLICY_PAUSED"; -dmm.policyArray[1].$name = "ti_dmm_policy_dmm_policy1"; -dmm.policyArray[1].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble1"; -dmm.policyArray[1].blePeripheral.applicationStates = ["applicationState3","applicationState4"]; -dmm.policyArray[1].blePeripheral.weight = 25; -dmm.policyArray[1].blePeripheral.appliedActivity = ["DMMPOLICY_APPLIED_ACTIVITY_BLE_CONNECTION"]; -dmm.policyArray[1].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread1"; -dmm.policyArray[2].$name = "ti_dmm_policy_dmm_policy2"; -dmm.policyArray[2].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble2"; -dmm.policyArray[2].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread2"; -dmm.policyArray[2].threadFTD.weight = 30; -dmm.policyArray[2].threadFTD.applicationStates = ["applicationState8"]; -dmm.policyArray[2].threadFTD.appliedActivity = ["DMMPOLICY_APPLIED_ACTIVITY_ALL"]; -dmm.policyArray[3].$name = "ti_dmm_policy_dmm_policy3"; -dmm.policyArray[3].blePeripheral.$name = "ti_dmm_policy_stack_dmm_stack_ble3"; -dmm.policyArray[3].threadFTD.$name = "ti_dmm_policy_stack_dmm_stack_thread3"; -dmm.policyArray[3].threadFTD.weight = 1; diff --git a/examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp b/examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp deleted file mode 100644 index c9a54347657c3d..00000000000000 --- a/examples/all-clusters-app/cc13x4_26x4/main/AppTask.cpp +++ /dev/null @@ -1,527 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "AppTask.h" -#include "AppConfig.h" -#include "AppEvent.h" -#include - -#include "FreeRTOS.h" -#include "Globals.h" -#include -#include -#include - -#include -#include - -#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR -#include -#include -#include -#include -#include -#endif -#include -#include - -#if AUTO_PRINT_METRICS -// #include -#endif -#include - -#include -#include -#include - -#include -#include -#include - -/* syscfg */ -#include - -#define APP_TASK_STACK_SIZE (5000) -#define APP_TASK_PRIORITY 4 -#define APP_EVENT_QUEUE_SIZE 10 -#define BUTTON_ENABLE 1 - -#define OTAREQUESTOR_INIT_TIMER_DELAY_MS 10000 - -using namespace ::chip; -using namespace ::chip::Credentials; -using namespace ::chip::DeviceLayer; - -static TaskHandle_t sAppTaskHandle; -static QueueHandle_t sAppEventQueue; -static Button_Handle sAppLeftHandle; -static Button_Handle sAppRightHandle; -static DeviceInfoProviderImpl sExampleDeviceInfoProvider; - -AppTask AppTask::sAppTask; -app::Clusters::ModeSelect::StaticSupportedModesManager sStaticSupportedModesManager; - -constexpr EndpointId kNetworkCommissioningEndpointSecondary = 0xFFFE; - -#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR -void StartTimer(uint32_t aTimeoutMs); -void CancelTimer(void); -#endif - -uint8_t sTestEventTriggerEnableKey[TestEventTriggerDelegate::kEnableKeyLength] = { 0x00, 0x11, 0x22, 0x33, 0x44, 0x55, 0x66, 0x77, - 0x88, 0x99, 0xaa, 0xbb, 0xcc, 0xdd, 0xee, 0xff }; - -#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR -static DefaultOTARequestor sRequestorCore; -static DefaultOTARequestorStorage sRequestorStorage; -static DefaultOTARequestorDriver sRequestorUser; -static BDXDownloader sDownloader; -static OTAImageProcessorImpl sImageProcessor; - -void InitializeOTARequestor(void) -{ - // Initialize and interconnect the Requestor and Image Processor objects - SetRequestorInstance(&sRequestorCore); - - sRequestorStorage.Init(Server::GetInstance().GetPersistentStorage()); - sRequestorCore.Init(Server::GetInstance(), sRequestorStorage, sRequestorUser, sDownloader); - sImageProcessor.SetOTADownloader(&sDownloader); - sDownloader.SetImageProcessorDelegate(&sImageProcessor); - sRequestorUser.Init(&sRequestorCore, &sImageProcessor); -} - -TimerHandle_t sOTAInitTimer = 0; -#endif - -// The OTA Init Timer is only started upon the first Thread State Change -// detected if the device is already on a Thread Network, or during the AppTask -// Init sequence if the device is not yet on a Thread Network. Once the timer -// has been started once, it does not need to be started again so the flag will -// be set to false. -bool isAppStarting = true; - -#ifdef AUTO_PRINT_METRICS -static void printMetrics(void) -{ - chip::DeviceLayer::ThreadMetrics *threadMetricsOut, *currThread; - uint64_t heapFree, heapUsed; - - DiagnosticDataProviderImpl::GetDefaultInstance().GetCurrentHeapUsed(heapUsed); - DiagnosticDataProviderImpl::GetDefaultInstance().GetCurrentHeapFree(heapFree); - DiagnosticDataProviderImpl::GetDefaultInstance().GetThreadMetrics(&threadMetricsOut); - - PLAT_LOG("Heap Metrics\n Heap Free: %d Heap Used: %d", (uint32_t) heapFree, (uint32_t) heapUsed); - - PLAT_LOG("Thread Metrics\n"); - - currThread = threadMetricsOut; - while (currThread) - { - PLAT_LOG("Task Name: %s ID: %d Stack Free Min: %d", currThread->name, (uint32_t) currThread->id, - (uint32_t) currThread->stackFreeMinimum); - - currThread = currThread->Next; - } - - DiagnosticDataProviderImpl::GetDefaultInstance().ReleaseThreadMetrics(threadMetricsOut); -} -#endif - -void DeviceEventCallback(const ChipDeviceEvent * event, intptr_t arg) -{ - switch (event->Type) - { - case DeviceEventType::kCHIPoBLEConnectionEstablished: - PLAT_LOG("CHIPoBLE connection established"); - break; - - case DeviceEventType::kCHIPoBLEConnectionClosed: - PLAT_LOG("CHIPoBLE disconnected"); - break; - - case DeviceEventType::kCommissioningComplete: - PLAT_LOG("Commissioning complete"); - break; - case DeviceEventType::kThreadStateChange: - PLAT_LOG("Thread State Change"); - bool isThreadAttached = ThreadStackMgrImpl().IsThreadAttached(); - - if (isThreadAttached) - { - PLAT_LOG("Device is on the Thread Network"); -#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR - if (isAppStarting) - { - StartTimer(OTAREQUESTOR_INIT_TIMER_DELAY_MS); - isAppStarting = false; - } -#endif - } - break; - } - -#ifdef AUTO_PRINT_METRICS - printMetrics(); -#endif -} - -#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR -void OTAInitTimerEventHandler(TimerHandle_t xTimer) -{ - InitializeOTARequestor(); -} -#endif - -int AppTask::StartAppTask() -{ - int ret = 0; - - sAppEventQueue = xQueueCreate(APP_EVENT_QUEUE_SIZE, sizeof(AppEvent)); - if (sAppEventQueue == NULL) - { - PLAT_LOG("Failed to allocate app event queue"); - while (1) - ; - } - - // Start App task. - if (xTaskCreate(AppTaskMain, "APP", APP_TASK_STACK_SIZE / sizeof(StackType_t), NULL, APP_TASK_PRIORITY, &sAppTaskHandle) != - pdPASS) - { - PLAT_LOG("Failed to create app task"); - while (1) - ; - } - return ret; -} - -int AppTask::Init() -{ - cc13xx_26xxLogInit(); - - uiInit(); - - // Init Chip memory management before the stack - Platform::MemoryInit(); - - PLAT_LOG("Software Version: %d", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION); - PLAT_LOG("Software Version String: %s", CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING); - - CHIP_ERROR ret = PlatformMgr().InitChipStack(); - if (ret != CHIP_NO_ERROR) - { - PLAT_LOG("PlatformMgr().InitChipStack() failed"); - while (1) - ; - } - -#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR - // Create FreeRTOS sw timer for OTA timer. - sOTAInitTimer = xTimerCreate("OTAInitTmr", // Just a text name, not used by the RTOS kernel - OTAREQUESTOR_INIT_TIMER_DELAY_MS, // timer period (mS) - false, // no timer reload (==one-shot) - (void *) this, // init timer id = light obj context - OTAInitTimerEventHandler // timer callback handler - ); - - if (sOTAInitTimer == NULL) - { - PLAT_LOG("sOTAInitTimer timer create failed"); - } - else - { - PLAT_LOG("sOTAInitTimer timer created successfully "); - } -#endif - - ret = ThreadStackMgr().InitThreadStack(); - if (ret != CHIP_NO_ERROR) - { - PLAT_LOG("ThreadStackMgr().InitThreadStack() failed"); - while (1) - ; - } - -#if CHIP_DEVICE_CONFIG_THREAD_FTD - ret = ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_Router); -#elif CHIP_CONFIG_ENABLE_ICD_SERVER - ret = ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_SleepyEndDevice); -#else - ret = ConnectivityMgr().SetThreadDeviceType(ConnectivityManager::kThreadDeviceType_MinimalEndDevice); -#endif - - if (ret != CHIP_NO_ERROR) - { - PLAT_LOG("ConnectivityMgr().SetThreadDeviceType() failed"); - while (1) - ; - } - - ret = ThreadStackMgrImpl().StartThreadTask(); - if (ret != CHIP_NO_ERROR) - { - PLAT_LOG("ThreadStackMgr().StartThreadTask() failed"); - while (1) - ; - } - -// Initialize device attestation config -#ifdef CC13X4_26X4_ATTESTATION_CREDENTIALS -#ifdef CC13XX_26XX_FACTORY_DATA - SetDeviceInstanceInfoProvider(&mFactoryDataProvider); - SetDeviceAttestationCredentialsProvider(&mFactoryDataProvider); - SetCommissionableDataProvider(&mFactoryDataProvider); -#else - SetDeviceAttestationCredentialsProvider(CC13X4_26X4::GetCC13X4_26X4DacProvider()); -#endif -#else - SetDeviceAttestationCredentialsProvider(Examples::GetExampleDACProvider()); -#endif - - // Init ZCL Data Model and start server - PLAT_LOG("Initialize Server"); - static chip::CommonCaseDeviceServerInitParams initParams; - static DefaultTestEventTriggerDelegate sTestEventTriggerDelegate{ ByteSpan(sTestEventTriggerEnableKey) }; - initParams.testEventTriggerDelegate = &sTestEventTriggerDelegate; - - (void) initParams.InitializeStaticResourcesBeforeServerInit(); - - // Initialize info provider - sExampleDeviceInfoProvider.SetStorageDelegate(initParams.persistentStorageDelegate); - SetDeviceInfoProvider(&sExampleDeviceInfoProvider); - - chip::Server::GetInstance().Init(initParams); - - ret = PlatformMgr().StartEventLoopTask(); - if (ret != CHIP_NO_ERROR) - { - PLAT_LOG("PlatformMgr().StartEventLoopTask() failed"); - while (1) - ; - } - - ConfigurationMgr().LogDeviceConfig(); - - // We only have network commissioning on endpoint 0. - emberAfEndpointEnableDisable(kNetworkCommissioningEndpointSecondary, false); - - // Register a function to receive events from the CHIP device layer. Note that calls to - // this function will happen on the CHIP event loop thread, not the app_main thread. - PlatformMgr().AddEventHandler(DeviceEventCallback, reinterpret_cast(nullptr)); - - bool isThreadEnabled = ThreadStackMgrImpl().IsThreadEnabled(); - if (!isThreadEnabled && isAppStarting) - { -#if CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR - PLAT_LOG("Thread is Disabled, enable OTA Requestor"); - StartTimer(OTAREQUESTOR_INIT_TIMER_DELAY_MS); - isAppStarting = false; -#endif - } - // QR code will be used with CHIP Tool - PrintOnboardingCodes(RendezvousInformationFlags(RendezvousInformationFlag::kBLE)); - - app::Clusters::ModeSelect::setSupportedModesManager(&sStaticSupportedModesManager); - return 0; -} - -void AppTask::AppTaskMain(void * pvParameter) -{ - AppEvent event; - - sAppTask.Init(); - - while (1) - { - /* Task pend until we have stuff to do */ - if (xQueueReceive(sAppEventQueue, &event, portMAX_DELAY) == pdTRUE) - { - sAppTask.DispatchEvent(&event); - } - } -} - -void StartTimer(uint32_t aTimeoutMs) -{ - PLAT_LOG("Start OTA Init Timer") - if (xTimerIsTimerActive(sOTAInitTimer)) - { - PLAT_LOG("app timer already started!"); - CancelTimer(); - } - - // timer is not active, change its period to required value (== restart). - // FreeRTOS- Block for a maximum of 100 ticks if the change period command - // cannot immediately be sent to the timer command queue. - if (xTimerChangePeriod(sOTAInitTimer, pdMS_TO_TICKS(aTimeoutMs), 100) != pdPASS) - { - PLAT_LOG("sOTAInitTimer timer start() failed"); - } -} - -void CancelTimer(void) -{ - if (xTimerStop(sOTAInitTimer, 0) == pdFAIL) - { - PLAT_LOG("sOTAInitTimer stop() failed"); - } -} - -void AppTask::PostEvent(const AppEvent * aEvent) -{ - if (xQueueSend(sAppEventQueue, aEvent, 0) != pdPASS) - { - /* Failed to post the message */ - } -} - -void AppTask::DispatchEvent(AppEvent * aEvent) -{ - switch (aEvent->Type) - { - case AppEvent::kEventType_ButtonLeft: - if (AppEvent::kAppEventButtonType_Clicked == aEvent->ButtonEvent.Type) - { - } - else if (AppEvent::kAppEventButtonType_LongClicked == aEvent->ButtonEvent.Type) - { - chip::Server::GetInstance().ScheduleFactoryReset(); - } - break; - - case AppEvent::kEventType_ButtonRight: - if (AppEvent::kAppEventButtonType_Clicked == aEvent->ButtonEvent.Type) - { - } - else if (AppEvent::kAppEventButtonType_LongClicked == aEvent->ButtonEvent.Type) - { - // Enable BLE advertisements - if (!ConnectivityMgr().IsBLEAdvertisingEnabled()) - { - if (Server::GetInstance().GetCommissioningWindowManager().OpenBasicCommissioningWindow() == CHIP_NO_ERROR) - { - PLAT_LOG("Enabled BLE Advertisements"); - } - else - { - PLAT_LOG("OpenBasicCommissioningWindow() failed"); - } - } - else - { - // Disable BLE advertisements - ConnectivityMgr().SetBLEAdvertisingEnabled(false); - PLAT_LOG("Disabled BLE Advertisements"); - } - } - break; - - case AppEvent::kEventType_AppEvent: - if (NULL != aEvent->Handler) - { - aEvent->Handler(aEvent); - } - break; - - case AppEvent::kEventType_None: - default: - break; - } -} - -#if (BUTTON_ENABLE == 1) -void AppTask::ButtonLeftEventHandler(Button_Handle handle, Button_EventMask events) -{ - AppEvent event; - event.Type = AppEvent::kEventType_ButtonLeft; - - if (events & Button_EV_CLICKED) - { - event.ButtonEvent.Type = AppEvent::kAppEventButtonType_Clicked; - } - else if (events & Button_EV_LONGCLICKED) - { - event.ButtonEvent.Type = AppEvent::kAppEventButtonType_LongClicked; - } - // button callbacks are in ISR context - if (xQueueSendFromISR(sAppEventQueue, &event, NULL) != pdPASS) - { - /* Failed to post the message */ - } -} - -void AppTask::ButtonRightEventHandler(Button_Handle handle, Button_EventMask events) -{ - AppEvent event; - event.Type = AppEvent::kEventType_ButtonRight; - - if (events & Button_EV_CLICKED) - { - event.ButtonEvent.Type = AppEvent::kAppEventButtonType_Clicked; - } - else if (events & Button_EV_LONGCLICKED) - { - event.ButtonEvent.Type = AppEvent::kAppEventButtonType_LongClicked; - } - // button callbacks are in ISR context - if (xQueueSendFromISR(sAppEventQueue, &event, NULL) != pdPASS) - { - /* Failed to post the message */ - } -} -#endif // BUTTON_ENABLE - -void AppTask::uiInit(void) -{ -#if (LED_ENABLE == 1) - - LED_Params ledParams; - - // Initialize LEDs - PLAT_LOG("Initialize LEDs"); - LED_init(); - - LED_Params_init(&ledParams); // default PWM LED - sAppRedHandle = LED_open(CONFIG_LED_RED, &ledParams); - LED_setOff(sAppRedHandle); - - LED_Params_init(&ledParams); // default PWM LED - sAppGreenHandle = LED_open(CONFIG_LED_GREEN, &ledParams); - LED_setOff(sAppGreenHandle); -#endif // LED ENABLE - -#if (BUTTON_ENABLE == 1) - Button_Params buttonParams; - - // Initialize buttons - PLAT_LOG("Initialize buttons"); - Button_init(); - - Button_Params_init(&buttonParams); - buttonParams.buttonEventMask = Button_EV_CLICKED | Button_EV_LONGCLICKED; - buttonParams.longPressDuration = 1000U; // ms - sAppLeftHandle = Button_open(CONFIG_BTN_LEFT, &buttonParams); - Button_setCallback(sAppLeftHandle, ButtonLeftEventHandler); - - Button_Params_init(&buttonParams); - buttonParams.buttonEventMask = Button_EV_CLICKED | Button_EV_LONGCLICKED; - buttonParams.longPressDuration = 1000U; // ms - sAppRightHandle = Button_open(CONFIG_BTN_RIGHT, &buttonParams); - Button_setCallback(sAppRightHandle, ButtonRightEventHandler); -#endif // BUTTON ENABLE -} diff --git a/examples/all-clusters-app/cc13x4_26x4/main/ClusterManager.cpp b/examples/all-clusters-app/cc13x4_26x4/main/ClusterManager.cpp deleted file mode 100644 index bf5176fc060ae9..00000000000000 --- a/examples/all-clusters-app/cc13x4_26x4/main/ClusterManager.cpp +++ /dev/null @@ -1,177 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ -#include "ClusterManager.h" -#include "Globals.h" -#include -#include -#include -#include -#include - -#ifdef AUTO_PRINT_METRICS -#include -#endif - -using namespace ::chip; -using namespace ::chip::app; -using namespace ::chip::Inet; -using namespace ::chip::System; -using namespace ::chip::DeviceLayer; - -constexpr uint32_t kIdentifyTimerDelayMS = 250; -constexpr uint32_t kIdentifyTimerDelayPerSec = 4; -ClusterManager ClusterManager::sCluster; - -#define ENDPOINT_ID_0 (0) -#define ENDPOINT_ID_1 (1) -#define ENDPOINT_ID_2 (2) - -void OnIdentifyTriggerEffect(Identify * identify) -{ - switch (identify->mCurrentEffectIdentifier) - { - case Clusters::Identify::EffectIdentifierEnum::kBlink: - PLAT_LOG("Clusters::Identify::EffectIdentifierEnum::kBlink"); - break; - case Clusters::Identify::EffectIdentifierEnum::kBreathe: - PLAT_LOG("Clusters::Identify::EffectIdentifierEnum::kBreathe"); - break; - case Clusters::Identify::EffectIdentifierEnum::kOkay: - PLAT_LOG("Clusters::Identify::EffectIdentifierEnum::kOkay"); - break; - case Clusters::Identify::EffectIdentifierEnum::kChannelChange: - PLAT_LOG("Clusters::Identify::EffectIdentifierEnum::kChannelChange"); - break; - default: - PLAT_LOG("No identifier effect"); - break; - } - return; -} - -Identify gIdentify0 = { - chip::EndpointId{ 0 }, - [](Identify *) { PLAT_LOG("onIdentifyStart"); }, - [](Identify *) { PLAT_LOG("onIdentifyStop"); }, - Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, - OnIdentifyTriggerEffect, -}; - -Identify gIdentify1 = { - chip::EndpointId{ 1 }, - [](Identify *) { PLAT_LOG("onIdentifyStart"); }, - [](Identify *) { PLAT_LOG("onIdentifyStop"); }, - Clusters::Identify::IdentifyTypeEnum::kVisibleIndicator, - OnIdentifyTriggerEffect, -}; - -void ClusterManager::OnOnOffPostAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, uint8_t * value) -{ - using namespace app::Clusters::OnOff::Attributes; - VerifyOrExit(attributeId == OnOff::Id, PLAT_LOG("Unhandled Attribute ID: '0x%04x", attributeId)); - VerifyOrExit(endpointId == ENDPOINT_ID_1 || endpointId == ENDPOINT_ID_2, - PLAT_LOG("Unexpected EndPoint ID: `0x%02x'", endpointId)); - - // At this point we can assume that value points to a bool value. - mEndpointOnOffState[endpointId - 1] = *value; - endpointId == ENDPOINT_ID_1 ? LED_write(sAppGreenHandle, *value) : LED_write(sAppRedHandle, *value); - -exit: - return; -} - -void ClusterManager::OnLevelControlAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, uint8_t * value) -{ - using namespace app::Clusters::LevelControl::Attributes; - bool onOffState = mEndpointOnOffState[endpointId - 1]; - uint8_t brightness = onOffState ? *value : 0; - - VerifyOrExit(brightness > 0, PLAT_LOG("Brightness set to 0, ignoring")); - VerifyOrExit(attributeId == CurrentLevel::Id, PLAT_LOG("Unhandled Attribute ID: '0x%04x", attributeId)); - VerifyOrExit(endpointId == ENDPOINT_ID_1 || endpointId == ENDPOINT_ID_2, - PLAT_LOG("Unexpected EndPoint ID: `0x%02x'", endpointId)); - - if (brightness > LED_BRIGHTNESS_MAX) - { - brightness = LED_BRIGHTNESS_MAX; - } - - endpointId == ENDPOINT_ID_1 ? LED_setOn(sAppGreenHandle, brightness) : LED_setOn(sAppRedHandle, brightness); - -exit: - return; -} - -void ClusterManager::OnColorControlAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, uint8_t * value) -{ - using namespace app::Clusters::ColorControl::Attributes; - - VerifyOrExit(attributeId == CurrentHue::Id || attributeId == CurrentSaturation::Id, - PLAT_LOG("Unhandled AttributeId ID: '0x%04x", attributeId)); - VerifyOrExit(endpointId == ENDPOINT_ID_1 || endpointId == ENDPOINT_ID_2, - PLAT_LOG("Unexpected EndPoint ID: `0x%02x'", endpointId)); - - if (endpointId == ENDPOINT_ID_1) - { - uint8_t hue, saturation; - if (attributeId == CurrentHue::Id) - { - hue = *value; - /* Read Current Saturation value when Attribute change callback for HUE Attribute */ - CurrentSaturation::Get(endpointId, &saturation); - } - else - { - saturation = *value; - /* Read Current Hue value when Attribute change callback for SATURATION Attribute */ - CurrentHue::Get(endpointId, &hue); - } - PLAT_LOG("Color Control triggered: Hue: %d Saturation: %d", hue, saturation); - } -exit: - return; -} - -void ClusterManager::OnIdentifyPostAttributeChangeCallback(EndpointId endpointId, AttributeId attributeId, uint16_t size, - uint8_t * value) -{ - if (attributeId == app::Clusters::Identify::Attributes::IdentifyTime::Id && size == 2) - { - uint16_t identifyTime; - memcpy(&identifyTime, value, size); - if (identifyTime) - { - // Currently we have no separate indicator LEDs on each endpoints. - // We are using LED1 for endpoint 0,1 and LED2 for endpoint 2 - if (endpointId == ENDPOINT_ID_2) - { - LED_startBlinking(sAppGreenHandle, kIdentifyTimerDelayMS, identifyTime * kIdentifyTimerDelayPerSec); - } - else - { - LED_startBlinking(sAppRedHandle, kIdentifyTimerDelayMS, identifyTime * kIdentifyTimerDelayPerSec); - } - } - else - { - bool onOffState; - endpointId == ENDPOINT_ID_0 ? onOffState = mEndpointOnOffState[0] : onOffState = mEndpointOnOffState[endpointId - 1]; - endpointId == ENDPOINT_ID_2 ? LED_write(sAppRedHandle, onOffState) : LED_write(sAppGreenHandle, onOffState); - } - } -} diff --git a/examples/all-clusters-app/cc13x4_26x4/main/ZclCallbacks.cpp b/examples/all-clusters-app/cc13x4_26x4/main/ZclCallbacks.cpp deleted file mode 100644 index b21e2ad4c1b9f0..00000000000000 --- a/examples/all-clusters-app/cc13x4_26x4/main/ZclCallbacks.cpp +++ /dev/null @@ -1,81 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * This file implements the handler for data model messages. - */ - -#include "AppConfig.h" -#include "Globals.h" -#include - -#include "ClusterManager.h" - -#include -#include -#include -#include -#include - -using namespace ::chip; -using namespace ::chip::app::Clusters; - -void MatterPostAttributeChangeCallback(const chip::app::ConcreteAttributePath & attributePath, uint8_t type, uint16_t size, - uint8_t * value) -{ - EndpointId endpoint = attributePath.mEndpointId; - ClusterId clusterId = attributePath.mClusterId; - AttributeId attributeId = attributePath.mAttributeId; - PLAT_LOG("MatterPostAttributeChangeCallback - Cluster ID: " ChipLogFormatMEI - ", EndPoint ID: '0x%02x', Attribute ID: " ChipLogFormatMEI, - ChipLogValueMEI(clusterId), endpoint, ChipLogValueMEI(attributeId)); - - switch (clusterId) - { - case OnOff::Id: - ClusterMgr().OnOnOffPostAttributeChangeCallback(endpoint, attributeId, value); - break; - - case Identify::Id: - ClusterMgr().OnIdentifyPostAttributeChangeCallback(endpoint, attributeId, size, value); - break; - - case LevelControl::Id: - ClusterMgr().OnLevelControlAttributeChangeCallback(endpoint, attributeId, value); - break; - - case ColorControl::Id: - ClusterMgr().OnColorControlAttributeChangeCallback(endpoint, attributeId, value); - break; - default: - PLAT_LOG("Unhandled cluster ID: " ChipLogFormatMEI, ChipLogValueMEI(clusterId)); - break; - } -} -/** @brief OnOff Cluster Init - * - * This function is called when a specific cluster is initialized. It gives the - * application an opportunity to take care of cluster initialization procedures. - * It is called exactly once for each endpoint where cluster is present. - * - * @param endpoint Ver.: always - */ -void emberAfOnOffClusterInitCallback(EndpointId endpoint) -{ - // TODO: implement any additional Cluster Server init actions -} diff --git a/examples/all-clusters-app/cc13x4_26x4/main/include/AppEvent.h b/examples/all-clusters-app/cc13x4_26x4/main/include/AppEvent.h deleted file mode 100644 index 1d1efd369495b6..00000000000000 --- a/examples/all-clusters-app/cc13x4_26x4/main/include/AppEvent.h +++ /dev/null @@ -1,60 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef APP_EVENT_H -#define APP_EVENT_H - -struct AppEvent; -typedef void (*EventHandler)(AppEvent *); - -struct AppEvent -{ - enum AppEventType - { - kEventType_None = 0, - kEventType_ButtonLeft, - kEventType_ButtonRight, - kEventType_AppEvent, - }; - - enum AppEventButtonType - { - kAppEventButtonType_None = 0, - kAppEventButtonType_Clicked, - kAppEventButtonType_LongClicked, - }; - - enum AppEventType Type; - - union - { - struct - { - enum AppEventButtonType Type; - } ButtonEvent; - - struct - { - void * Context; - } BoltLockEvent; - }; - - EventHandler Handler; -}; - -#endif // APP_EVENT_H diff --git a/examples/all-clusters-app/cc13x4_26x4/main/include/AppTask.h b/examples/all-clusters-app/cc13x4_26x4/main/include/AppTask.h deleted file mode 100644 index 55297d715d95ca..00000000000000 --- a/examples/all-clusters-app/cc13x4_26x4/main/include/AppTask.h +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef APP_TASK_H -#define APP_TASK_H - -#include -#include - -#include "FreeRTOS.h" -#include "semphr.h" -#include "task.h" - -#include "AppEvent.h" - -#include - -#ifdef CC13XX_26XX_FACTORY_DATA -#include -#endif - -class AppTask -{ -public: - int StartAppTask(); - static void AppTaskMain(void * pvParameter); - - void PostEvent(const AppEvent * event); - -private: - friend AppTask & GetAppTask(void); - - int Init(); - - void DispatchEvent(AppEvent * event); - void uiInit(); - - static void ButtonLeftEventHandler(Button_Handle handle, Button_EventMask events); - static void ButtonRightEventHandler(Button_Handle handle, Button_EventMask events); - static void TimerEventHandler(void * p_context); - - enum Function_t - { - kFunction_NoneSelected = 0, - kFunction_SoftwareUpdate = 0, - kFunction_FactoryReset, - - kFunction_Invalid - } Function; - - Function_t mFunction; - bool mFunctionTimerActive; - - static AppTask sAppTask; - -#ifdef CC13XX_26XX_FACTORY_DATA - chip::DeviceLayer::FactoryDataProvider mFactoryDataProvider; -#endif -}; - -inline AppTask & GetAppTask(void) -{ - return AppTask::sAppTask; -} - -#endif // APP_TASK_H diff --git a/examples/all-clusters-app/cc13x4_26x4/main/include/CHIPProjectConfig.h b/examples/all-clusters-app/cc13x4_26x4/main/include/CHIPProjectConfig.h deleted file mode 100644 index f42469c54a5880..00000000000000 --- a/examples/all-clusters-app/cc13x4_26x4/main/include/CHIPProjectConfig.h +++ /dev/null @@ -1,129 +0,0 @@ -/* - * Copyright (c) 2020 Project CHIP Authors - * Copyright (c) 2019 Google LLC. - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file - * Example project configuration file for CHIP. - * - * This is a place to put application or project-specific overrides - * to the default configuration values for general CHIP features. - * - */ - -#ifndef CHIP_PROJECT_CONFIG_H -#define CHIP_PROJECT_CONFIG_H - -#if BUILD_RELEASE // release build -// Note: Default Pairing/PIN/Serial Numbers being used. These should not be enabled for production builds -#endif // BUILD_RELEASE - -// Use a default pairing code if one hasn't been provisioned in flash. -#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 20202021 -#define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00 - -/** - * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER - * - * Enables the use of a hard-coded default serial number if none - * is found in CHIP NV storage. - */ -#define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN" - -/** - * CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION - * - * The hardware version number assigned to device or product by the device vendor. This - * number is scoped to the device product id, and typically corresponds to a revision of the - * physical device, a change to its packaging, and/or a change to its marketing presentation. - * This value is generally *not* incremented for device software versions. - */ -#define CHIP_DEVICE_CONFIG_DEVICE_HARDWARE_VERSION 1 - -/** - * Values set by args.gni: - * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID - * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID - * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION_STRING - * CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION - */ - -/** - * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE - * - * Enable support for CHIP-over-BLE (CHIPOBLE). - */ -#define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1 - -/** - * CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC - * - * Enables synchronizing the device's real time clock with a remote CHIP Time service - * using the CHIP Time Sync protocol. - */ -// #define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 1 - -/** - * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE - * - * A size, in bytes, of the individual debug event logging buffer. - */ -#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512) - -#define MATTER_CC13XX_26XX_PLATFORM_LOG_ENABLED 1 - -/** - * CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT - * - * Enable the OpenThread SRP client to allow for CHIP device discovery. - */ -#define CHIP_DEVICE_CONFIG_ENABLE_THREAD_SRP_CLIENT 1 - -/** - * CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE - * - * For a development build, set the default importance of events to be logged as Debug. - * Since debug is the lowest importance level, this means all standard, critical, info and - * debug importance level vi events get logged. - */ -#if BUILD_RELEASE -#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Production -#else -#define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Debug -#endif // BUILD_RELEASE - -#define CHIP_DEVICE_CONFIG_ENABLE_EXTENDED_DISCOVERY 1 - -/** - * @def CHIP_IM_MAX_NUM_COMMAND_HANDLER - * - * @brief Defines the maximum number of CommandHandler, limits the number of active commands transactions on server. - */ -#define CHIP_IM_MAX_NUM_COMMAND_HANDLER 1 - -/** - * @def CHIP_IM_MAX_NUM_WRITE_HANDLER - * - * @brief Defines the maximum number of WriteHandler, limits the number of active write transactions on server. - */ -#define CHIP_IM_MAX_NUM_WRITE_HANDLER 1 - -// All clusters app has 3 group endpoints. This needs to defined here so that -// CHIP_CONFIG_MAX_GROUPS_PER_FABRIC is properly configured. -#define CHIP_CONFIG_MAX_GROUP_ENDPOINTS_PER_FABRIC 3 - -#endif // CHIP_PROJECT_CONFIG_H diff --git a/examples/all-clusters-app/cc13x4_26x4/main/include/ClusterManager.h b/examples/all-clusters-app/cc13x4_26x4/main/include/ClusterManager.h deleted file mode 100644 index 7a9a363980ca6f..00000000000000 --- a/examples/all-clusters-app/cc13x4_26x4/main/include/ClusterManager.h +++ /dev/null @@ -1,50 +0,0 @@ -/* - * - * Copyright (c) 2021 Project CHIP Authors - * All rights reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -/** - * @file ClusterManager.h - * - * Declarations for the ClusterManager callbacks for this application - * - **/ - -#pragma once - -#include -#include -#include - -class ClusterManager -{ -public: - void OnOnOffPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); - void OnLevelControlAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); - void OnColorControlAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint8_t * value); - void OnIdentifyPostAttributeChangeCallback(chip::EndpointId endpointId, chip::AttributeId attributeId, uint16_t size, - uint8_t * value); - -private: - friend ClusterManager & ClusterMgr(void); - bool mEndpointOnOffState[2]; - static ClusterManager sCluster; -}; - -inline ClusterManager & ClusterMgr(void) -{ - return ClusterManager::sCluster; -} diff --git a/examples/all-clusters-app/cc13x4_26x4/main/main.cpp b/examples/all-clusters-app/cc13x4_26x4/main/main.cpp deleted file mode 100644 index 8162d893d5c198..00000000000000 --- a/examples/all-clusters-app/cc13x4_26x4/main/main.cpp +++ /dev/null @@ -1,96 +0,0 @@ -/* - * - * Copyright (c) 2020 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include -#include - -#include - -#include -#include - -#include - -/* Driver Header files */ -#include -#include -#include - -#include -#include -#include -#include - -#include -#define TOTAL_ICALL_HEAP_SIZE (0xd000) - -using namespace ::chip; -using namespace ::chip::Inet; -using namespace ::chip::DeviceLayer; - -__attribute__((section(".heap"))) uint8_t GlobalHeapZoneBuffer[TOTAL_ICALL_HEAP_SIZE]; -uint32_t heapSize = TOTAL_ICALL_HEAP_SIZE; - -// ================================================================================ -// FreeRTOS Callbacks -// ================================================================================ -/* Wrapper functions for using the queue registry regardless of whether it is enabled or disabled */ -extern "C" void vQueueAddToRegistryWrapper(QueueHandle_t xQueue, const char * pcQueueName) -{ - /* This function is intentionally left empty as the Queue Registry is disabled */ -} - -extern "C" void vQueueUnregisterQueueWrapper(QueueHandle_t xQueue) -{ - /* This function is intentionally left empty as the Queue Registry is disabled */ -} - -// ================================================================================ -// Main Code -// ================================================================================ -int main(void) -{ - Board_init(); - bpool((void *) GlobalHeapZoneBuffer, TOTAL_ICALL_HEAP_SIZE); - - GPIO_init(); - - NVS_init(); - - ECDH_init(); - - ECDSA_init(); - - AESECB_init(); - - SHA2_init(); - - int ret = GetAppTask().StartAppTask(); - if (ret != 0) - { - // can't log until the kernel is started - // PLAT_LOG("GetAppTask().StartAppTask() failed"); - while (1) - ; - } - - vTaskStartScheduler(); - - // Should never get here. - while (1) - ; -} diff --git a/examples/all-clusters-app/cc13x4_26x4/third_party/connectedhomeip b/examples/all-clusters-app/cc13x4_26x4/third_party/connectedhomeip deleted file mode 120000 index c866b86874994d..00000000000000 --- a/examples/all-clusters-app/cc13x4_26x4/third_party/connectedhomeip +++ /dev/null @@ -1 +0,0 @@ -../../../.. \ No newline at end of file diff --git a/examples/all-clusters-app/esp32/main/CMakeLists.txt b/examples/all-clusters-app/esp32/main/CMakeLists.txt index 9dfd4ffc50b6c9..66448c121f22db 100644 --- a/examples/all-clusters-app/esp32/main/CMakeLists.txt +++ b/examples/all-clusters-app/esp32/main/CMakeLists.txt @@ -22,6 +22,7 @@ set(PRIV_INCLUDE_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/device-energy-management/include" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/energy-evse/include" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/energy-reporting/include" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/water-heater/include" "${CMAKE_CURRENT_LIST_DIR}/include" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32" @@ -36,6 +37,7 @@ set(SRC_DIRS_LIST "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/device-energy-management/src" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/energy-evse/src" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/energy-reporting/src" + "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/energy-management-app/energy-management-common/water-heater/src" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/providers" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/ota" "${CMAKE_SOURCE_DIR}/third_party/connectedhomeip/examples/platform/esp32/common" diff --git a/examples/all-clusters-app/esp32/sdkconfig.defaults b/examples/all-clusters-app/esp32/sdkconfig.defaults index 08fcf94d8ca928..ed9adcc7d82870 100644 --- a/examples/all-clusters-app/esp32/sdkconfig.defaults +++ b/examples/all-clusters-app/esp32/sdkconfig.defaults @@ -72,3 +72,5 @@ CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH=y # Increase LwIP IPv6 address number CONFIG_LWIP_IPV6_NUM_ADDRESSES=6 + +CONFIG_MAX_GROUP_ENDPOINTS_PER_FABRIC=3 diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp index 6c1467fc62a145..0d665509407744 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.cpp @@ -19,7 +19,9 @@ #include "AllClustersCommandDelegate.h" #include +#include #include +#include #include #include #include @@ -55,6 +57,17 @@ bool HasNumericField(Json::Value & jsonValue, const std::string & field) return jsonValue.isMember(field) && jsonValue[field].isNumeric(); } +uint8_t GetNumberOfSwitchPositions(EndpointId endpointId) +{ + // TODO: Move to using public API of cluster. + uint8_t numPositions = 0; + + // On failure, the numPositions won't be changed, so 0 returned. + (void) Switch::Attributes::NumberOfPositions::Get(endpointId, &numPositions); + + return numPositions; +} + /** * Named pipe handler for simulated long press * @@ -97,6 +110,15 @@ void HandleSimulateLongPress(Json::Value & jsonValue) EndpointId endpointId = static_cast(jsonValue["EndpointId"].asUInt()); uint8_t buttonId = static_cast(jsonValue["ButtonId"].asUInt()); + + uint8_t numPositions = GetNumberOfSwitchPositions(endpointId); + if (buttonId >= numPositions) + { + std::string inputJson = jsonValue.toStyledString(); + ChipLogError(NotSpecified, "Invalid ButtonId (out of range) in %s", inputJson.c_str()); + return; + } + System::Clock::Milliseconds32 longPressDelayMillis{ static_cast(jsonValue["LongPressDelayMillis"].asUInt()) }; System::Clock::Milliseconds32 longPressDurationMillis{ static_cast(jsonValue["LongPressDurationMillis"].asUInt()) }; uint32_t featureMap = static_cast(jsonValue["FeatureMap"].asUInt()); @@ -167,6 +189,15 @@ void HandleSimulateMultiPress(Json::Value & jsonValue) EndpointId endpointId = static_cast(jsonValue["EndpointId"].asUInt()); uint8_t buttonId = static_cast(jsonValue["ButtonId"].asUInt()); + + uint8_t numPositions = GetNumberOfSwitchPositions(endpointId); + if (buttonId >= numPositions) + { + std::string inputJson = jsonValue.toStyledString(); + ChipLogError(NotSpecified, "Invalid ButtonId (out of range) in %s", inputJson.c_str()); + return; + } + System::Clock::Milliseconds32 multiPressPressedTimeMillis{ static_cast( jsonValue["MultiPressPressedTimeMillis"].asUInt()) }; System::Clock::Milliseconds32 multiPressReleasedTimeMillis{ static_cast( @@ -225,6 +256,14 @@ void HandleSimulateLatchPosition(Json::Value & jsonValue) EndpointId endpointId = static_cast(jsonValue["EndpointId"].asUInt()); uint8_t positionId = static_cast(jsonValue["PositionId"].asUInt()); + uint8_t numPositions = GetNumberOfSwitchPositions(endpointId); + if (positionId >= numPositions) + { + std::string inputJson = jsonValue.toStyledString(); + ChipLogError(NotSpecified, "Invalid PositionId (out of range) in %s", inputJson.c_str()); + return; + } + uint8_t previousPositionId = 0; Protocols::InteractionModel::Status status = Switch::Attributes::CurrentPosition::Get(endpointId, &previousPositionId); VerifyOrReturn(Protocols::InteractionModel::Status::Success == status, @@ -246,6 +285,52 @@ void HandleSimulateLatchPosition(Json::Value & jsonValue) } } +/** + * Named pipe handler for simulating switch is idle + * + * Usage example: + * echo '{"Name": "SimulateSwitchIdle", "EndpointId": 3}' > /tmp/chip_all_clusters_fifo_1146610 + * + * JSON Arguments: + * - "Name": Must be "SimulateSwitchIdle" + * - "EndpointId": ID of endpoint having a switch cluster + * + * @param jsonValue - JSON payload from named pipe + */ + +void HandleSimulateSwitchIdle(Json::Value & jsonValue) +{ + bool hasEndpointId = HasNumericField(jsonValue, "EndpointId"); + + if (!hasEndpointId) + { + std::string inputJson = jsonValue.toStyledString(); + ChipLogError(NotSpecified, "Missing or invalid value for one of EndpointId in %s", inputJson.c_str()); + return; + } + + EndpointId endpointId = static_cast(jsonValue["EndpointId"].asUInt()); + (void) Switch::Attributes::CurrentPosition::Set(endpointId, 0); +} + +void EmitOccupancyChangedEvent(EndpointId endpointId, uint8_t occupancyValue) +{ + Clusters::OccupancySensing::Events::OccupancyChanged::Type event{}; + event.occupancy = static_cast>(occupancyValue); + EventNumber eventNumber = 0; + + CHIP_ERROR err = LogEvent(event, endpointId, eventNumber); + if (err != CHIP_NO_ERROR) + { + ChipLogError(NotSpecified, "Failed to log OccupancyChanged event: %" CHIP_ERROR_FORMAT, err.Format()); + } + else + { + ChipLogProgress(NotSpecified, "Logged OccupancyChanged(occupancy=%u) on Endpoint %u", static_cast(occupancyValue), + static_cast(endpointId)); + } +} + } // namespace AllClustersAppCommandHandler * AllClustersAppCommandHandler::FromJSON(const char * json) @@ -407,6 +492,24 @@ void AllClustersAppCommandHandler::HandleCommand(intptr_t context) { HandleSimulateLatchPosition(self->mJsonValue); } + else if (name == "SimulateSwitchIdle") + { + HandleSimulateSwitchIdle(self->mJsonValue); + } + else if (name == "SetOccupancy") + { + uint8_t occupancy = static_cast(self->mJsonValue["Occupancy"].asUInt()); + EndpointId endpointId = static_cast(self->mJsonValue["EndpointId"].asUInt()); + + if (1 == occupancy || 0 == occupancy) + { + self->HandleSetOccupancyChange(endpointId, occupancy); + } + else + { + ChipLogError(NotSpecified, "Invalid Occupancy state to set."); + } + } else { ChipLogError(NotSpecified, "Unhandled command '%s': this hould never happen", name.c_str()); @@ -769,6 +872,71 @@ void AllClustersAppCommandHandler::OnAirQualityChange(uint32_t aNewValue) } } +void AllClustersAppCommandHandler::HandleSetOccupancyChange(EndpointId endpointId, uint8_t newOccupancyValue) +{ + BitMask currentOccupancy; + Protocols::InteractionModel::Status status = OccupancySensing::Attributes::Occupancy::Get(endpointId, ¤tOccupancy); + + if (static_cast>(newOccupancyValue) == currentOccupancy) + { + ChipLogDetail(NotSpecified, "Skipping setting occupancy changed due to same value."); + return; + } + + status = OccupancySensing::Attributes::Occupancy::Set(endpointId, newOccupancyValue); + ChipLogDetail(NotSpecified, "Set Occupancy attribute to %u", newOccupancyValue); + + if (status != Protocols::InteractionModel::Status::Success) + { + ChipLogDetail(NotSpecified, "Invalid value/endpoint to set."); + return; + } + + EmitOccupancyChangedEvent(endpointId, newOccupancyValue); + + if (1 == newOccupancyValue) + { + uint16_t * holdTime = chip::app::Clusters::OccupancySensing::GetHoldTimeForEndpoint(endpointId); + if (holdTime != nullptr) + { + CHIP_ERROR err = chip::DeviceLayer::SystemLayer().StartTimer( + chip::System::Clock::Seconds16(*holdTime), AllClustersAppCommandHandler::OccupancyPresentTimerHandler, + reinterpret_cast(static_cast(endpointId))); + ChipLogDetail(NotSpecified, "Start HoldTime timer"); + if (CHIP_NO_ERROR != err) + { + ChipLogError(NotSpecified, "Failed to start HoldTime timer."); + } + } + } +} + +void AllClustersAppCommandHandler::OccupancyPresentTimerHandler(System::Layer * systemLayer, void * appState) +{ + EndpointId endpointId = static_cast(reinterpret_cast(appState)); + chip::BitMask currentOccupancy; + + Protocols::InteractionModel::Status status = OccupancySensing::Attributes::Occupancy::Get(endpointId, ¤tOccupancy); + VerifyOrDie(status == Protocols::InteractionModel::Status::Success); + + uint8_t clearValue = 0; + if (!currentOccupancy.Has(Clusters::OccupancySensing::OccupancyBitmap::kOccupied)) + { + return; + } + + status = OccupancySensing::Attributes::Occupancy::Set(endpointId, clearValue); + if (status != Protocols::InteractionModel::Status::Success) + { + ChipLogDetail(NotSpecified, "Failed to set occupancy state."); + } + else + { + ChipLogDetail(NotSpecified, "Set Occupancy attribute to clear"); + EmitOccupancyChangedEvent(endpointId, clearValue); + } +} + void AllClustersCommandDelegate::OnEventCommandReceived(const char * json) { auto handler = AllClustersAppCommandHandler::FromJSON(json); diff --git a/examples/all-clusters-app/linux/AllClustersCommandDelegate.h b/examples/all-clusters-app/linux/AllClustersCommandDelegate.h index f1b873fc0d69c4..b0d1f2e99750ca 100644 --- a/examples/all-clusters-app/linux/AllClustersCommandDelegate.h +++ b/examples/all-clusters-app/linux/AllClustersCommandDelegate.h @@ -115,6 +115,12 @@ class AllClustersAppCommandHandler * Should be called when it is necessary to change the operational state as a manual operation. */ void OnOvenOperationalStateChange(std::string device, std::string operation, Json::Value param); + + /** + * Should be called when it is necessary to change the Occupancy attribute. + */ + void HandleSetOccupancyChange(chip::EndpointId endpointId, uint8_t occupancyValue); + static void OccupancyPresentTimerHandler(chip::System::Layer * systemLayer, void * appState); }; class AllClustersCommandDelegate : public NamedPipeCommandDelegate diff --git a/examples/all-clusters-app/linux/BUILD.gn b/examples/all-clusters-app/linux/BUILD.gn index baac52014d3c3b..0e16c64c41de13 100644 --- a/examples/all-clusters-app/linux/BUILD.gn +++ b/examples/all-clusters-app/linux/BUILD.gn @@ -19,6 +19,7 @@ import("${build_root}/config/compiler/compiler.gni") import("${chip_root}/src/lib/lib.gni") import("${chip_root}/src/platform/device.gni") +import("${chip_root}/build/chip/fuzz_test.gni") import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") if (chip_enable_pw_rpc) { @@ -29,10 +30,6 @@ if (chip_enable_pw_rpc) { source_set("chip-all-clusters-common") { sources = [ - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/WhmInstance.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/WhmMain.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/WhmManufacturer.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/air-quality-instance.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/binding-handler.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/boolcfg-stub.cpp", @@ -62,7 +59,6 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-modes-manager.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/static-supported-temperature-levels.cpp", "${chip_root}/examples/all-clusters-app/all-clusters-common/src/tcc-mode.cpp", - "${chip_root}/examples/all-clusters-app/all-clusters-common/src/water-heater-mode.cpp", "${chip_root}/examples/all-clusters-app/linux/diagnostic-logs-provider-delegate-impl.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/common/src/EnergyTimeUtils.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/device-energy-management/src/DeviceEnergyManagementDelegateImpl.cpp", @@ -75,6 +71,11 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseTargetsStore.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/energy-evse/src/energy-evse-mode.cpp", "${chip_root}/examples/energy-management-app/energy-management-common/energy-reporting/src/ElectricalPowerMeasurementDelegate.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/water-heater/src/WhmDelegateImpl.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/water-heater/src/WhmInstance.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/water-heater/src/WhmMain.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/water-heater/src/WhmManufacturer.cpp", + "${chip_root}/examples/energy-management-app/energy-management-common/water-heater/src/water-heater-mode.cpp", "${chip_root}/examples/thermostat/thermostat-common/src/thermostat-delegate-impl.cpp", "AllClustersCommandDelegate.cpp", "AllClustersCommandDelegate.h", @@ -102,6 +103,7 @@ source_set("chip-all-clusters-common") { "${chip_root}/examples/energy-management-app/energy-management-common/device-energy-management/include", "${chip_root}/examples/energy-management-app/energy-management-common/energy-evse/include", "${chip_root}/examples/energy-management-app/energy-management-common/energy-reporting/include", + "${chip_root}/examples/energy-management-app/energy-management-common/water-heater/include", "${chip_root}/examples/thermostat/thermostat-common/include", ] @@ -200,3 +202,13 @@ group("linux") { group("default") { deps = [ ":linux" ] } + +if (enable_fuzz_test_targets) { + chip_fuzz_target("fuzz-chip-all-clusters-app") { + sources = [ "fuzzing-main.cpp" ] + public_deps = [ + ":chip-all-clusters-common", + "${chip_root}/examples/platform/linux:app-main", + ] + } +} diff --git a/examples/all-clusters-app/linux/ButtonEventsSimulator.cpp b/examples/all-clusters-app/linux/ButtonEventsSimulator.cpp index 53a08672fdbc07..0122eba4336340 100644 --- a/examples/all-clusters-app/linux/ButtonEventsSimulator.cpp +++ b/examples/all-clusters-app/linux/ButtonEventsSimulator.cpp @@ -235,6 +235,7 @@ void ButtonEventsSimulator::Next() break; } case ButtonEventsSimulator::State::kEmitStartOfMultiPress: { + SetButtonPosition(mEndpointId, mPressedButtonId); EmitInitialPress(mEndpointId, mPressedButtonId); if (mFeatureMap & static_cast(Clusters::Switch::Feature::kActionSwitch)) { @@ -268,6 +269,7 @@ void ButtonEventsSimulator::Next() { EmitShortRelease(mEndpointId, mPressedButtonId); } + SetButtonPosition(mEndpointId, mIdleButtonId); StartTimer(mMultiPressReleasedTimeMillis); break; } diff --git a/examples/all-clusters-app/linux/ValveControlDelegate.cpp b/examples/all-clusters-app/linux/ValveControlDelegate.cpp index 29c744257fbabe..f161ee65eae504 100644 --- a/examples/all-clusters-app/linux/ValveControlDelegate.cpp +++ b/examples/all-clusters-app/linux/ValveControlDelegate.cpp @@ -35,7 +35,7 @@ DataModel::Nullable ValveControlDelegate::HandleOpenValve(DataMod sLastOpenDuration = 0; ChipLogProgress(NotSpecified, "Valve opening from level: %d to %d", currentLevel, sLevel); - // In this demo application, the trasition is considered instant, + // In this demo application, the transition is considered instant, // so current level is set to the requested level and current state is set to kOpen. currentLevel = sLevel; Attributes::CurrentState::Set(kValveEndpoint, ValveConfigurationAndControl::ValveStateEnum::kOpen); diff --git a/examples/all-clusters-app/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index badda7f3b68b40..b62d154f0d58f7 100644 --- a/examples/all-clusters-app/linux/main-common.cpp +++ b/examples/all-clusters-app/linux/main-common.cpp @@ -21,6 +21,7 @@ #include "ValveControlDelegate.h" #include "WindowCoveringManager.h" #include "air-quality-instance.h" +#include "app-common/zap-generated/ids/Clusters.h" #include "device-energy-management-modes.h" #include "dishwasher-mode.h" #include "energy-evse-modes.h" @@ -39,6 +40,7 @@ #include "tcc-mode.h" #include "thermostat-delegate-impl.h" #include "water-heater-mode.h" + #include #include #include @@ -54,7 +56,6 @@ #include #include #include -#include #include #include #include @@ -72,6 +73,8 @@ using namespace chip; using namespace chip::app; using namespace chip::DeviceLayer; +using chip::Protocols::InteractionModel::Status; + namespace { constexpr char kChipEventFifoPathPrefix[] = "/tmp/chip_all_clusters_fifo_"; @@ -285,7 +288,6 @@ void ApplicationShutdown() Clusters::WaterHeaterMode::Shutdown(); Clusters::WaterHeaterManagement::WhmApplicationShutdown(); - Clusters::WaterHeaterMode::Shutdown(); if (sChipNamedPipeCommands.Stop() != CHIP_NO_ERROR) { @@ -337,3 +339,28 @@ void emberAfThermostatClusterInitCallback(EndpointId endpoint) SetDefaultDelegate(endpoint, &delegate); } + +Status emberAfExternalAttributeReadCallback(EndpointId endpoint, ClusterId clusterId, + const EmberAfAttributeMetadata * attributeMetadata, uint8_t * buffer, + uint16_t maxReadLength) +{ + + VerifyOrReturnValue(clusterId == Clusters::UnitTesting::Id, Status::Failure); + VerifyOrReturnValue(attributeMetadata != nullptr, Status::Failure); + + if (attributeMetadata->attributeId == Clusters::UnitTesting::Attributes::FailureInt32U::Id) + { + uint8_t forced_code = 0; + Status status; + + status = Clusters::UnitTesting::Attributes::ReadFailureCode::Get(endpoint, &forced_code); + if (status == Status::Success) + { + status = static_cast(forced_code); + } + return status; + } + + // Finally we just do not support external attributes in all-clusters at this point + return Status::Failure; +} diff --git a/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn b/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn index e6bf8d64d94524..b0e1c1c47a98ea 100644 --- a/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn +++ b/examples/all-clusters-app/nxp/rt/rw61x/BUILD.gn @@ -65,7 +65,8 @@ rt_sdk("sdk") { defines = [] # To be moved, temporary mbedtls config fix to build app with factory data - if (chip_enable_secure_dac_private_key_storage == 1) { + if (chip_enable_secure_dac_private_key_storage || + chip_enable_secure_whole_factory_data) { defines += [ "MBEDTLS_NIST_KW_C", "MBEDTLS_PSA_CRYPTO_CLIENT", @@ -82,10 +83,18 @@ rt_sdk("sdk") { include_dirs += [ "${example_platform_dir}/board/" ] sources += [ "${example_platform_dir}/board/pin_mux.c" ] sources += [ "${example_platform_dir}/board/hardware_init.c" ] - sources += [ "${example_platform_dir}/board/clock_config.c" ] - sources += [ "${example_platform_dir}/board/board.c" ] sources += [ "${example_platform_dir}/board/peripherals.c" ] + if (board_version == "frdm") { + include_dirs += [ "${example_platform_dir}/board/frdmrw612/" ] + sources += [ "${example_platform_dir}/board/frdmrw612/clock_config.c" ] + sources += [ "${example_platform_dir}/board/frdmrw612/board.c" ] + } else { + include_dirs += [ "${example_platform_dir}/board/rdrw612bga/" ] + sources += [ "${example_platform_dir}/board/rdrw612bga/clock_config.c" ] + sources += [ "${example_platform_dir}/board/rdrw612bga/board.c" ] + } + # Indicate the path to CHIPProjectConfig.h include_dirs += [ "include/config" ] @@ -97,7 +106,7 @@ rt_sdk("sdk") { # For matter with BR feature, increase FreeRTOS heap size if (chip_enable_wifi && chip_enable_openthread) { - defines += [ "configTOTAL_HEAP_SIZE=(size_t)(160 * 1024)" ] + defines += [ "configTOTAL_HEAP_SIZE=(size_t)(170 * 1024)" ] } defines += [ @@ -141,10 +150,12 @@ rt_executable("all_cluster_app") { "../../common/main/main.cpp", ] - if (chip_enable_secure_dac_private_key_storage == 1) { - sources += [ - "${example_platform_dir}/factory_data/source/AppFactoryDataExample.cpp", - ] + if (chip_enable_secure_dac_private_key_storage || + chip_enable_secure_whole_factory_data) { + sources += [ "${chip_root}/examples/platform/nxp/${nxp_platform}/factory_data/source/AppFactoryDataExample.cpp" ] + if (chip_enable_secure_whole_factory_data) { + defines += [ "ENABLE_SECURE_WHOLE_FACTORY_DATA" ] + } } else { sources += [ "${common_example_dir}/factory_data/source/AppFactoryDataDefaultImpl.cpp", diff --git a/examples/all-clusters-app/nxp/rt/rw61x/README.md b/examples/all-clusters-app/nxp/rt/rw61x/README.md index bdec2c58956274..9356e4b8fe3617 100644 --- a/examples/all-clusters-app/nxp/rt/rw61x/README.md +++ b/examples/all-clusters-app/nxp/rt/rw61x/README.md @@ -37,52 +37,70 @@ The example supports: For Matter over Thread configuration : -- [`NXP RD-RW612-BGA`] board -- BLE/15.4 antenna (to plug in Ant1) +- For [`NXP RD-RW612-BGA`] board: BLE/15.4 antenna (to plug in Ant1) +- For [`NXP FRDM-RW612`] board: no external antenna needed (embedded PCB + antenna) For Matter over WiFi configuration : -- [`NXP RD-RW612-BGA`] or [`NXP RD-RW610-BGA`] board -- BLE antenna (to plug in Ant1) -- Wi-Fi antenna (to plug in Ant2) +- For [`NXP RD-RW612-BGA`] or [`NXP RD-RW610-BGA`] board: BLE antenna (to plug + in Ant1) + Wi-Fi antenna (to plug in Ant2) +- For [`NXP FRDM-RW612`] board: no external antenna needed (embedded PCB + antenna) For Matter over Wi-Fi with OpenThread Border Router : -- [`NXP RD-RW612-BGA`] board -- BLE/15.4 antenna (to plug in Ant1) -- Wi-Fi antenna (to plug in Ant2) +- For [`NXP RD-RW612-BGA`] board: BLE/15.4 antenna (to plug in Ant1) + Wi-Fi + antenna (to plug in Ant2) +- For [`NXP FRDM-RW612`] board: no external antenna needed (embedded PCB + antenna) ## Building In order to build the Project CHIP example, we recommend using a Linux -distribution (the demo-application was compiled on Ubuntu 20.04). +distribution (supported Operating Systems are listed in +[BUILDING.md](../../../../../docs/guides/BUILDING.md#prerequisites)). -- Follow instruction in [BUILDING.md](../../../../../docs/guides/BUILDING.md) - to setup the environment to be able to build Matter. +- Make sure that below prerequisites are correctly installed (as described in + [BUILDING.md](../../../../../docs/guides/BUILDING.md#prerequisites))) -- Download - [RD-RW612 SDK for Project CHIP](https://mcuxpresso.nxp.com/en/select). - Creating an nxp.com account is required before being able to download the - SDK. Once the account is created, login and follow the steps for downloading - SDK. The SDK Builder UI selection should be similar with the one from the - image below. +``` +sudo apt-get install git gcc g++ pkg-config libssl-dev libdbus-1-dev \ + libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev \ + python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev +``` - ![MCUXpresso SDK Download](../../../../platform/nxp/rt/rw61x/doc/images/mcux-sdk-download.PNG) +- Step 1: checkout NXP specific submodules only - (Note: All SDK components should be selected. If size is an issue Azure RTOS - component can be omitted.) +``` +user@ubuntu:~/Desktop/git/connectedhomeip$ scripts/checkout_submodules.py --shallow --platform nxp --recursive +``` - Please refer to Matter release notes for getting the latest released SDK. +- Step 2: activate local environment -- Start building the application. +``` +user@ubuntu:~/Desktop/git/connectedhomeip$ source scripts/activate.sh +``` + +If the script says the environment is out of date, you can update it by running +the following command: + +``` +user@ubuntu:~/Desktop/git/connectedhomeip$ source scripts/bootstrap.sh +``` + +- Step 3: Init NXP SDK(s) + +``` +user@ubuntu:~/Desktop/git/connectedhomeip$ third_party/nxp/nxp_matter_support/scripts/update_nxp_sdk.py --platform common +``` + +Note: By default update_nxp_sdk.py will try to initialize all NXP SDKs. Arg "-- +help" could be used to view all available options. ``` -user@ubuntu:~/Desktop/git/connectedhomeip$ export NXP_SDK_ROOT=/home/user/Desktop/SDK_RW612/ -user@ubuntu:~/Desktop/git/connectedhomeip$ scripts/checkout_submodules.py --shallow --platform nxp --recursive -user@ubuntu:~/Desktop/git/connectedhomeip$ source ./scripts/bootstrap.sh -user@ubuntu:~/Desktop/git/connectedhomeip$ source ./scripts/activate.sh user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/all-clusters-app/nxp/rt/rw61x/ ``` @@ -91,7 +109,7 @@ user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/all-clusters-app/nxp/rt/r - Build Matter-over-Wifi configuration with BLE commissioning (ble-wifi) : ``` -user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rw61x$ gn gen --args="chip_enable_wifi=true is_sdk_package=true" out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rw61x$ gn gen --args="chip_enable_wifi=true" out/debug user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rw61x$ ninja -C out/debug ``` @@ -100,7 +118,7 @@ user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rw61x - Build Matter-over-Thread configuration with BLE commissioning. ``` -user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rw61x$ gn gen --args="chip_enable_openthread=true chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=true is_sdk_package=true" out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rw61x$ gn gen --args="chip_enable_openthread=true chip_inet_config_enable_ipv4=false chip_config_network_layer_ble=true" out/debug user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rw61x$ ninja -C out/debug ``` @@ -113,7 +131,7 @@ Thread network on the Border Router. (ble-wifi) : ``` -user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rw610$ gn gen --args="chip_enable_wifi=true chip_enable_openthread=true chip_enable_matter_cli=true is_sdk_package=true openthread_root=\"//third_party/connectedhomeip/third_party/openthread/ot-nxp/openthread-br\"" out/debug +user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rw610$ gn gen --args="chip_enable_wifi=true chip_enable_openthread=true chip_enable_matter_cli=true" out/debug user@ubuntu:~/Desktop/git/connectedhomeip/examples/all-clusters-app/nxp/rt/rw610$ ninja -C out/debug ``` @@ -128,12 +146,9 @@ Optional GN options that can be added when building an application: [matter CLI](README.md#testing-the-all-clusters-application-with-matter-cli-enabled), the argument `chip_enable_matter_cli=true` must be added to the _gn gen_ command. -- To switch the SDK type used, the argument `is_=true` must be added - to the _gn gen_ command (with being either sdk_package or - sdk_internal). -- By default, the RW612 A1 board revision will be chosen. To switch to an A2 - revision, the argument `board_version=\"A2\"` must be added to the _gn gen_ - command. +- By default, the `NXP RD-RW612-BGA` board revision will be chosen. To switch + to `NXP FRDM-RW612` board revision, the argument `board_version=\"frdm\"` + must be added to the _gn gen_ command. - To build the application in debug mode, the argument `is_debug=true optimize_debug=false` must be added to the _gn gen_ command. - To build with the option to have Matter certificates/keys pre-loaded in a @@ -215,9 +230,6 @@ Right click on the Project -> C/C++ Build-> Tool Chain Editor -> NXP MCU Tools - Right click on the Project -> Debug -> As->SEGGER JLink probes -> OK -> Select elf file ``` -(Note : if SDK package is used, a simpler way could be duplicating the debug -configuration from the SDK Hello World example after importing it.) - - Debug using the newly created configuration file. @@ -261,6 +273,10 @@ using the matter shell, follow instructions from In this configuration, the device can be commissioned over Wi-Fi with the 'ble-wifi' pairing method. +### NVM + +By default the file system used by the application is NVS. + ### Testing the all-clusters application without Matter CLI: 1. Prepare the board with the flashed `All-cluster application` (as shown @@ -319,8 +335,10 @@ Here are described steps to use the all-cluster-app with the Matter CLI enabled 3. The All-cluster example uses UART2 (`FlexComm0`) to print logs while running the server. To view raw UART output, a pin should be plugged to an USB to - UART adapter (connector `HD2 pin 03`), then start a terminal emulator like - PuTTY and connect to the used COM port with the following UART settings: + UART adapter (connector `HD2 pin 03` for [`NXP RD-RW612-BGA`] board and + `J5 pin 4` (`mikroBUS`: TX) for [`NXP FRDM-RW612`] board), then start a + terminal emulator like PuTTY and connect to the used COM port with the + following UART settings: - Baud rate: 115200 - 8 data bits diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter index 363da41015d0b0..77ad5a9fc5d0a5 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.matter @@ -704,14 +704,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -738,7 +734,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. */ @@ -2290,7 +2286,7 @@ cluster EthernetNetworkDiagnostics = 55 { Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ cluster Switch = 59 { - revision 1; + revision 2; bitmap Feature : bitmap32 { kLatchingSwitch = 0x1; @@ -4735,7 +4731,7 @@ cluster RelativeHumidityMeasurement = 1029 { readonly attribute int16u clusterRevision = 65533; } -/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ +/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */ cluster OccupancySensing = 1030 { revision 5; @@ -4773,6 +4769,10 @@ cluster OccupancySensing = 1030 { int16u holdTimeDefault = 2; } + info event OccupancyChanged = 0 { + OccupancyBitmap occupancy = 0; + } + readonly attribute OccupancyBitmap occupancy = 0; readonly attribute OccupancySensorTypeEnum occupancySensorType = 1; readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2; @@ -5894,6 +5894,8 @@ internal cluster UnitTesting = 4294048773 { attribute TestGlobalEnum globalEnum = 51; attribute TestGlobalStruct globalStruct = 52; attribute optional boolean unsupported = 255; + attribute optional int8u readFailureCode = 12288; + attribute optional int32u failureInt32U = 12289; attribute nullable boolean nullableBoolean = 16384; attribute nullable Bitmap8MaskMap nullableBitmap8 = 16385; attribute nullable Bitmap16MaskMap nullableBitmap16 = 16386; diff --git a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap index 2482ca381ee7af..528dd80c73bfd2 100644 --- a/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap +++ b/examples/all-clusters-minimal-app/all-clusters-common/all-clusters-minimal-app.zap @@ -6932,7 +6932,7 @@ "code": 18, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7202,7 +7202,7 @@ "code": 8, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "ColorModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7218,7 +7218,7 @@ "code": 15, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "OptionsBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7250,7 +7250,7 @@ "code": 16385, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "EnhancedColorModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7266,7 +7266,7 @@ "code": 16394, "mfgCode": null, "side": "server", - "type": "bitmap16", + "type": "ColorCapabilitiesBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -7995,10 +7995,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -9965,7 +9965,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -10541,7 +10541,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -11917,10 +11917,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -12488,4 +12488,4 @@ "parentEndpointIdentifier": null } ] -} +} \ No newline at end of file diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 1cc37299be6645..d64624281236cc 100644 --- a/examples/bridge-app/bridge-common/bridge-app.matter +++ b/examples/bridge-app/bridge-common/bridge-app.matter @@ -627,14 +627,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -661,7 +657,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** The Access Control Cluster exposes a data model view of a @@ -756,14 +752,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -790,7 +782,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. */ @@ -1929,7 +1921,7 @@ cluster EthernetNetworkDiagnostics = 55 { Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ cluster Switch = 59 { - revision 1; + revision 2; bitmap Feature : bitmap32 { kLatchingSwitch = 0x1; diff --git a/examples/bridge-app/linux/Device.cpp b/examples/bridge-app/linux/Device.cpp index d7862260f820d2..ac9bb4b2584687 100644 --- a/examples/bridge-app/linux/Device.cpp +++ b/examples/bridge-app/linux/Device.cpp @@ -19,16 +19,19 @@ #include "Device.h" +#include #include #include #include +using namespace chip; using namespace chip::app::Clusters::Actions; Device::Device(const char * szDeviceName, std::string szLocation) { chip::Platform::CopyString(mName, szDeviceName); + chip::Platform::CopyString(mUniqueId, ""); mLocation = szLocation; mReachable = false; mEndpointId = 0; @@ -74,6 +77,12 @@ void Device::SetName(const char * szName) } } +void Device::SetUniqueId(const char * szDeviceUniqueId) +{ + chip::Platform::CopyString(mUniqueId, szDeviceUniqueId); + ChipLogProgress(DeviceLayer, "Device[%s]: New UniqueId=\"%s\"", mName, mUniqueId); +} + void Device::SetLocation(std::string szLocation) { bool changed = (mLocation.compare(szLocation) != 0); @@ -88,6 +97,23 @@ void Device::SetLocation(std::string szLocation) } } +void Device::GenerateUniqueId() +{ + // Ensure the buffer is zeroed out + memset(mUniqueId, 0, kDeviceUniqueIdSize + 1); + + static const char kRandCharChoices[] = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ"; + + // Prefix the generated value with "GEN-" + memcpy(mUniqueId, "GEN-", 4); + for (unsigned idx = 4; idx < kDeviceUniqueIdSize; idx++) + { + mUniqueId[idx] = kRandCharChoices[Crypto::GetRandU8() % (sizeof(kRandCharChoices) - 1)]; + } + + mUniqueId[kDeviceUniqueIdSize] = '\0'; // Ensure null-termination +} + DeviceOnOff::DeviceOnOff(const char * szDeviceName, std::string szLocation) : Device(szDeviceName, szLocation) { mOn = false; diff --git a/examples/bridge-app/linux/include/Device.h b/examples/bridge-app/linux/include/Device.h index 1a5f5bba795394..dbcc7686788503 100644 --- a/examples/bridge-app/linux/include/Device.h +++ b/examples/bridge-app/linux/include/Device.h @@ -30,7 +30,8 @@ class Device { public: - static const int kDeviceNameSize = 32; + static const int kDeviceNameSize = 32; + static const int kDeviceUniqueIdSize = 32; enum Changed_t { @@ -46,12 +47,15 @@ class Device bool IsReachable(); void SetReachable(bool aReachable); void SetName(const char * szDeviceName); + void SetUniqueId(const char * szDeviceUniqueId); void SetLocation(std::string szLocation); + void GenerateUniqueId(); inline void SetEndpointId(chip::EndpointId id) { mEndpointId = id; }; inline chip::EndpointId GetEndpointId() { return mEndpointId; }; inline void SetParentEndpointId(chip::EndpointId id) { mParentEndpointId = id; }; inline chip::EndpointId GetParentEndpointId() { return mParentEndpointId; }; inline char * GetName() { return mName; }; + inline char * GetUniqueId() { return mUniqueId; }; inline std::string GetLocation() { return mLocation; }; inline std::string GetZone() { return mZone; }; inline void SetZone(std::string zone) { mZone = zone; }; @@ -60,8 +64,9 @@ class Device virtual void HandleDeviceChange(Device * device, Device::Changed_t changeMask) = 0; protected: - bool mReachable; - char mName[kDeviceNameSize]; + bool mReachable = false; + char mName[kDeviceNameSize + 1] = { 0 }; + char mUniqueId[kDeviceUniqueIdSize + 1] = { 0 }; std::string mLocation; chip::EndpointId mEndpointId; chip::EndpointId mParentEndpointId; diff --git a/examples/bridge-app/linux/main.cpp b/examples/bridge-app/linux/main.cpp index d8446088a960a0..192fa3424de681 100644 --- a/examples/bridge-app/linux/main.cpp +++ b/examples/bridge-app/linux/main.cpp @@ -63,6 +63,7 @@ using namespace chip::app::Clusters; namespace { const int kNodeLabelSize = 32; +const int kUniqueIdSize = 32; // Current ZCL implementation of Struct uses a max-size array of 254 bytes const int kDescriptorAttributeArraySize = 254; @@ -126,6 +127,7 @@ DECLARE_DYNAMIC_ATTRIBUTE(Descriptor::Attributes::DeviceTypeList::Id, ARRAY, kDe DECLARE_DYNAMIC_ATTRIBUTE_LIST_BEGIN(bridgedDeviceBasicAttrs) DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::NodeLabel::Id, CHAR_STRING, kNodeLabelSize, 0), /* NodeLabel */ DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::Reachable::Id, BOOLEAN, 1, 0), /* Reachable */ + DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::UniqueID::Id, CHAR_STRING, kUniqueIdSize, 0), DECLARE_DYNAMIC_ATTRIBUTE(BridgedDeviceBasicInformation::Attributes::FeatureMap::Id, BITMAP32, 4, 0), /* feature map */ DECLARE_DYNAMIC_ATTRIBUTE_LIST_END(); @@ -277,6 +279,12 @@ int AddDeviceEndpoint(Device * dev, EmberAfEndpointType * ep, const SpanGetName(), gCurrentEndpointId, index); + + if (dev->GetUniqueId()[0] == '\0') + { + dev->GenerateUniqueId(); + } + return index; } if (err != CHIP_ERROR_ENDPOINT_EXISTS) @@ -457,6 +465,11 @@ Protocols::InteractionModel::Status HandleReadBridgedDeviceBasicAttribute(Device MutableByteSpan zclNameSpan(buffer, maxReadLength); MakeZclCharString(zclNameSpan, dev->GetName()); } + else if ((attributeId == UniqueID::Id) && (maxReadLength == 32)) + { + MutableByteSpan zclUniqueIdSpan(buffer, maxReadLength); + MakeZclCharString(zclUniqueIdSpan, dev->GetUniqueId()); + } else if ((attributeId == ClusterRevision::Id) && (maxReadLength == 2)) { uint16_t rev = ZCL_BRIDGED_DEVICE_BASIC_INFORMATION_CLUSTER_REVISION; diff --git a/examples/chef/common/chef-rvc-mode-delegate.cpp b/examples/chef/common/chef-rvc-mode-delegate.cpp index 32b4cad0236899..9caf2ab94fd835 100644 --- a/examples/chef/common/chef-rvc-mode-delegate.cpp +++ b/examples/chef/common/chef-rvc-mode-delegate.cpp @@ -154,8 +154,8 @@ void emberAfRvcRunModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(!gRvcRunModeDelegate && !gRvcRunModeInstance); gRvcRunModeDelegate = std::make_unique(); - gRvcRunModeInstance = std::make_unique(gRvcRunModeDelegate.get(), endpointId, RvcRunMode::Id, - chip::to_underlying(RvcRunMode::Feature::kNoFeatures)); + gRvcRunModeInstance = + std::make_unique(gRvcRunModeDelegate.get(), endpointId, RvcRunMode::Id, 0 /* No feature bits */); gRvcRunModeInstance->Init(); } @@ -290,8 +290,8 @@ void emberAfRvcCleanModeClusterInitCallback(chip::EndpointId endpointId) VerifyOrDie(!gRvcCleanModeDelegate && !gRvcCleanModeInstance); gRvcCleanModeDelegate = std::make_unique(); - gRvcCleanModeInstance = std::make_unique(gRvcCleanModeDelegate.get(), endpointId, RvcCleanMode::Id, - chip::to_underlying(RvcCleanMode::Feature::kNoFeatures)); + gRvcCleanModeInstance = + std::make_unique(gRvcCleanModeDelegate.get(), endpointId, RvcCleanMode::Id, 0 /* No feature bits */); gRvcCleanModeInstance->Init(); } #endif // MATTER_DM_PLUGIN_RVC_CLEAN_MODE_SERVER diff --git a/examples/chef/common/chef-rvc-operational-state-delegate.cpp b/examples/chef/common/chef-rvc-operational-state-delegate.cpp index 36ff3e88fcd181..9b4118732ee165 100644 --- a/examples/chef/common/chef-rvc-operational-state-delegate.cpp +++ b/examples/chef/common/chef-rvc-operational-state-delegate.cpp @@ -35,10 +35,10 @@ static void onOperationalStateTimerTick(System::Layer * systemLayer, void * data DataModel::Nullable RvcOperationalStateDelegate::GetCountdownTime() { - if (mRunningTime > mPhaseDuration.Value()) + if (mCountdownTime.IsNull() || mRunningTime > mCountdownTime.Value()) return DataModel::NullNullable; - return DataModel::MakeNullable((uint32_t) (mPhaseDuration.Value() - mRunningTime)); + return DataModel::MakeNullable((uint32_t) (mCountdownTime.Value() - mRunningTime)); } CHIP_ERROR RvcOperationalStateDelegate::GetOperationalStateAtIndex(size_t index, GenericOperationalState & operationalState) @@ -62,10 +62,27 @@ CHIP_ERROR RvcOperationalStateDelegate::GetOperationalPhaseAtIndex(size_t index, void RvcOperationalStateDelegate::HandlePauseStateCallback(GenericOperationalError & err) { + OperationalState::OperationalStateEnum state = + static_cast(gRvcOperationalStateInstance->GetCurrentOperationalState()); + + if (state == OperationalState::OperationalStateEnum::kPaused) + { + err.Set(to_underlying(OperationalState::ErrorStateEnum::kNoError)); + return; + } + + if (state == OperationalState::OperationalStateEnum::kStopped || state == OperationalState::OperationalStateEnum::kError) + { + err.Set(to_underlying(OperationalState::ErrorStateEnum::kCommandInvalidInState)); + return; + } + // placeholder implementation - auto error = GetInstance()->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kPaused)); + auto error = gRvcOperationalStateInstance->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kPaused)); if (error == CHIP_NO_ERROR) { + (void) DeviceLayer::SystemLayer().StartTimer(System::Clock::Seconds16(1), onOperationalStateTimerTick, GetInstance()); + GetInstance()->UpdateCountdownTimeFromDelegate(); err.Set(to_underlying(OperationalState::ErrorStateEnum::kNoError)); } else @@ -76,10 +93,21 @@ void RvcOperationalStateDelegate::HandlePauseStateCallback(GenericOperationalErr void RvcOperationalStateDelegate::HandleResumeStateCallback(GenericOperationalError & err) { + OperationalState::OperationalStateEnum state = + static_cast(gRvcOperationalStateInstance->GetCurrentOperationalState()); + + if (state == OperationalState::OperationalStateEnum::kStopped || state == OperationalState::OperationalStateEnum::kError) + { + err.Set(to_underlying(OperationalState::ErrorStateEnum::kUnableToStartOrResume)); + return; + } + // placeholder implementation - auto error = GetInstance()->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kRunning)); + auto error = gRvcOperationalStateInstance->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kRunning)); if (error == CHIP_NO_ERROR) { + (void) DeviceLayer::SystemLayer().StartTimer(System::Clock::Seconds16(1), onOperationalStateTimerTick, GetInstance()); + GetInstance()->UpdateCountdownTimeFromDelegate(); err.Set(to_underlying(OperationalState::ErrorStateEnum::kNoError)); } else @@ -103,7 +131,8 @@ void RvcOperationalStateDelegate::HandleStartStateCallback(GenericOperationalErr auto error = GetInstance()->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kRunning)); if (error == CHIP_NO_ERROR) { - (void) DeviceLayer::SystemLayer().StartTimer(System::Clock::Seconds16(1), onOperationalStateTimerTick, this); + (void) DeviceLayer::SystemLayer().StartTimer(System::Clock::Seconds16(1), onOperationalStateTimerTick, GetInstance()); + GetInstance()->UpdateCountdownTimeFromDelegate(); err.Set(to_underlying(OperationalState::ErrorStateEnum::kNoError)); } else @@ -119,6 +148,7 @@ void RvcOperationalStateDelegate::HandleStopStateCallback(GenericOperationalErro if (error == CHIP_NO_ERROR) { (void) DeviceLayer::SystemLayer().CancelTimer(onOperationalStateTimerTick, this); + GetInstance()->UpdateCountdownTimeFromDelegate(); OperationalState::GenericOperationalError current_err(to_underlying(OperationalState::ErrorStateEnum::kNoError)); GetInstance()->GetCurrentOperationalError(current_err); @@ -130,6 +160,7 @@ void RvcOperationalStateDelegate::HandleStopStateCallback(GenericOperationalErro mRunningTime = 0; mPausedTime = 0; + mCountdownTime.SetNull(); err.Set(to_underlying(OperationalState::ErrorStateEnum::kNoError)); } else @@ -145,27 +176,54 @@ static void onOperationalStateTimerTick(System::Layer * systemLayer, void * data OperationalState::OperationalStateEnum state = static_cast(instance->GetCurrentOperationalState()); - auto countdown_time = delegate->GetCountdownTime(); - - if (countdown_time.ValueOr(1) > 0) + if (gRvcOperationalStateDelegate->mCountdownTime.IsNull()) { if (state == OperationalState::OperationalStateEnum::kRunning) { - delegate->mRunningTime++; - } - else if (state == OperationalState::OperationalStateEnum::kPaused) - { - delegate->mPausedTime++; + gRvcOperationalStateDelegate->mCountdownTime.SetNonNull( + static_cast(gRvcOperationalStateDelegate->kExampleCountDown)); + gRvcOperationalStateDelegate->mRunningTime = 0; + gRvcOperationalStateDelegate->mPausedTime = 0; } } - if (state == OperationalState::OperationalStateEnum::kRunning || state == OperationalState::OperationalStateEnum::kPaused) + if (state == OperationalState::OperationalStateEnum::kRunning) + { + gRvcOperationalStateDelegate->mRunningTime++; + } + else if (state == OperationalState::OperationalStateEnum::kPaused) + { + gRvcOperationalStateDelegate->mPausedTime++; + } + + uint32_t mPausedTime = gRvcOperationalStateDelegate->mPausedTime; + uint32_t mRunningTime = gRvcOperationalStateDelegate->mRunningTime; + + if (gRvcOperationalStateDelegate->mCountdownTime.Value() > mRunningTime) { (void) DeviceLayer::SystemLayer().StartTimer(System::Clock::Seconds16(1), onOperationalStateTimerTick, delegate); } else { (void) DeviceLayer::SystemLayer().CancelTimer(onOperationalStateTimerTick, delegate); + + CHIP_ERROR err = + gRvcOperationalStateInstance->SetOperationalState(to_underlying(OperationalState::OperationalStateEnum::kStopped)); + if (err == CHIP_NO_ERROR) + { + OperationalState::GenericOperationalError current_err(to_underlying(OperationalState::ErrorStateEnum::kNoError)); + gRvcOperationalStateInstance->GetCurrentOperationalError(current_err); + + Optional> totalTime((DataModel::Nullable(mPausedTime + mRunningTime))); + Optional> pausedTime((DataModel::Nullable(mPausedTime))); + + gRvcOperationalStateInstance->OnOperationCompletionDetected(static_cast(current_err.errorStateID), totalTime, + pausedTime); + + gRvcOperationalStateDelegate->mRunningTime = 0; + gRvcOperationalStateDelegate->mPausedTime = 0; + gRvcOperationalStateDelegate->mCountdownTime.SetNull(); + } } } @@ -200,8 +258,17 @@ chip::Protocols::InteractionModel::Status chefRvcOperationalStateWriteCallback(c } break; case chip::app::Clusters::RvcOperationalState::Attributes::OperationalState::Id: { - uint8_t m = static_cast(buffer[0]); - CHIP_ERROR err = gRvcOperationalStateInstance->SetOperationalState(m); + uint8_t currentState = gRvcOperationalStateInstance->GetCurrentOperationalState(); + uint8_t m = static_cast(buffer[0]); + CHIP_ERROR err = gRvcOperationalStateInstance->SetOperationalState(m); + + if (currentState == to_underlying(OperationalState::OperationalStateEnum::kStopped) && + m == to_underlying(OperationalState::OperationalStateEnum::kRunning)) + { + gRvcOperationalStateDelegate->mCountdownTime.SetNonNull( + static_cast(gRvcOperationalStateDelegate->kExampleCountDown)); + } + if (CHIP_NO_ERROR == err) { break; diff --git a/examples/chef/common/chef-rvc-operational-state-delegate.h b/examples/chef/common/chef-rvc-operational-state-delegate.h index 33b01d55201466..7aca1a86ed95fa 100644 --- a/examples/chef/common/chef-rvc-operational-state-delegate.h +++ b/examples/chef/common/chef-rvc-operational-state-delegate.h @@ -95,7 +95,8 @@ class RvcOperationalStateDelegate : public RvcOperationalState::Delegate uint32_t mRunningTime = 0; uint32_t mPausedTime = 0; - app::DataModel::Nullable mPhaseDuration; + app::DataModel::Nullable mCountdownTime; + const uint32_t kExampleCountDown = 30; private: Span mOperationalStateList; diff --git a/examples/chef/common/clusters/media-input/MediaInputManager.cpp b/examples/chef/common/clusters/media-input/MediaInputManager.cpp index f7e853cc46a40b..53cc22cd65cce8 100644 --- a/examples/chef/common/clusters/media-input/MediaInputManager.cpp +++ b/examples/chef/common/clusters/media-input/MediaInputManager.cpp @@ -15,27 +15,26 @@ * limitations under the License. */ +#include #include +#include + #ifdef MATTER_DM_PLUGIN_MEDIA_INPUT_SERVER #include "MediaInputManager.h" using namespace std; using namespace chip; using namespace chip::app::Clusters::MediaInput; +using Protocols::InteractionModel::Status; -MediaInputManager::MediaInputManager() +MediaInputManager::MediaInputManager(chip::EndpointId endpoint) : mEndpoint(endpoint) { - struct InputData inputData1(1, chip::app::Clusters::MediaInput::InputTypeEnum::kHdmi, "HDMI 1", - "High-Definition Multimedia Interface"); + struct InputData inputData1(1, InputTypeEnum::kHdmi, "HDMI 1", "High-Definition Multimedia Interface"); mInputs.push_back(inputData1); - struct InputData inputData2(2, chip::app::Clusters::MediaInput::InputTypeEnum::kHdmi, "HDMI 2", - "High-Definition Multimedia Interface"); + struct InputData inputData2(2, InputTypeEnum::kHdmi, "HDMI 2", "High-Definition Multimedia Interface"); mInputs.push_back(inputData2); - struct InputData inputData3(3, chip::app::Clusters::MediaInput::InputTypeEnum::kHdmi, "HDMI 3", - "High-Definition Multimedia Interface"); + struct InputData inputData3(3, InputTypeEnum::kHdmi, "HDMI 3", "High-Definition Multimedia Interface"); mInputs.push_back(inputData3); - - mCurrentInput = 1; } CHIP_ERROR MediaInputManager::HandleGetInputList(chip::app::AttributeValueEncoder & aEncoder) @@ -51,16 +50,32 @@ CHIP_ERROR MediaInputManager::HandleGetInputList(chip::app::AttributeValueEncode uint8_t MediaInputManager::HandleGetCurrentInput() { - return mCurrentInput; + uint8_t currentInput = 1; + Status status = Attributes::CurrentInput::Get(mEndpoint, ¤tInput); + if (Status::Success != status) + { + ChipLogError(Zcl, "Unable to get CurrentInput attribute, err:0x%x", to_underlying(status)); + } + return currentInput; } bool MediaInputManager::HandleSelectInput(const uint8_t index) { + if (HandleGetCurrentInput() == index) + { + ChipLogProgress(Zcl, "CurrentInput is same as new value: %u", index); + return true; + } for (auto const & inputData : mInputs) { if (inputData.index == index) { - mCurrentInput = index; + // Sync the CurrentInput to attribute storage while reporting changes + Status status = Attributes::CurrentInput::Set(mEndpoint, index); + if (Status::Success != status) + { + ChipLogError(Zcl, "CurrentInput is not stored successfully, err:0x%x", to_underlying(status)); + } return true; } } @@ -70,11 +85,12 @@ bool MediaInputManager::HandleSelectInput(const uint8_t index) bool MediaInputManager::HandleShowInputStatus() { + uint8_t currentInput = HandleGetCurrentInput(); ChipLogProgress(Zcl, " MediaInputManager::HandleShowInputStatus()"); for (auto const & inputData : mInputs) { ChipLogProgress(Zcl, " [%d] type=%d selected=%d name=%s desc=%s", inputData.index, - static_cast(inputData.inputType), (mCurrentInput == inputData.index ? 1 : 0), + static_cast(inputData.inputType), (currentInput == inputData.index ? 1 : 0), inputData.name.c_str(), inputData.description.c_str()); } return true; @@ -99,4 +115,15 @@ bool MediaInputManager::HandleRenameInput(const uint8_t index, const chip::CharS return false; } + +static std::map> gMediaInputManagerInstance{}; + +void emberAfMediaInputClusterInitCallback(EndpointId endpoint) +{ + ChipLogProgress(Zcl, "TV Linux App: MediaInput::SetDefaultDelegate, endpoint=%x", endpoint); + + gMediaInputManagerInstance[endpoint] = std::make_unique(endpoint); + + SetDefaultDelegate(endpoint, gMediaInputManagerInstance[endpoint].get()); +} #endif // MATTER_DM_PLUGIN_MEDIA_INPUT_SERVER diff --git a/examples/chef/common/clusters/media-input/MediaInputManager.h b/examples/chef/common/clusters/media-input/MediaInputManager.h index e5b88c5a7a67d5..d922d5aa650b59 100644 --- a/examples/chef/common/clusters/media-input/MediaInputManager.h +++ b/examples/chef/common/clusters/media-input/MediaInputManager.h @@ -29,7 +29,7 @@ class MediaInputManager : public chip::app::Clusters::MediaInput::Delegate using InputInfoType = chip::app::Clusters::MediaInput::Structs::InputInfoStruct::Type; public: - MediaInputManager(); + MediaInputManager(chip::EndpointId endpoint); CHIP_ERROR HandleGetInputList(chip::app::AttributeValueEncoder & aEncoder) override; uint8_t HandleGetCurrentInput() override; @@ -63,7 +63,7 @@ class MediaInputManager : public chip::app::Clusters::MediaInput::Delegate }; protected: - uint8_t mCurrentInput; + chip::EndpointId mEndpoint; std::vector mInputs; private: diff --git a/examples/chef/common/clusters/media-playback/MediaPlaybackManager.cpp b/examples/chef/common/clusters/media-playback/MediaPlaybackManager.cpp index 14be124252a7c0..db3af119c5b286 100644 --- a/examples/chef/common/clusters/media-playback/MediaPlaybackManager.cpp +++ b/examples/chef/common/clusters/media-playback/MediaPlaybackManager.cpp @@ -15,26 +15,34 @@ * limitations under the License. */ -#include -#ifdef MATTER_DM_PLUGIN_MEDIA_PLAYBACK_SERVER -#include "MediaPlaybackManager.h" #include #include - +#include #include +#ifdef MATTER_DM_PLUGIN_MEDIA_PLAYBACK_SERVER +#include "MediaPlaybackManager.h" using namespace std; +using namespace chip; +using namespace chip::app; using namespace chip::app::DataModel; using namespace chip::app::Clusters::MediaPlayback; -using namespace chip::Uint8; using chip::CharSpan; using chip::app::AttributeValueEncoder; using chip::app::CommandResponseHelper; +using chip::Protocols::InteractionModel::Status; PlaybackStateEnum MediaPlaybackManager::HandleGetCurrentState() { - return mCurrentState; + PlaybackStateEnum currentState = PlaybackStateEnum::kPlaying; + + Status status = Attributes::CurrentState::Get(mEndpoint, ¤tState); + if (Status::Success != status) + { + ChipLogError(Zcl, "Unable to get CurrentStage attribute, err:0x%x", to_underlying(status)); + } + return currentState; } uint64_t MediaPlaybackManager::HandleGetStartTime() @@ -54,7 +62,14 @@ CHIP_ERROR MediaPlaybackManager::HandleGetSampledPosition(AttributeValueEncoder float MediaPlaybackManager::HandleGetPlaybackSpeed() { - return mPlaybackSpeed; + float playbackSpeed = 1.0; + + Status status = Attributes::PlaybackSpeed::Get(mEndpoint, &playbackSpeed); + if (Status::Success != status) + { + ChipLogError(Zcl, "Unable to get PlaybackSpeed attribute, err:0x%x", to_underlying(status)); + } + return playbackSpeed; } uint64_t MediaPlaybackManager::HandleGetSeekRangeStart() @@ -99,10 +114,34 @@ CHIP_ERROR MediaPlaybackManager::HandleGetAvailableTextTracks(AttributeValueEnco }); } +CHIP_ERROR MediaPlaybackManager::HandleSetCurrentState(PlaybackStateEnum currentState) +{ + Status status = Attributes::CurrentState::Set(mEndpoint, currentState); + + if (Status::Success != status) + { + ChipLogError(Zcl, "Unable to set CurrentState attribute, 0x%x", to_underlying(status)); + } + + return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(status); +} + +CHIP_ERROR MediaPlaybackManager::HandleSetPlaybackSpeed(float playbackSpeed) +{ + Status status = Attributes::PlaybackSpeed::Set(mEndpoint, playbackSpeed); + + if (Status::Success != status) + { + ChipLogError(Zcl, "Unable to set PlaybackSpeed attribute, 0x%x", to_underlying(status)); + } + + return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(status); +} + void MediaPlaybackManager::HandlePlay(CommandResponseHelper & helper) { - mCurrentState = PlaybackStateEnum::kPlaying; - mPlaybackSpeed = 1; + HandleSetCurrentState(PlaybackStateEnum::kPlaying); + HandleSetPlaybackSpeed(1); Commands::PlaybackResponse::Type response; response.data = chip::MakeOptional(CharSpan::fromCharString("data response")); @@ -112,8 +151,8 @@ void MediaPlaybackManager::HandlePlay(CommandResponseHelper & helper) { - mCurrentState = PlaybackStateEnum::kPaused; - mPlaybackSpeed = 0; + HandleSetCurrentState(PlaybackStateEnum::kPaused); + HandleSetPlaybackSpeed(0); Commands::PlaybackResponse::Type response; response.data = chip::MakeOptional(CharSpan::fromCharString("data response")); @@ -123,8 +162,8 @@ void MediaPlaybackManager::HandlePause(CommandResponseHelper & helper) { - mCurrentState = PlaybackStateEnum::kNotPlaying; - mPlaybackSpeed = 0; + HandleSetCurrentState(PlaybackStateEnum::kNotPlaying); + HandleSetPlaybackSpeed(0); mPlaybackPosition = { 0, chip::app::DataModel::Nullable(0) }; Commands::PlaybackResponse::Type response; @@ -136,7 +175,9 @@ void MediaPlaybackManager::HandleStop(CommandResponseHelper & helper, const chip::Optional & audioAdvanceUnmuted) { - if (mPlaybackSpeed == kPlaybackMaxForwardSpeed) + float playbackSpeed = HandleGetPlaybackSpeed(); + + if (playbackSpeed == kPlaybackMaxForwardSpeed) { // if already at max speed, return error Commands::PlaybackResponse::Type response; @@ -146,13 +187,14 @@ void MediaPlaybackManager::HandleFastForward(CommandResponseHelper kPlaybackMaxForwardSpeed) + HandleSetCurrentState(PlaybackStateEnum::kPlaying); + // Normalize to correct range + playbackSpeed = (playbackSpeed <= 0 ? 1 : playbackSpeed * 2); + if (playbackSpeed > kPlaybackMaxForwardSpeed) { - // don't exceed max speed - mPlaybackSpeed = kPlaybackMaxForwardSpeed; + playbackSpeed = kPlaybackMaxForwardSpeed; } + HandleSetPlaybackSpeed(playbackSpeed); Commands::PlaybackResponse::Type response; response.data = chip::MakeOptional(CharSpan::fromCharString("data response")); @@ -162,8 +204,8 @@ void MediaPlaybackManager::HandleFastForward(CommandResponseHelper & helper) { - mCurrentState = PlaybackStateEnum::kPlaying; - mPlaybackSpeed = 1; + HandleSetCurrentState(PlaybackStateEnum::kPlaying); + HandleSetPlaybackSpeed(1); mPlaybackPosition = { 0, chip::app::DataModel::Nullable(0) }; Commands::PlaybackResponse::Type response; @@ -175,7 +217,9 @@ void MediaPlaybackManager::HandlePrevious(CommandResponseHelper & helper, const chip::Optional & audioAdvanceUnmuted) { - if (mPlaybackSpeed == kPlaybackMaxRewindSpeed) + float playbackSpeed = HandleGetPlaybackSpeed(); + + if (playbackSpeed == kPlaybackMaxRewindSpeed) { // if already at max speed in reverse, return error Commands::PlaybackResponse::Type response; @@ -185,13 +229,14 @@ void MediaPlaybackManager::HandleRewind(CommandResponseHelper= 0 ? -1 : mPlaybackSpeed * 2); - if (mPlaybackSpeed < kPlaybackMaxRewindSpeed) + HandleSetCurrentState(PlaybackStateEnum::kPlaying); + // Normalize to correct range + playbackSpeed = (playbackSpeed >= 0 ? -1 : playbackSpeed * 2); + if (playbackSpeed < kPlaybackMaxRewindSpeed) { - // don't exceed max rewind speed - mPlaybackSpeed = kPlaybackMaxRewindSpeed; + playbackSpeed = kPlaybackMaxRewindSpeed; } + HandleSetPlaybackSpeed(playbackSpeed); Commands::PlaybackResponse::Type response; response.data = chip::MakeOptional(CharSpan::fromCharString("data response")); @@ -249,8 +294,8 @@ void MediaPlaybackManager::HandleSeek(CommandResponseHelper & helper) { - mCurrentState = PlaybackStateEnum::kPlaying; - mPlaybackSpeed = 1; + HandleSetCurrentState(PlaybackStateEnum::kPlaying); + HandleSetPlaybackSpeed(1); mPlaybackPosition = { 0, chip::app::DataModel::Nullable(0) }; Commands::PlaybackResponse::Type response; @@ -338,4 +383,15 @@ uint16_t MediaPlaybackManager::GetClusterRevision(chip::EndpointId endpoint) return clusterRevision; } +static std::map> gMediaPlaybackManagerInstance{}; + +void emberAfMediaPlaybackClusterInitCallback(EndpointId endpoint) +{ + ChipLogProgress(Zcl, "TV Linux App: MediaPlayback::SetDefaultDelegate, endpoint=%x", endpoint); + + gMediaPlaybackManagerInstance[endpoint] = std::make_unique(endpoint); + + SetDefaultDelegate(endpoint, gMediaPlaybackManagerInstance[endpoint].get()); +} + #endif /// MATTER_DM_PLUGIN_MEDIA_PLAYBACK_SERVER diff --git a/examples/chef/common/clusters/media-playback/MediaPlaybackManager.h b/examples/chef/common/clusters/media-playback/MediaPlaybackManager.h index 79bca10a3c8fb6..3f436b70a4b9ae 100644 --- a/examples/chef/common/clusters/media-playback/MediaPlaybackManager.h +++ b/examples/chef/common/clusters/media-playback/MediaPlaybackManager.h @@ -30,6 +30,8 @@ class MediaPlaybackManager : public chip::app::Clusters::MediaPlayback::Delegate using Feature = chip::app::Clusters::MediaPlayback::Feature; public: + MediaPlaybackManager(chip::EndpointId endpoint) : mEndpoint(endpoint){}; + chip::app::Clusters::MediaPlayback::PlaybackStateEnum HandleGetCurrentState() override; uint64_t HandleGetStartTime() override; uint64_t HandleGetDuration() override; @@ -42,6 +44,9 @@ class MediaPlaybackManager : public chip::app::Clusters::MediaPlayback::Delegate CHIP_ERROR HandleGetActiveTextTrack(chip::app::AttributeValueEncoder & aEncoder) override; CHIP_ERROR HandleGetAvailableTextTracks(chip::app::AttributeValueEncoder & aEncoder) override; + CHIP_ERROR HandleSetCurrentState(chip::app::Clusters::MediaPlayback::PlaybackStateEnum currentState); + CHIP_ERROR HandleSetPlaybackSpeed(float playbackSpeed); + void HandlePlay(chip::app::CommandResponseHelper & helper) override; void HandlePause(chip::app::CommandResponseHelper & helper) override; void HandleStop(chip::app::CommandResponseHelper & helper) override; @@ -66,10 +71,9 @@ class MediaPlaybackManager : public chip::app::Clusters::MediaPlayback::Delegate uint16_t GetClusterRevision(chip::EndpointId endpoint) override; protected: + chip::EndpointId mEndpoint; // NOTE: it does not make sense to have default state of playing with a speed of 0, but // the CI test cases expect these values, and need to be fixed. - chip::app::Clusters::MediaPlayback::PlaybackStateEnum mCurrentState = - chip::app::Clusters::MediaPlayback::PlaybackStateEnum::kPlaying; PlaybackPositionType mPlaybackPosition = { 0, chip::app::DataModel::Nullable(0) }; TrackType mActiveAudioTrack = { chip::CharSpan("activeAudioTrackId_0", 20), chip::app::DataModel::Nullable( @@ -101,8 +105,7 @@ class MediaPlaybackManager : public chip::app::Clusters::MediaPlayback::Delegate chip::Optional>( { chip::app::DataModel::MakeNullable(chip::CharSpan("displayName2", 12)) }) }) } }; - float mPlaybackSpeed = 1.0; - uint64_t mStartTime = 0; + uint64_t mStartTime = 0; // Magic number for testing. uint64_t mDuration = 80000; bool mAudioAdvanceMuted = false; diff --git a/examples/chef/common/stubs.cpp b/examples/chef/common/stubs.cpp index 8771bf78dccaf5..f7b4b491451b0e 100644 --- a/examples/chef/common/stubs.cpp +++ b/examples/chef/common/stubs.cpp @@ -238,27 +238,6 @@ void emberAfLowPowerClusterInitCallback(EndpointId endpoint) } #endif -#ifdef MATTER_DM_PLUGIN_MEDIA_INPUT_SERVER -#include "media-input/MediaInputManager.h" -static MediaInputManager mediaInputManager; -void emberAfMediaInputClusterInitCallback(EndpointId endpoint) -{ - ChipLogProgress(Zcl, "TV Linux App: MediaInput::SetDefaultDelegate"); - MediaInput::SetDefaultDelegate(endpoint, &mediaInputManager); -} -#endif - -#ifdef MATTER_DM_PLUGIN_MEDIA_PLAYBACK_SERVER -#include "media-playback/MediaPlaybackManager.h" -static MediaPlaybackManager mediaPlaybackManager; - -void emberAfMediaPlaybackClusterInitCallback(EndpointId endpoint) -{ - ChipLogProgress(Zcl, "TV Linux App: MediaPlayback::SetDefaultDelegate"); - MediaPlayback::SetDefaultDelegate(endpoint, &mediaPlaybackManager); -} -#endif - #ifdef MATTER_DM_PLUGIN_TARGET_NAVIGATOR_SERVER #include "target-navigator/TargetNavigatorManager.h" static TargetNavigatorManager targetNavigatorManager; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 5edebd77931b80..1d27e85467bc08 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter @@ -704,14 +704,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -738,7 +734,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -992,67 +988,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1917,7 +1852,7 @@ cluster FixedLabel = 64 { readonly attribute int16u clusterRevision = 65533; } -/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ +/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */ cluster OccupancySensing = 1030 { revision 5; @@ -1955,6 +1890,10 @@ cluster OccupancySensing = 1030 { int16u holdTimeDefault = 2; } + info event OccupancyChanged = 0 { + OccupancyBitmap occupancy = 0; + } + readonly attribute OccupancyBitmap occupancy = 0; readonly attribute OccupancySensorTypeEnum occupancySensorType = 1; readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2; @@ -2047,21 +1986,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - callback attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap index 444408ac97d1ac..1636d8aab6b119 100644 --- a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.zap @@ -929,170 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, @@ -4783,10 +4619,10 @@ "side": "client", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter index e4584f1ee4d086..a9706c7fb0fd64 100644 --- a/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter +++ b/examples/chef/devices/rootnode_airpurifier_73a6fe2651.matter @@ -481,14 +481,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -515,7 +511,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter index d47b3a90922d57..2af9aa19a2f1f5 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.matter @@ -486,14 +486,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -520,7 +516,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both diff --git a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap index 0b88b6a936cad5..0cfb36a59885d7 100644 --- a/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap +++ b/examples/chef/devices/rootnode_airpurifier_airqualitysensor_temperaturesensor_humiditysensor_thermostat_56de3d5f45.zap @@ -7991,7 +7991,7 @@ "code": 18, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -8007,7 +8007,7 @@ "code": 21, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -8023,7 +8023,7 @@ "code": 22, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter index e155c0bb946563..ee845c7c6cffda 100644 --- a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter +++ b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter @@ -409,14 +409,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -443,7 +439,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -697,67 +693,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ cluster PowerSource = 47 { revision 1; // NOTE: Default/not specifically set @@ -2478,19 +2413,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; diff --git a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.zap b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.zap index 535aa424e1d2a7..7154d9edf4c91f 100644 --- a/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.zap +++ b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.zap @@ -929,138 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index 84f789e40a1110..bded4104eae359 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter @@ -606,14 +606,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -640,7 +636,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -894,23 +890,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -2375,13 +2354,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; @@ -2522,7 +2494,7 @@ endpoint 1 { server cluster OnOff { - ram attribute onOff default = 0; + persist attribute onOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2578,7 +2550,7 @@ endpoint 1 { server cluster TargetNavigator { emits event TargetUpdated; callback attribute targetList; - ram attribute currentTarget default = 0; + persist attribute currentTarget default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2592,11 +2564,11 @@ endpoint 1 { server cluster MediaPlayback { emits event StateChanged; - ram attribute currentState default = 0x00; + persist attribute currentState default = 0x00; ram attribute startTime default = 0x00; ram attribute duration default = 0; callback attribute sampledPosition; - ram attribute playbackSpeed default = 0; + ram attribute playbackSpeed default = 1; ram attribute seekRangeEnd; ram attribute seekRangeStart; callback attribute generatedCommandList; @@ -2622,7 +2594,7 @@ endpoint 1 { server cluster MediaInput { callback attribute inputList; - ram attribute currentInput default = 0x00; + persist attribute currentInput default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2661,7 +2633,7 @@ endpoint 1 { server cluster AudioOutput { callback attribute outputList; - ram attribute currentOutput default = 0x00; + persist attribute currentOutput default = 0x00; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2692,7 +2664,7 @@ endpoint 2 { } server cluster OnOff { - ram attribute onOff default = 0; + persist attribute onOff default = 0; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2706,7 +2678,7 @@ endpoint 2 { } server cluster LevelControl { - ram attribute currentLevel default = 0x00; + persist attribute currentLevel default = 0x00; ram attribute minLevel default = 0x00; ram attribute maxLevel default = 0xFE; ram attribute options default = 0x00; diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap index 6a4517c2962607..43d2e0e15b5146 100644 --- a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap +++ b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.zap @@ -929,80 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, @@ -2444,7 +2370,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -3080,7 +3006,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -3309,7 +3235,7 @@ "side": "server", "type": "PlaybackStateEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -3376,7 +3302,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3586,7 +3512,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -3982,7 +3908,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -4315,7 +4241,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -4503,7 +4429,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index d8758b3043edaa..84b188e58f4fe8 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter @@ -683,14 +683,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -717,7 +713,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -2276,15 +2272,15 @@ endpoint 1 { } server cluster OnOff { - ram attribute onOff default = 0; + persist attribute onOff default = 0; ram attribute globalSceneControl default = 1; ram attribute onTime default = 0; ram attribute offWaitTime default = 0; - ram attribute startUpOnOff; + persist attribute startUpOnOff; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + ram attribute featureMap default = 1; ram attribute clusterRevision default = 5; handle command Off; @@ -2296,15 +2292,17 @@ endpoint 1 { } server cluster LevelControl { - ram attribute currentLevel default = 0x00; + persist attribute currentLevel default = 0x00; ram attribute remainingTime default = 0x0000; - ram attribute options default = 0x00; + ram attribute minLevel default = 0x1; + ram attribute maxLevel default = 0xFE; + ram attribute options default = 0x01; ram attribute onLevel; - ram attribute startUpCurrentLevel; + persist attribute startUpCurrentLevel; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 0; + ram attribute featureMap default = 0x3; ram attribute clusterRevision default = 6; handle command MoveToLevel; @@ -2331,53 +2329,23 @@ endpoint 1 { server cluster ColorControl { ram attribute remainingTime default = 0x0000; - ram attribute colorTemperatureMireds default = 0x00FA; - ram attribute colorMode default = 0x02; + persist attribute colorTemperatureMireds default = 0x00FA; + persist attribute colorMode default = 0x02; ram attribute options default = 0x00; ram attribute numberOfPrimaries; - ram attribute primary1X; - ram attribute primary1Y; - ram attribute primary1Intensity; - ram attribute primary2X; - ram attribute primary2Y; - ram attribute primary2Intensity; - ram attribute primary3X; - ram attribute primary3Y; - ram attribute primary3Intensity; - ram attribute primary4X; - ram attribute primary4Y; - ram attribute primary4Intensity; - ram attribute primary5X; - ram attribute primary5Y; - ram attribute primary5Intensity; - ram attribute primary6X; - ram attribute primary6Y; - ram attribute primary6Intensity; - ram attribute enhancedCurrentHue default = 0x0000; - ram attribute enhancedColorMode default = 0x02; - ram attribute colorCapabilities default = 0x0000; - ram attribute colorTempPhysicalMinMireds default = 0x0000; - ram attribute colorTempPhysicalMaxMireds default = 0xFEFF; + persist attribute enhancedColorMode default = 0x02; + ram attribute colorCapabilities default = 0x0010; + ram attribute colorTempPhysicalMinMireds default = 0x009A; + ram attribute colorTempPhysicalMaxMireds default = 0x01C6; ram attribute coupleColorTempToLevelMinMireds; - ram attribute startUpColorTemperatureMireds; + persist attribute startUpColorTemperatureMireds default = 0x00FA; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; ram attribute featureMap default = 0x0010; ram attribute clusterRevision default = 7; - handle command MoveToHue; - handle command MoveHue; - handle command StepHue; - handle command MoveToSaturation; - handle command MoveSaturation; - handle command StepSaturation; - handle command MoveToHueAndSaturation; - handle command MoveToColor; - handle command MoveColor; - handle command StepColor; handle command MoveToColorTemperature; - handle command EnhancedMoveToHue; handle command EnhancedMoveHue; handle command EnhancedStepHue; handle command EnhancedMoveToHueAndSaturation; diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap index d9ba9c9926b329..a274b1055195f9 100644 --- a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap +++ b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.zap @@ -2664,7 +2664,7 @@ "side": "server", "type": "boolean", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0", @@ -2728,10 +2728,10 @@ "side": "server", "type": "StartUpOnOffEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2795,7 +2795,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2900,7 +2900,7 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00", @@ -2925,6 +2925,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "MinLevel", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxLevel", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0xFE", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "Options", "code": 15, @@ -2935,7 +2967,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x00", + "defaultValue": "0x01", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2951,7 +2983,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2964,10 +2996,10 @@ "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3031,7 +3063,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3217,86 +3249,6 @@ "side": "server", "enabled": 1, "commands": [ - { - "name": "MoveToHue", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "MoveHue", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StepHue", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "MoveToSaturation", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "MoveSaturation", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StepSaturation", - "code": 5, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "MoveToHueAndSaturation", - "code": 6, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "MoveToColor", - "code": 7, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "MoveColor", - "code": 8, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StepColor", - "code": 9, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, { "name": "MoveToColorTemperature", "code": 10, @@ -3305,14 +3257,6 @@ "isIncoming": 1, "isEnabled": 1 }, - { - "name": "EnhancedMoveToHue", - "code": 64, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, { "name": "EnhancedMoveHue", "code": 65, @@ -3394,7 +3338,7 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x00FA", @@ -3408,9 +3352,9 @@ "code": 8, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "ColorModeEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x02", @@ -3424,7 +3368,7 @@ "code": 15, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "OptionsBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3445,311 +3389,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary1X", - "code": 17, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary1Y", - "code": 18, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary1Intensity", - "code": 19, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary2X", - "code": 21, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary2Y", - "code": 22, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary2Intensity", - "code": 23, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary3X", - "code": 25, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary3Y", - "code": 26, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary3Intensity", - "code": 27, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary4X", - "code": 32, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary4Y", - "code": 33, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary4Intensity", - "code": 34, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary5X", - "code": 36, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary5Y", - "code": 37, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary5Intensity", - "code": 38, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary6X", - "code": 40, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary6Y", - "code": 41, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "Primary6Intensity", - "code": 42, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EnhancedCurrentHue", - "code": 16384, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3760,9 +3400,9 @@ "code": 16385, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "EnhancedColorModeEnum", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, "defaultValue": "0x02", @@ -3776,12 +3416,12 @@ "code": 16394, "mfgCode": null, "side": "server", - "type": "bitmap16", + "type": "ColorCapabilitiesBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x0010", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3797,7 +3437,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x009A", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3813,7 +3453,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFEFF", + "defaultValue": "0x01C6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3842,10 +3482,10 @@ "side": "server", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00FA", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3954,4 +3594,4 @@ "parentEndpointIdentifier": null } ] -} \ No newline at end of file +} diff --git a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter index d10dce747c4695..8b30190553c843 100644 --- a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter +++ b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter @@ -409,14 +409,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -443,7 +439,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -1908,6 +1904,8 @@ internal cluster UnitTesting = 4294048773 { attribute TestGlobalEnum globalEnum = 51; attribute TestGlobalStruct globalStruct = 52; attribute optional boolean unsupported = 255; + attribute optional int8u readFailureCode = 12288; + attribute optional int32u failureInt32U = 12289; attribute nullable boolean nullableBoolean = 16384; attribute nullable Bitmap8MaskMap nullableBitmap8 = 16385; attribute nullable Bitmap16MaskMap nullableBitmap16 = 16386; diff --git a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap index 02a553e03f9cd1..2c65da229ebbe4 100644 --- a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap +++ b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.zap @@ -4128,7 +4128,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4704,7 +4704,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index eff62c6119120c..fd8ddbe72bc1ca 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter @@ -507,14 +507,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -541,7 +537,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -795,67 +791,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ cluster PowerSource = 47 { revision 1; // NOTE: Default/not specifically set @@ -1961,21 +1896,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap index d050409f3625c6..78408b145c9317 100644 --- a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap +++ b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.zap @@ -929,170 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index 8b8c2003f7bc29..b6ca20a4a986e9 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter @@ -704,14 +704,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -738,7 +734,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -992,67 +988,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1812,7 +1747,7 @@ cluster FixedLabel = 64 { readonly attribute int16u clusterRevision = 65533; } -/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ +/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */ cluster OccupancySensing = 1030 { revision 5; @@ -1850,6 +1785,10 @@ cluster OccupancySensing = 1030 { int16u holdTimeDefault = 2; } + info event OccupancyChanged = 0 { + OccupancyBitmap occupancy = 0; + } + readonly attribute OccupancyBitmap occupancy = 0; readonly attribute OccupancySensorTypeEnum occupancySensorType = 1; readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2; @@ -1944,21 +1883,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap index 3feb19881c6a29..fc6b2773a67e86 100644 --- a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap +++ b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.zap @@ -961,170 +961,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, @@ -3520,10 +3356,10 @@ "side": "client", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter index 0bf5f933e3d543..564154ce2112c6 100644 --- a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter +++ b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter @@ -704,14 +704,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -738,7 +734,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -992,67 +988,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1968,7 +1903,7 @@ provisional cluster ScenesManagement = 98 { fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64; } -/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ +/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */ cluster OccupancySensing = 1030 { revision 5; @@ -2006,6 +1941,10 @@ cluster OccupancySensing = 1030 { int16u holdTimeDefault = 2; } + info event OccupancyChanged = 0 { + OccupancyBitmap occupancy = 0; + } + readonly attribute OccupancyBitmap occupancy = 0; readonly attribute OccupancySensorTypeEnum occupancySensorType = 1; readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2; @@ -2098,19 +2037,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; diff --git a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.zap b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.zap index 275f5f81144816..09dfe991518468 100644 --- a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.zap +++ b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.zap @@ -929,138 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, @@ -3813,10 +3681,10 @@ "side": "client", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter index c8e41990993d27..9a567896dfdd24 100644 --- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter @@ -409,14 +409,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -443,7 +439,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -543,67 +539,6 @@ cluster BasicInformation = 40 { command MfgSpecificPing(): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Nodes should be expected to be deployed to any and all regions of the world. These global regions may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a @@ -1503,25 +1438,6 @@ endpoint 0 { ram attribute clusterRevision default = 3; } - server cluster LocalizationConfiguration { - persist attribute activeLocale default = "en-US"; - callback attribute supportedLocales; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster UnitLocalization { persist attribute temperatureUnit default = 0; callback attribute generatedCommandList; diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap b/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap index 770fe6edaf16d3..e0ee90ac36fc3b 100644 --- a/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap +++ b/examples/chef/devices/rootnode_dishwasher_cc105034fe.zap @@ -958,234 +958,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "en-US", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "Unit Localization", "code": 45, diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 71f96dbdf077d3..fc6ef7614fc562 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter @@ -409,14 +409,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -443,7 +439,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -697,67 +693,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to describe the configuration and capabilities of a physical power source that provides power to the Node. */ cluster PowerSource = 47 { revision 1; // NOTE: Default/not specifically set @@ -2497,21 +2432,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap index 50e1a4bf1da25c..a08fcd9f2f02b7 100644 --- a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap +++ b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.zap @@ -929,170 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 0ef1c969727a6d..70713aa72d3a44 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter @@ -704,14 +704,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -738,7 +734,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -992,67 +988,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -2210,21 +2145,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; @@ -2468,10 +2388,10 @@ endpoint 1 { ram attribute colorLoopStartEnhancedHue default = 0x2300; ram attribute colorLoopStoredEnhancedHue default = 0x0000; ram attribute colorCapabilities default = 0x0000; - ram attribute colorTempPhysicalMinMireds default = 0x0000; - ram attribute colorTempPhysicalMaxMireds default = 0xFEFF; + ram attribute colorTempPhysicalMinMireds default = 0x009A; + ram attribute colorTempPhysicalMaxMireds default = 0x01C6; ram attribute coupleColorTempToLevelMinMireds default = 0x0000; - ram attribute startUpColorTemperatureMireds default = 0; + ram attribute startUpColorTemperatureMireds default = 0x00FA; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap index f0fc3c6c264c20..5cfcfdfa3a27a8 100644 --- a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap +++ b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.zap @@ -929,170 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, @@ -3720,7 +3556,7 @@ "code": 8, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "ColorModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3736,7 +3572,7 @@ "code": 15, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "OptionsBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3784,7 +3620,7 @@ "code": 16385, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "EnhancedColorModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3880,7 +3716,7 @@ "code": 16394, "mfgCode": null, "side": "server", - "type": "bitmap16", + "type": "ColorCapabilitiesBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3901,7 +3737,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x009A", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3917,7 +3753,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFEFF", + "defaultValue": "0x01C6", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3949,7 +3785,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": "0x00FA", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 05a176ee9ab710..1d3ab9d65ac6ad 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter @@ -486,14 +486,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -520,7 +516,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -774,67 +770,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1746,22 +1681,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap index 29c2139fd0a09f..2ee1ba966b139a 100644 --- a/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap +++ b/examples/chef/devices/rootnode_fan_7N2TobIlOX.zap @@ -929,186 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 93eac702dcbc06..522000c18f2b44 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter @@ -507,14 +507,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -541,7 +537,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -795,67 +791,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1701,21 +1636,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap index 09593e5b109f30..3974dabbc27d78 100644 --- a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap +++ b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.zap @@ -929,170 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, diff --git a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter index 8748b8cd13b81f..98e363345d855c 100644 --- a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter +++ b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter @@ -409,14 +409,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -443,7 +439,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -1255,7 +1251,7 @@ cluster GeneralDiagnostics = 51 { Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ cluster Switch = 59 { - revision 1; + revision 2; bitmap Feature : bitmap32 { kLatchingSwitch = 0x1; diff --git a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.zap b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.zap index 40df85e6248d6e..6860a53833d87f 100644 --- a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.zap +++ b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.zap @@ -2801,4 +2801,4 @@ "parentEndpointIdentifier": null } ] -} +} \ No newline at end of file diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter index 4c8e67c11e7726..57040749ebc510 100644 --- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter +++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter @@ -409,14 +409,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -443,7 +439,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -1255,7 +1251,7 @@ cluster GeneralDiagnostics = 51 { Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ cluster Switch = 59 { - revision 1; + revision 2; bitmap Feature : bitmap32 { kLatchingSwitch = 0x1; diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap index 7404c36bb6a120..79ec3559c8319f 100644 --- a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap +++ b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.zap @@ -2780,4 +2780,4 @@ "parentEndpointIdentifier": null } ] -} +} \ No newline at end of file diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 84b5d949b6eeba..6313ced446ae52 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter @@ -704,14 +704,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -738,7 +734,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -992,67 +988,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -2319,21 +2254,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap index 88f0e7a0408646..483f04f74af7e0 100644 --- a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap +++ b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.zap @@ -17,13 +17,6 @@ } ], "package": [ - { - "pathRelativity": "relativeToZap", - "path": "../../../src/app/zap-templates/app-templates.json", - "type": "gen-templates-json", - "category": "matter", - "version": "chip-v1" - }, { "pathRelativity": "relativeToZap", "path": "../../../src/app/zap-templates/zcl/zcl.json", @@ -31,6 +24,13 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "category": "matter", + "version": "chip-v1" } ], "endpointTypes": [ @@ -929,170 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index adc500a4771045..900b2933d0c4fc 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter @@ -507,14 +507,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -541,7 +537,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -795,67 +791,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1701,21 +1636,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap index 9af0c6f4e97924..11d5fb7f1dee99 100644 --- a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap +++ b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.zap @@ -929,170 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter index 06e8ba84d349b6..e160cd4fe8cb82 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter @@ -409,14 +409,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -443,7 +439,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -543,67 +539,6 @@ cluster BasicInformation = 40 { command MfgSpecificPing(): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Nodes should be expected to be deployed to any and all regions of the world. These global regions may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a @@ -1368,6 +1303,16 @@ cluster LaundryWasherMode = 81 { revision 2; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kNormal = 16384; kDelicate = 16385; kHeavy = 16386; @@ -1582,25 +1527,6 @@ endpoint 0 { ram attribute clusterRevision default = 3; } - server cluster LocalizationConfiguration { - persist attribute activeLocale default = "en-US"; - callback attribute supportedLocales; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster UnitLocalization { persist attribute temperatureUnit default = 0; callback attribute generatedCommandList; diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap index f023dad7d8e8a4..7b3d2d49a9a95d 100644 --- a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap +++ b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.zap @@ -958,234 +958,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "en-US", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "Unit Localization", "code": 45, diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index be3a039189a5ed..724f3b69af8a2c 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter @@ -507,14 +507,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -541,7 +537,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -795,67 +791,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1707,21 +1642,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap index e6c9ce20572a5e..459c52fe5a2570 100644 --- a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap +++ b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.zap @@ -929,170 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 146cc74bf0526f..de46def1ea4999 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter @@ -507,14 +507,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -541,7 +537,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -795,67 +791,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1615,7 +1550,7 @@ cluster FixedLabel = 64 { readonly attribute int16u clusterRevision = 65533; } -/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ +/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */ cluster OccupancySensing = 1030 { revision 5; @@ -1653,6 +1588,10 @@ cluster OccupancySensing = 1030 { int16u holdTimeDefault = 2; } + info event OccupancyChanged = 0 { + OccupancyBitmap occupancy = 0; + } + readonly attribute OccupancyBitmap occupancy = 0; readonly attribute OccupancySensorTypeEnum occupancySensorType = 1; readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2; @@ -1745,21 +1684,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; @@ -1896,7 +1820,7 @@ endpoint 0 { } } endpoint 1 { - device type ma_occupancysensor = 263, version 1; + device type ma_occupancysensor = 263, version 4; binding cluster Groups; binding cluster Binding; diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap index 94cd749abacb5c..e6b4dcef3ed3ae 100644 --- a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap +++ b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.zap @@ -929,170 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, @@ -2484,7 +2320,7 @@ } ], "deviceVersions": [ - 1 + 4 ], "deviceIdentifiers": [ 263 @@ -2974,10 +2810,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3022,4 +2858,4 @@ "parentEndpointIdentifier": null } ] -} +} \ No newline at end of file diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 4627385f5a4c44..dc0c1077468544 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter @@ -704,14 +704,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -738,7 +734,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -992,67 +988,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1882,21 +1817,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; @@ -2032,7 +1952,7 @@ endpoint 0 { ram attribute clusterRevision default = 1; } } -endpoint 1 { +endpoint 13 { device type ma_onofflight = 256, version 1; binding cluster Binding; diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap index e8625f2f612caf..53e30c1ed298cd 100644 --- a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap +++ b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.zap @@ -929,170 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, @@ -3473,7 +3309,7 @@ "endpointTypeName": "Anonymous Endpoint Type", "endpointTypeIndex": 1, "profileId": 259, - "endpointId": 1, + "endpointId": 13, "networkId": 0, "parentEndpointIdentifier": null } diff --git a/examples/chef/devices/rootnode_onofflight_samplemei.matter b/examples/chef/devices/rootnode_onofflight_samplemei.matter index 90131350b3ca47..75c0b20fb975a7 100644 --- a/examples/chef/devices/rootnode_onofflight_samplemei.matter +++ b/examples/chef/devices/rootnode_onofflight_samplemei.matter @@ -704,14 +704,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -738,7 +734,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -992,67 +988,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1914,21 +1849,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; diff --git a/examples/chef/devices/rootnode_onofflight_samplemei.zap b/examples/chef/devices/rootnode_onofflight_samplemei.zap index 6670453d47603e..30dca3d1e54ebf 100644 --- a/examples/chef/devices/rootnode_onofflight_samplemei.zap +++ b/examples/chef/devices/rootnode_onofflight_samplemei.zap @@ -929,170 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index cffe70d9aab388..18c776de2ab970 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -433,78 +433,6 @@ cluster OnOff = 6 { command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; } -/** Attributes and commands for switching devices between 'On' and 'Off' states. */ -cluster OnOff = 6 { - revision 6; - - enum DelayedAllOffEffectVariantEnum : enum8 { - kDelayedOffFastFade = 0; - kNoFade = 1; - kDelayedOffSlowFade = 2; - } - - enum DyingLightEffectVariantEnum : enum8 { - kDyingLightFadeOff = 0; - } - - enum EffectIdentifierEnum : enum8 { - kDelayedAllOff = 0; - kDyingLight = 1; - } - - enum StartUpOnOffEnum : enum8 { - kOff = 0; - kOn = 1; - kToggle = 2; - } - - bitmap Feature : bitmap32 { - kLighting = 0x1; - kDeadFrontBehavior = 0x2; - kOffOnly = 0x4; - } - - bitmap OnOffControlBitmap : bitmap8 { - kAcceptOnlyWhenOn = 0x1; - } - - readonly attribute boolean onOff = 0; - readonly attribute optional boolean globalSceneControl = 16384; - attribute optional int16u onTime = 16385; - attribute optional int16u offWaitTime = 16386; - attribute access(write: manage) optional nullable StartUpOnOffEnum startUpOnOff = 16387; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; - - request struct OffWithEffectRequest { - EffectIdentifierEnum effectIdentifier = 0; - enum8 effectVariant = 1; - } - - request struct OnWithTimedOffRequest { - OnOffControlBitmap onOffControl = 0; - int16u onTime = 1; - int16u offWaitTime = 2; - } - - /** On receipt of this command, a device SHALL enter its ‘Off’ state. This state is device dependent, but it is recommended that it is used for power off or similar functions. On receipt of the Off command, the OnTime attribute SHALL be set to 0. */ - command Off(): DefaultSuccess = 0; - /** On receipt of this command, a device SHALL enter its ‘On’ state. This state is device dependent, but it is recommended that it is used for power on or similar functions. On receipt of the On command, if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. */ - command On(): DefaultSuccess = 1; - /** On receipt of this command, if a device is in its ‘Off’ state it SHALL enter its ‘On’ state. Otherwise, if it is in its ‘On’ state it SHALL enter its ‘Off’ state. On receipt of the Toggle command, if the value of the OnOff attribute is equal to FALSE and if the value of the OnTime attribute is equal to 0, the device SHALL set the OffWaitTime attribute to 0. If the value of the OnOff attribute is equal to TRUE, the OnTime attribute SHALL be set to 0. */ - command Toggle(): DefaultSuccess = 2; - /** The OffWithEffect command allows devices to be turned off using enhanced ways of fading. */ - command OffWithEffect(OffWithEffectRequest): DefaultSuccess = 64; - /** The OnWithRecallGlobalScene command allows the recall of the settings when the device was turned off. */ - command OnWithRecallGlobalScene(): DefaultSuccess = 65; - /** The OnWithTimedOff command allows devices to be turned on for a specific duration with a guarded off duration so that SHOULD the device be subsequently switched off, further OnWithTimedOff commands, received during this time, are prevented from turning the devices back on. */ - command OnWithTimedOff(OnWithTimedOffRequest): DefaultSuccess = 66; -} - /** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ cluster Descriptor = 29 { revision 2; @@ -651,14 +579,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -685,7 +609,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -939,67 +863,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1829,21 +1692,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; @@ -2017,19 +1865,6 @@ endpoint 1 { handle command AddGroupIfIdentifying; } - server cluster OnOff { - ram attribute onOff default = 0; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 5; - - handle command Off; - handle command On; - handle command Toggle; - } - server cluster Descriptor { callback attribute deviceTypeList; callback attribute serverList; diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap index be0a44c92a9b74..ff4a49b7778298 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.zap @@ -929,170 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, @@ -2865,138 +2701,6 @@ } ] }, - { - "name": "On/Off", - "code": 6, - "mfgCode": null, - "define": "ON_OFF_CLUSTER", - "side": "server", - "enabled": 1, - "commands": [ - { - "name": "Off", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "On", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "Toggle", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "OnOff", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "boolean", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "5", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "Descriptor", "code": 29, @@ -3198,4 +2902,4 @@ "parentEndpointIdentifier": null } ] -} \ No newline at end of file +} diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index a5e0f5505dffd8..d8c6175497d76e 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter @@ -579,14 +579,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -613,7 +609,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -867,67 +863,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1757,21 +1692,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; diff --git a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap index 356230f6e6cd89..99f826d194b05a 100644 --- a/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap +++ b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.zap @@ -929,170 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 2b9b4036e638f5..db33ccdc120233 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter @@ -507,14 +507,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -541,7 +537,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -795,67 +791,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1728,21 +1663,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap index 00a5272aa76766..21c60d8cef2350 100644 --- a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap +++ b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.zap @@ -929,170 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.matter b/examples/chef/devices/rootnode_pump_5f904818cc.matter index cf42feded0cee8..a28cc3fe719da3 100644 --- a/examples/chef/devices/rootnode_pump_5f904818cc.matter +++ b/examples/chef/devices/rootnode_pump_5f904818cc.matter @@ -481,14 +481,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -515,7 +511,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -615,67 +611,6 @@ cluster BasicInformation = 40 { command MfgSpecificPing(): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Nodes should be expected to be deployed to any and all regions of the world. These global regions may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a @@ -1591,25 +1526,6 @@ endpoint 0 { ram attribute clusterRevision default = 3; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster UnitLocalization { callback attribute generatedCommandList; callback attribute acceptedCommandList; diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.zap b/examples/chef/devices/rootnode_pump_5f904818cc.zap index f28d7cfbab317e..77f757a6681e46 100644 --- a/examples/chef/devices/rootnode_pump_5f904818cc.zap +++ b/examples/chef/devices/rootnode_pump_5f904818cc.zap @@ -715,234 +715,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "Unit Localization", "code": 45, diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index 78ae33bc847e5d..5faf56143e53b2 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.matter +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.matter @@ -481,14 +481,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -515,7 +511,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -615,67 +611,6 @@ cluster BasicInformation = 40 { command MfgSpecificPing(): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Nodes should be expected to be deployed to any and all regions of the world. These global regions may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a @@ -1534,25 +1469,6 @@ endpoint 0 { ram attribute clusterRevision default = 3; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster UnitLocalization { callback attribute generatedCommandList; callback attribute acceptedCommandList; diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.zap b/examples/chef/devices/rootnode_pump_a811bb33a0.zap index 6314e3fb0c2e3a..1d7c10b1eb33e5 100644 --- a/examples/chef/devices/rootnode_pump_a811bb33a0.zap +++ b/examples/chef/devices/rootnode_pump_a811bb33a0.zap @@ -715,234 +715,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "Unit Localization", "code": 45, diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter index 7d8c54a3f41c4c..cf0c9c20e47438 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter @@ -409,14 +409,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -443,7 +439,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -543,67 +539,6 @@ cluster BasicInformation = 40 { command MfgSpecificPing(): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Nodes should be expected to be deployed to any and all regions of the world. These global regions may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a @@ -1469,25 +1404,6 @@ endpoint 0 { ram attribute clusterRevision default = 3; } - server cluster LocalizationConfiguration { - persist attribute activeLocale default = "en-US"; - callback attribute supportedLocales; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster UnitLocalization { persist attribute temperatureUnit default = 0; callback attribute generatedCommandList; diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap index bf7540df089035..b93bcb05fec24a 100644 --- a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap +++ b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.zap @@ -958,234 +958,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "en-US", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "Unit Localization", "code": 45, diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index d53a594c514919..6870f3cd42718a 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter @@ -486,14 +486,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -520,7 +516,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -1584,9 +1580,19 @@ cluster GroupKeyManagement = 63 { /** Attributes and commands for selecting a mode from a list of supported options. */ cluster RvcRunMode = 84 { - revision 2; + revision 3; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kIdle = 16384; kCleaning = 16385; kMapping = 16386; @@ -1604,7 +1610,7 @@ cluster RvcRunMode = 84 { } bitmap Feature : bitmap32 { - kNoFeatures = 0x0; + kDirectModeChange = 0x10000; } struct ModeTagStruct { @@ -1643,9 +1649,19 @@ cluster RvcRunMode = 84 { /** Attributes and commands for selecting a mode from a list of supported options. */ cluster RvcCleanMode = 85 { - revision 2; + revision 3; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kDeepClean = 16384; kVacuum = 16385; kMop = 16386; @@ -1656,7 +1672,7 @@ cluster RvcCleanMode = 85 { } bitmap Feature : bitmap32 { - kNoFeatures = 0x0; + kDirectModeChange = 0x10000; } struct ModeTagStruct { @@ -1698,6 +1714,10 @@ cluster RvcOperationalState = 97 { revision 1; enum ErrorStateEnum : enum8 { + kNoError = 0; + kUnableToStartOrResume = 1; + kUnableToCompleteOperation = 2; + kCommandInvalidInState = 3; kFailedToFindChargingDock = 64; kStuck = 65; kDustBinMissing = 66; @@ -1709,6 +1729,10 @@ cluster RvcOperationalState = 97 { } enum OperationalStateEnum : enum8 { + kStopped = 0; + kRunning = 1; + kPaused = 2; + kError = 3; kSeekingCharger = 64; kCharging = 65; kDocked = 66; @@ -2010,7 +2034,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; callback attribute featureMap; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; handle command ChangeToMode; handle command ChangeToModeResponse; @@ -2024,7 +2048,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; callback attribute featureMap; - ram attribute clusterRevision default = 2; + ram attribute clusterRevision default = 3; handle command ChangeToMode; handle command ChangeToModeResponse; diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap index 81144c4b3b437f..0463c7d0fb801c 100644 --- a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap +++ b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.zap @@ -2852,7 +2852,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3008,7 +3008,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter index 20b7d6b80d35f5..654c955586b685 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.matter @@ -558,14 +558,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -592,7 +588,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both diff --git a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap index f831de4d5d9a7c..80384bf72b175b 100644 --- a/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap +++ b/examples/chef/devices/rootnode_roomairconditioner_9cf3607804.zap @@ -24,6 +24,13 @@ "category": "matter", "version": 1, "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "category": "matter", + "version": "chip-v1" } ], "endpointTypes": [ @@ -2706,7 +2713,7 @@ "code": 17, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -2722,7 +2729,7 @@ "code": 18, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -2738,7 +2745,7 @@ "code": 21, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -2754,7 +2761,7 @@ "code": 22, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -2770,7 +2777,7 @@ "code": 23, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -2786,7 +2793,7 @@ "code": 24, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, diff --git a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter index 3408fc64e6fc6f..1057b859f6abf3 100644 --- a/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter +++ b/examples/chef/devices/rootnode_smokecoalarm_686fe0dcb8.matter @@ -486,14 +486,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -520,7 +516,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter index bf55ae4be3bf03..223f47a4dfa346 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.matter @@ -627,14 +627,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -661,7 +657,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -915,67 +911,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1805,21 +1740,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; diff --git a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap index b766b72f319f87..61325839e9d157 100644 --- a/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap +++ b/examples/chef/devices/rootnode_speaker_RpzeXdimqA.zap @@ -929,170 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index b3178232de0291..5e23267e1b9b6c 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter @@ -507,14 +507,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -541,7 +537,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -795,67 +791,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1701,21 +1636,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap index 4d3f63260f57e4..2c20622caa4824 100644 --- a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap +++ b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.zap @@ -929,170 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index ae6441c2eaebea..c38c38b0a1d88c 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter @@ -507,14 +507,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -541,7 +537,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -2118,7 +2114,7 @@ cluster RelativeHumidityMeasurement = 1029 { readonly attribute int16u clusterRevision = 65533; } -/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ +/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */ cluster OccupancySensing = 1030 { revision 5; @@ -2156,6 +2152,10 @@ cluster OccupancySensing = 1030 { int16u holdTimeDefault = 2; } + info event OccupancyChanged = 0 { + OccupancyBitmap occupancy = 0; + } + readonly attribute OccupancyBitmap occupancy = 0; readonly attribute OccupancySensorTypeEnum occupancySensorType = 1; readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2; diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap index aa5d18f081aa94..c30fe33f9e465c 100644 --- a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap +++ b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.zap @@ -3064,7 +3064,7 @@ "code": 2, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "OccupancyBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3176,7 +3176,7 @@ "code": 9, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "HVACSystemTypeBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3208,7 +3208,7 @@ "code": 17, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3224,7 +3224,7 @@ "code": 18, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3240,7 +3240,7 @@ "code": 19, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3256,7 +3256,7 @@ "code": 20, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3272,7 +3272,7 @@ "code": 21, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3288,7 +3288,7 @@ "code": 22, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3304,7 +3304,7 @@ "code": 23, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3320,7 +3320,7 @@ "code": 24, "mfgCode": null, "side": "server", - "type": "int16s", + "type": "temperature", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -3804,10 +3804,10 @@ "side": "client", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter new file mode 100644 index 00000000000000..360771d4b05336 --- /dev/null +++ b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter @@ -0,0 +1,1643 @@ +// This IDL was generated automatically by ZAP. +// It is for view/code review purposes only. + +enum AreaTypeTag : enum8 { + kAisle = 0; + kAttic = 1; + kBackDoor = 2; + kBackYard = 3; + kBalcony = 4; + kBallroom = 5; + kBathroom = 6; + kBedroom = 7; + kBorder = 8; + kBoxroom = 9; + kBreakfastRoom = 10; + kCarport = 11; + kCellar = 12; + kCloakroom = 13; + kCloset = 14; + kConservatory = 15; + kCorridor = 16; + kCraftRoom = 17; + kCupboard = 18; + kDeck = 19; + kDen = 20; + kDining = 21; + kDrawingRoom = 22; + kDressingRoom = 23; + kDriveway = 24; + kElevator = 25; + kEnsuite = 26; + kEntrance = 27; + kEntryway = 28; + kFamilyRoom = 29; + kFoyer = 30; + kFrontDoor = 31; + kFrontYard = 32; + kGameRoom = 33; + kGarage = 34; + kGarageDoor = 35; + kGarden = 36; + kGardenDoor = 37; + kGuestBathroom = 38; + kGuestBedroom = 39; + kGuestRestroom = 40; + kGuestRoom = 41; + kGym = 42; + kHallway = 43; + kHearthRoom = 44; + kKidsRoom = 45; + kKidsBedroom = 46; + kKitchen = 47; + kLarder = 48; + kLaundryRoom = 49; + kLawn = 50; + kLibrary = 51; + kLivingRoom = 52; + kLounge = 53; + kMediaTVRoom = 54; + kMudRoom = 55; + kMusicRoom = 56; + kNursery = 57; + kOffice = 58; + kOutdoorKitchen = 59; + kOutside = 60; + kPantry = 61; + kParkingLot = 62; + kParlor = 63; + kPatio = 64; + kPlayRoom = 65; + kPoolRoom = 66; + kPorch = 67; + kPrimaryBathroom = 68; + kPrimaryBedroom = 69; + kRamp = 70; + kReceptionRoom = 71; + kRecreationRoom = 72; + kRestroom = 73; + kRoof = 74; + kSauna = 75; + kScullery = 76; + kSewingRoom = 77; + kShed = 78; + kSideDoor = 79; + kSideYard = 80; + kSittingRoom = 81; + kSnug = 82; + kSpa = 83; + kStaircase = 84; + kSteamRoom = 85; + kStorageRoom = 86; + kStudio = 87; + kStudy = 88; + kSunRoom = 89; + kSwimmingPool = 90; + kTerrace = 91; + kUtilityRoom = 92; + kWard = 93; + kWorkshop = 94; +} + +enum AtomicRequestTypeEnum : enum8 { + kBeginWrite = 0; + kCommitWrite = 1; + kRollbackWrite = 2; +} + +enum FloorSurfaceTag : enum8 { + kCarpet = 0; + kCeramic = 1; + kConcrete = 2; + kCork = 3; + kDeepCarpet = 4; + kDirt = 5; + kEngineeredWood = 6; + kGlass = 7; + kGrass = 8; + kHardwood = 9; + kLaminate = 10; + kLinoleum = 11; + kMat = 12; + kMetal = 13; + kPlastic = 14; + kPolishedConcrete = 15; + kRubber = 16; + kRug = 17; + kSand = 18; + kStone = 19; + kTatami = 20; + kTerrazzo = 21; + kTile = 22; + kVinyl = 23; +} + +enum LandmarkTag : enum8 { + kAirConditioner = 0; + kAirPurifier = 1; + kBackDoor = 2; + kBarStool = 3; + kBathMat = 4; + kBathtub = 5; + kBed = 6; + kBookshelf = 7; + kChair = 8; + kChristmasTree = 9; + kCoatRack = 10; + kCoffeeTable = 11; + kCookingRange = 12; + kCouch = 13; + kCountertop = 14; + kCradle = 15; + kCrib = 16; + kDesk = 17; + kDiningTable = 18; + kDishwasher = 19; + kDoor = 20; + kDresser = 21; + kLaundryDryer = 22; + kFan = 23; + kFireplace = 24; + kFreezer = 25; + kFrontDoor = 26; + kHighChair = 27; + kKitchenIsland = 28; + kLamp = 29; + kLitterBox = 30; + kMirror = 31; + kNightstand = 32; + kOven = 33; + kPetBed = 34; + kPetBowl = 35; + kPetCrate = 36; + kRefrigerator = 37; + kScratchingPost = 38; + kShoeRack = 39; + kShower = 40; + kSideDoor = 41; + kSink = 42; + kSofa = 43; + kStove = 44; + kTable = 45; + kToilet = 46; + kTrashCan = 47; + kLaundryWasher = 48; + kWindow = 49; + kWineCooler = 50; +} + +enum PositionTag : enum8 { + kLeft = 0; + kRight = 1; + kTop = 2; + kBottom = 3; + kMiddle = 4; + kRow = 5; + kColumn = 6; +} + +enum RelativePositionTag : enum8 { + kUnder = 0; + kNextTo = 1; + kAround = 2; + kOn = 3; + kAbove = 4; + kFrontOf = 5; + kBehind = 6; +} + +enum TestGlobalEnum : enum8 { + kSomeValue = 0; + kSomeOtherValue = 1; + kFinalValue = 2; +} + +bitmap TestGlobalBitmap : bitmap32 { + kFirstBit = 0x1; + kSecondBit = 0x2; +} + +struct TestGlobalStruct { + char_string<128> name = 0; + nullable TestGlobalBitmap myBitmap = 1; + optional nullable TestGlobalEnum myEnum = 2; +} + +struct LocationDescriptorStruct { + char_string<128> locationName = 0; + nullable int16s floorNumber = 1; + nullable AreaTypeTag areaType = 2; +} + +struct AtomicAttributeStatusStruct { + attrib_id attributeID = 0; + status statusCode = 1; +} + +/** Attributes and commands for putting a device into Identification mode (e.g. flashing a light). */ +cluster Identify = 3 { + revision 4; + + enum EffectIdentifierEnum : enum8 { + kBlink = 0; + kBreathe = 1; + kOkay = 2; + kChannelChange = 11; + kFinishEffect = 254; + kStopEffect = 255; + } + + enum EffectVariantEnum : enum8 { + kDefault = 0; + } + + enum IdentifyTypeEnum : enum8 { + kNone = 0; + kLightOutput = 1; + kVisibleIndicator = 2; + kAudibleBeep = 3; + kDisplay = 4; + kActuator = 5; + } + + attribute int16u identifyTime = 0; + readonly attribute IdentifyTypeEnum identifyType = 1; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct IdentifyRequest { + int16u identifyTime = 0; + } + + request struct TriggerEffectRequest { + EffectIdentifierEnum effectIdentifier = 0; + EffectVariantEnum effectVariant = 1; + } + + /** Command description for Identify */ + command access(invoke: manage) Identify(IdentifyRequest): DefaultSuccess = 0; + /** Command description for TriggerEffect */ + command access(invoke: manage) TriggerEffect(TriggerEffectRequest): DefaultSuccess = 64; +} + +/** Attributes and commands for group configuration and manipulation. */ +cluster Groups = 4 { + revision 4; + + bitmap Feature : bitmap32 { + kGroupNames = 0x1; + } + + bitmap NameSupportBitmap : bitmap8 { + kGroupNames = 0x80; + } + + readonly attribute NameSupportBitmap nameSupport = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AddGroupRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + response struct AddGroupResponse = 0 { + enum8 status = 0; + group_id groupID = 1; + } + + request struct ViewGroupRequest { + group_id groupID = 0; + } + + response struct ViewGroupResponse = 1 { + enum8 status = 0; + group_id groupID = 1; + char_string<16> groupName = 2; + } + + request struct GetGroupMembershipRequest { + group_id groupList[] = 0; + } + + response struct GetGroupMembershipResponse = 2 { + nullable int8u capacity = 0; + group_id groupList[] = 1; + } + + request struct RemoveGroupRequest { + group_id groupID = 0; + } + + response struct RemoveGroupResponse = 3 { + enum8 status = 0; + group_id groupID = 1; + } + + request struct AddGroupIfIdentifyingRequest { + group_id groupID = 0; + char_string<16> groupName = 1; + } + + /** Command description for AddGroup */ + fabric command access(invoke: manage) AddGroup(AddGroupRequest): AddGroupResponse = 0; + /** Command description for ViewGroup */ + fabric command ViewGroup(ViewGroupRequest): ViewGroupResponse = 1; + /** Command description for GetGroupMembership */ + fabric command GetGroupMembership(GetGroupMembershipRequest): GetGroupMembershipResponse = 2; + /** Command description for RemoveGroup */ + fabric command access(invoke: manage) RemoveGroup(RemoveGroupRequest): RemoveGroupResponse = 3; + /** Command description for RemoveAllGroups */ + fabric command access(invoke: manage) RemoveAllGroups(): DefaultSuccess = 4; + /** Command description for AddGroupIfIdentifying */ + fabric command access(invoke: manage) AddGroupIfIdentifying(AddGroupIfIdentifyingRequest): DefaultSuccess = 5; +} + +/** The Descriptor Cluster is meant to replace the support from the Zigbee Device Object (ZDO) for describing a node, its endpoints and clusters. */ +cluster Descriptor = 29 { + revision 2; + + bitmap Feature : bitmap32 { + kTagList = 0x1; + } + + struct DeviceTypeStruct { + devtype_id deviceType = 0; + int16u revision = 1; + } + + struct SemanticTagStruct { + nullable vendor_id mfgCode = 0; + enum8 namespaceID = 1; + enum8 tag = 2; + optional nullable char_string label = 3; + } + + readonly attribute DeviceTypeStruct deviceTypeList[] = 0; + readonly attribute cluster_id serverList[] = 1; + readonly attribute cluster_id clientList[] = 2; + readonly attribute endpoint_no partsList[] = 3; + readonly attribute optional SemanticTagStruct tagList[] = 4; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** The Access Control Cluster exposes a data model view of a + Node's Access Control List (ACL), which codifies the rules used to manage + and enforce Access Control for the Node's endpoints and their associated + cluster instances. */ +cluster AccessControl = 31 { + revision 2; + + enum AccessControlEntryAuthModeEnum : enum8 { + kPASE = 1; + kCASE = 2; + kGroup = 3; + } + + enum AccessControlEntryPrivilegeEnum : enum8 { + kView = 1; + kProxyView = 2; + kOperate = 3; + kManage = 4; + kAdminister = 5; + } + + enum AccessRestrictionTypeEnum : enum8 { + kAttributeAccessForbidden = 0; + kAttributeWriteForbidden = 1; + kCommandForbidden = 2; + kEventForbidden = 3; + } + + enum ChangeTypeEnum : enum8 { + kChanged = 0; + kAdded = 1; + kRemoved = 2; + } + + bitmap Feature : bitmap32 { + kExtension = 0x1; + kManagedDevice = 0x2; + } + + struct AccessRestrictionStruct { + AccessRestrictionTypeEnum type = 0; + nullable int32u id = 1; + } + + struct CommissioningAccessRestrictionEntryStruct { + endpoint_no endpoint = 0; + cluster_id cluster = 1; + AccessRestrictionStruct restrictions[] = 2; + } + + fabric_scoped struct AccessRestrictionEntryStruct { + fabric_sensitive endpoint_no endpoint = 0; + fabric_sensitive cluster_id cluster = 1; + fabric_sensitive AccessRestrictionStruct restrictions[] = 2; + fabric_idx fabricIndex = 254; + } + + struct AccessControlTargetStruct { + nullable cluster_id cluster = 0; + nullable endpoint_no endpoint = 1; + nullable devtype_id deviceType = 2; + } + + fabric_scoped struct AccessControlEntryStruct { + fabric_sensitive AccessControlEntryPrivilegeEnum privilege = 1; + fabric_sensitive AccessControlEntryAuthModeEnum authMode = 2; + nullable fabric_sensitive int64u subjects[] = 3; + nullable fabric_sensitive AccessControlTargetStruct targets[] = 4; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct AccessControlExtensionStruct { + fabric_sensitive octet_string<128> data = 1; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlEntryChanged = 0 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlEntryStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) AccessControlExtensionChanged = 1 { + nullable node_id adminNodeID = 1; + nullable int16u adminPasscodeID = 2; + ChangeTypeEnum changeType = 3; + nullable AccessControlExtensionStruct latestValue = 4; + fabric_idx fabricIndex = 254; + } + + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { + int64u token = 0; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; + fabric_idx fabricIndex = 254; + } + + attribute access(read: administer, write: administer) AccessControlEntryStruct acl[] = 0; + attribute access(read: administer, write: administer) optional AccessControlExtensionStruct extension[] = 1; + readonly attribute int16u subjectsPerAccessControlEntry = 2; + readonly attribute int16u targetsPerAccessControlEntry = 3; + readonly attribute int16u accessControlEntriesPerFabric = 4; + readonly attribute optional CommissioningAccessRestrictionEntryStruct commissioningARL[] = 5; + readonly attribute optional AccessRestrictionEntryStruct arl[] = 6; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ReviewFabricRestrictionsRequest { + CommissioningAccessRestrictionEntryStruct arl[] = 0; + } + + response struct ReviewFabricRestrictionsResponse = 1 { + int64u token = 0; + } + + /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; +} + +/** This cluster provides attributes and events for determining basic information about Nodes, which supports both + Commissioning and operational determination of Node characteristics, such as Vendor ID, Product ID and serial number, + which apply to the whole Node. Also allows setting user device information such as location. */ +cluster BasicInformation = 40 { + revision 3; + + enum ColorEnum : enum8 { + kBlack = 0; + kNavy = 1; + kGreen = 2; + kTeal = 3; + kMaroon = 4; + kPurple = 5; + kOlive = 6; + kGray = 7; + kBlue = 8; + kLime = 9; + kAqua = 10; + kRed = 11; + kFuchsia = 12; + kYellow = 13; + kWhite = 14; + kNickel = 15; + kChrome = 16; + kBrass = 17; + kCopper = 18; + kSilver = 19; + kGold = 20; + } + + enum ProductFinishEnum : enum8 { + kOther = 0; + kMatte = 1; + kSatin = 2; + kPolished = 3; + kRugged = 4; + kFabric = 5; + } + + struct CapabilityMinimaStruct { + int16u caseSessionsPerFabric = 0; + int16u subscriptionsPerFabric = 1; + } + + struct ProductAppearanceStruct { + ProductFinishEnum finish = 0; + nullable ColorEnum primaryColor = 1; + } + + critical event StartUp = 0 { + int32u softwareVersion = 0; + } + + critical event ShutDown = 1 { + } + + info event Leave = 2 { + fabric_idx fabricIndex = 0; + } + + info event ReachableChanged = 3 { + boolean reachableNewValue = 0; + } + + readonly attribute int16u dataModelRevision = 0; + readonly attribute char_string<32> vendorName = 1; + readonly attribute vendor_id vendorID = 2; + readonly attribute char_string<32> productName = 3; + readonly attribute int16u productID = 4; + attribute access(write: manage) char_string<32> nodeLabel = 5; + attribute access(write: administer) char_string<2> location = 6; + readonly attribute int16u hardwareVersion = 7; + readonly attribute char_string<64> hardwareVersionString = 8; + readonly attribute int32u softwareVersion = 9; + readonly attribute char_string<64> softwareVersionString = 10; + readonly attribute optional char_string<16> manufacturingDate = 11; + readonly attribute optional char_string<32> partNumber = 12; + readonly attribute optional long_char_string<256> productURL = 13; + readonly attribute optional char_string<64> productLabel = 14; + readonly attribute optional char_string<32> serialNumber = 15; + attribute access(write: manage) optional boolean localConfigDisabled = 16; + readonly attribute optional boolean reachable = 17; + readonly attribute char_string<32> uniqueID = 18; + readonly attribute CapabilityMinimaStruct capabilityMinima = 19; + readonly attribute optional ProductAppearanceStruct productAppearance = 20; + readonly attribute int32u specificationVersion = 21; + readonly attribute int16u maxPathsPerInvoke = 22; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + command MfgSpecificPing(): DefaultSuccess = 0; +} + +/** This cluster is used to manage global aspects of the Commissioning flow. */ +cluster GeneralCommissioning = 48 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningErrorEnum : enum8 { + kOK = 0; + kValueOutsideRange = 1; + kInvalidAuthentication = 2; + kNoFailSafe = 3; + kBusyWithOtherAdmin = 4; + kRequiredTCNotAccepted = 5; + kTCAcknowledgementsNotReceived = 6; + kTCMinVersionNotMet = 7; + } + + enum RegulatoryLocationTypeEnum : enum8 { + kIndoor = 0; + kOutdoor = 1; + kIndoorOutdoor = 2; + } + + bitmap Feature : bitmap32 { + kTermsAndConditions = 0x1; + } + + struct BasicCommissioningInfo { + int16u failSafeExpiryLengthSeconds = 0; + int16u maxCumulativeFailsafeSeconds = 1; + } + + attribute access(write: administer) int64u breadcrumb = 0; + readonly attribute BasicCommissioningInfo basicCommissioningInfo = 1; + readonly attribute RegulatoryLocationTypeEnum regulatoryConfig = 2; + readonly attribute RegulatoryLocationTypeEnum locationCapability = 3; + readonly attribute boolean supportsConcurrentConnection = 4; + provisional readonly attribute access(read: administer) optional int16u TCAcceptedVersion = 5; + provisional readonly attribute access(read: administer) optional int16u TCMinRequiredVersion = 6; + provisional readonly attribute access(read: administer) optional bitmap16 TCAcknowledgements = 7; + provisional readonly attribute access(read: administer) optional boolean TCAcknowledgementsRequired = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ArmFailSafeRequest { + int16u expiryLengthSeconds = 0; + int64u breadcrumb = 1; + } + + response struct ArmFailSafeResponse = 1 { + CommissioningErrorEnum errorCode = 0; + char_string<128> debugText = 1; + } + + request struct SetRegulatoryConfigRequest { + RegulatoryLocationTypeEnum newRegulatoryConfig = 0; + char_string<2> countryCode = 1; + int64u breadcrumb = 2; + } + + response struct SetRegulatoryConfigResponse = 3 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + response struct CommissioningCompleteResponse = 5 { + CommissioningErrorEnum errorCode = 0; + char_string debugText = 1; + } + + request struct SetTCAcknowledgementsRequest { + int16u TCVersion = 0; + bitmap16 TCUserResponse = 1; + } + + response struct SetTCAcknowledgementsResponse = 7 { + CommissioningErrorEnum errorCode = 0; + } + + /** Arm the persistent fail-safe timer with an expiry time of now + ExpiryLengthSeconds using device clock */ + command access(invoke: administer) ArmFailSafe(ArmFailSafeRequest): ArmFailSafeResponse = 0; + /** Set the regulatory configuration to be used during commissioning */ + command access(invoke: administer) SetRegulatoryConfig(SetRegulatoryConfigRequest): SetRegulatoryConfigResponse = 2; + /** Signals the Server that the Client has successfully completed all steps of Commissioning/Recofiguration needed during fail-safe period. */ + fabric command access(invoke: administer) CommissioningComplete(): CommissioningCompleteResponse = 4; + /** This command sets the user acknowledgements received in the Enhanced Setup Flow Terms and Conditions into the node. */ + command access(invoke: administer) SetTCAcknowledgements(SetTCAcknowledgementsRequest): SetTCAcknowledgementsResponse = 6; +} + +/** Functionality to configure, enable, disable network credentials and access on a Matter device. */ +cluster NetworkCommissioning = 49 { + revision 1; // NOTE: Default/not specifically set + + enum NetworkCommissioningStatusEnum : enum8 { + kSuccess = 0; + kOutOfRange = 1; + kBoundsExceeded = 2; + kNetworkIDNotFound = 3; + kDuplicateNetworkID = 4; + kNetworkNotFound = 5; + kRegulatoryError = 6; + kAuthFailure = 7; + kUnsupportedSecurity = 8; + kOtherConnectionFailure = 9; + kIPV6Failed = 10; + kIPBindFailed = 11; + kUnknownError = 12; + } + + enum WiFiBandEnum : enum8 { + k2G4 = 0; + k3G65 = 1; + k5G = 2; + k6G = 3; + k60G = 4; + k1G = 5; + } + + bitmap Feature : bitmap32 { + kWiFiNetworkInterface = 0x1; + kThreadNetworkInterface = 0x2; + kEthernetNetworkInterface = 0x4; + kPerDeviceCredentials = 0x8; + } + + bitmap ThreadCapabilitiesBitmap : bitmap16 { + kIsBorderRouterCapable = 0x1; + kIsRouterCapable = 0x2; + kIsSleepyEndDeviceCapable = 0x4; + kIsFullThreadDevice = 0x8; + kIsSynchronizedSleepyEndDeviceCapable = 0x10; + } + + bitmap WiFiSecurityBitmap : bitmap8 { + kUnencrypted = 0x1; + kWEP = 0x2; + kWPAPersonal = 0x4; + kWPA2Personal = 0x8; + kWPA3Personal = 0x10; + kWPA3MatterPDC = 0x20; + } + + struct NetworkInfoStruct { + octet_string<32> networkID = 0; + boolean connected = 1; + optional nullable octet_string<20> networkIdentifier = 2; + optional nullable octet_string<20> clientIdentifier = 3; + } + + struct ThreadInterfaceScanResultStruct { + int16u panId = 0; + int64u extendedPanId = 1; + char_string<16> networkName = 2; + int16u channel = 3; + int8u version = 4; + octet_string<8> extendedAddress = 5; + int8s rssi = 6; + int8u lqi = 7; + } + + struct WiFiInterfaceScanResultStruct { + WiFiSecurityBitmap security = 0; + octet_string<32> ssid = 1; + octet_string<6> bssid = 2; + int16u channel = 3; + WiFiBandEnum wiFiBand = 4; + int8s rssi = 5; + } + + readonly attribute access(read: administer) int8u maxNetworks = 0; + readonly attribute access(read: administer) NetworkInfoStruct networks[] = 1; + readonly attribute optional int8u scanMaxTimeSeconds = 2; + readonly attribute optional int8u connectMaxTimeSeconds = 3; + attribute access(write: administer) boolean interfaceEnabled = 4; + readonly attribute access(read: administer) nullable NetworkCommissioningStatusEnum lastNetworkingStatus = 5; + readonly attribute access(read: administer) nullable octet_string<32> lastNetworkID = 6; + readonly attribute access(read: administer) nullable int32s lastConnectErrorValue = 7; + provisional readonly attribute optional WiFiBandEnum supportedWiFiBands[] = 8; + provisional readonly attribute optional ThreadCapabilitiesBitmap supportedThreadFeatures = 9; + provisional readonly attribute optional int16u threadVersion = 10; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ScanNetworksRequest { + optional nullable octet_string<32> ssid = 0; + optional int64u breadcrumb = 1; + } + + response struct ScanNetworksResponse = 1 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + optional WiFiInterfaceScanResultStruct wiFiScanResults[] = 2; + optional ThreadInterfaceScanResultStruct threadScanResults[] = 3; + } + + request struct AddOrUpdateWiFiNetworkRequest { + octet_string<32> ssid = 0; + octet_string<64> credentials = 1; + optional int64u breadcrumb = 2; + optional octet_string<140> networkIdentity = 3; + optional octet_string<20> clientIdentifier = 4; + optional octet_string<32> possessionNonce = 5; + } + + request struct AddOrUpdateThreadNetworkRequest { + octet_string<254> operationalDataset = 0; + optional int64u breadcrumb = 1; + } + + request struct RemoveNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct NetworkConfigResponse = 5 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string<512> debugText = 1; + optional int8u networkIndex = 2; + optional octet_string<140> clientIdentity = 3; + optional octet_string<64> possessionSignature = 4; + } + + request struct ConnectNetworkRequest { + octet_string<32> networkID = 0; + optional int64u breadcrumb = 1; + } + + response struct ConnectNetworkResponse = 7 { + NetworkCommissioningStatusEnum networkingStatus = 0; + optional char_string debugText = 1; + nullable int32s errorValue = 2; + } + + request struct ReorderNetworkRequest { + octet_string<32> networkID = 0; + int8u networkIndex = 1; + optional int64u breadcrumb = 2; + } + + request struct QueryIdentityRequest { + octet_string<20> keyIdentifier = 0; + optional octet_string<32> possessionNonce = 1; + } + + response struct QueryIdentityResponse = 10 { + octet_string<140> identity = 0; + optional octet_string<64> possessionSignature = 1; + } + + /** Detemine the set of networks the device sees as available. */ + command access(invoke: administer) ScanNetworks(ScanNetworksRequest): ScanNetworksResponse = 0; + /** Add or update the credentials for a given Wi-Fi network. */ + command access(invoke: administer) AddOrUpdateWiFiNetwork(AddOrUpdateWiFiNetworkRequest): NetworkConfigResponse = 2; + /** Add or update the credentials for a given Thread network. */ + command access(invoke: administer) AddOrUpdateThreadNetwork(AddOrUpdateThreadNetworkRequest): NetworkConfigResponse = 3; + /** Remove the definition of a given network (including its credentials). */ + command access(invoke: administer) RemoveNetwork(RemoveNetworkRequest): NetworkConfigResponse = 4; + /** Connect to the specified network, using previously-defined credentials. */ + command access(invoke: administer) ConnectNetwork(ConnectNetworkRequest): ConnectNetworkResponse = 6; + /** Modify the order in which networks will be presented in the Networks attribute. */ + command access(invoke: administer) ReorderNetwork(ReorderNetworkRequest): NetworkConfigResponse = 8; + /** Retrieve details about and optionally proof of possession of a network client identity. */ + command access(invoke: administer) QueryIdentity(QueryIdentityRequest): QueryIdentityResponse = 9; +} + +/** The cluster provides commands for retrieving unstructured diagnostic logs from a Node that may be used to aid in diagnostics. */ +cluster DiagnosticLogs = 50 { + revision 1; // NOTE: Default/not specifically set + + enum IntentEnum : enum8 { + kEndUserSupport = 0; + kNetworkDiag = 1; + kCrashLogs = 2; + } + + enum StatusEnum : enum8 { + kSuccess = 0; + kExhausted = 1; + kNoLogs = 2; + kBusy = 3; + kDenied = 4; + } + + enum TransferProtocolEnum : enum8 { + kResponsePayload = 0; + kBDX = 1; + } + + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct RetrieveLogsRequestRequest { + IntentEnum intent = 0; + TransferProtocolEnum requestedProtocol = 1; + optional char_string<32> transferFileDesignator = 2; + } + + response struct RetrieveLogsResponse = 1 { + StatusEnum status = 0; + long_octet_string logContent = 1; + optional epoch_us UTCTimeStamp = 2; + optional systime_us timeSinceBoot = 3; + } + + /** Retrieving diagnostic logs from a Node */ + command RetrieveLogsRequest(RetrieveLogsRequestRequest): RetrieveLogsResponse = 0; +} + +/** The General Diagnostics Cluster, along with other diagnostics clusters, provide a means to acquire standardized diagnostics metrics that MAY be used by a Node to assist a user or Administrative Node in diagnosing potential problems. */ +cluster GeneralDiagnostics = 51 { + revision 2; + + enum BootReasonEnum : enum8 { + kUnspecified = 0; + kPowerOnReboot = 1; + kBrownOutReset = 2; + kSoftwareWatchdogReset = 3; + kHardwareWatchdogReset = 4; + kSoftwareUpdateCompleted = 5; + kSoftwareReset = 6; + } + + enum HardwareFaultEnum : enum8 { + kUnspecified = 0; + kRadio = 1; + kSensor = 2; + kResettableOverTemp = 3; + kNonResettableOverTemp = 4; + kPowerSource = 5; + kVisualDisplayFault = 6; + kAudioOutputFault = 7; + kUserInterfaceFault = 8; + kNonVolatileMemoryError = 9; + kTamperDetected = 10; + } + + enum InterfaceTypeEnum : enum8 { + kUnspecified = 0; + kWiFi = 1; + kEthernet = 2; + kCellular = 3; + kThread = 4; + } + + enum NetworkFaultEnum : enum8 { + kUnspecified = 0; + kHardwareFailure = 1; + kNetworkJammed = 2; + kConnectionFailed = 3; + } + + enum RadioFaultEnum : enum8 { + kUnspecified = 0; + kWiFiFault = 1; + kCellularFault = 2; + kThreadFault = 3; + kNFCFault = 4; + kBLEFault = 5; + kEthernetFault = 6; + } + + bitmap Feature : bitmap32 { + kDataModelTest = 0x1; + } + + struct NetworkInterface { + char_string<32> name = 0; + boolean isOperational = 1; + nullable boolean offPremiseServicesReachableIPv4 = 2; + nullable boolean offPremiseServicesReachableIPv6 = 3; + octet_string<8> hardwareAddress = 4; + octet_string IPv4Addresses[] = 5; + octet_string IPv6Addresses[] = 6; + InterfaceTypeEnum type = 7; + } + + critical event HardwareFaultChange = 0 { + HardwareFaultEnum current[] = 0; + HardwareFaultEnum previous[] = 1; + } + + critical event RadioFaultChange = 1 { + RadioFaultEnum current[] = 0; + RadioFaultEnum previous[] = 1; + } + + critical event NetworkFaultChange = 2 { + NetworkFaultEnum current[] = 0; + NetworkFaultEnum previous[] = 1; + } + + critical event BootReason = 3 { + BootReasonEnum bootReason = 0; + } + + readonly attribute NetworkInterface networkInterfaces[] = 0; + readonly attribute int16u rebootCount = 1; + readonly attribute optional int64u upTime = 2; + readonly attribute optional int32u totalOperationalHours = 3; + readonly attribute optional BootReasonEnum bootReason = 4; + readonly attribute optional HardwareFaultEnum activeHardwareFaults[] = 5; + readonly attribute optional RadioFaultEnum activeRadioFaults[] = 6; + readonly attribute optional NetworkFaultEnum activeNetworkFaults[] = 7; + readonly attribute boolean testEventTriggersEnabled = 8; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct TestEventTriggerRequest { + octet_string<16> enableKey = 0; + int64u eventTrigger = 1; + } + + response struct TimeSnapshotResponse = 2 { + systime_ms systemTimeMs = 0; + nullable posix_ms posixTimeMs = 1; + } + + request struct PayloadTestRequestRequest { + octet_string<16> enableKey = 0; + int8u value = 1; + int16u count = 2; + } + + response struct PayloadTestResponse = 4 { + octet_string payload = 0; + } + + /** Provide a means for certification tests to trigger some test-plan-specific events */ + command access(invoke: manage) TestEventTrigger(TestEventTriggerRequest): DefaultSuccess = 0; + /** Take a snapshot of system time and epoch time. */ + command TimeSnapshot(): TimeSnapshotResponse = 1; + /** Request a variable length payload response. */ + command PayloadTestRequest(PayloadTestRequestRequest): PayloadTestResponse = 3; +} + +/** Commands to trigger a Node to allow a new Administrator to commission it. */ +cluster AdministratorCommissioning = 60 { + revision 1; // NOTE: Default/not specifically set + + enum CommissioningWindowStatusEnum : enum8 { + kWindowNotOpen = 0; + kEnhancedWindowOpen = 1; + kBasicWindowOpen = 2; + } + + enum StatusCode : enum8 { + kBusy = 2; + kPAKEParameterError = 3; + kWindowNotOpen = 4; + } + + bitmap Feature : bitmap32 { + kBasic = 0x1; + } + + readonly attribute CommissioningWindowStatusEnum windowStatus = 0; + readonly attribute nullable fabric_idx adminFabricIndex = 1; + readonly attribute nullable vendor_id adminVendorId = 2; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct OpenCommissioningWindowRequest { + int16u commissioningTimeout = 0; + octet_string PAKEPasscodeVerifier = 1; + int16u discriminator = 2; + int32u iterations = 3; + octet_string<32> salt = 4; + } + + request struct OpenBasicCommissioningWindowRequest { + int16u commissioningTimeout = 0; + } + + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using enhanced commissioning method. */ + timed command access(invoke: administer) OpenCommissioningWindow(OpenCommissioningWindowRequest): DefaultSuccess = 0; + /** This command is used by a current Administrator to instruct a Node to go into commissioning mode using basic commissioning method, if the node supports it. */ + timed command access(invoke: administer) OpenBasicCommissioningWindow(OpenBasicCommissioningWindowRequest): DefaultSuccess = 1; + /** This command is used by a current Administrator to instruct a Node to revoke any active Open Commissioning Window or Open Basic Commissioning Window command. */ + timed command access(invoke: administer) RevokeCommissioning(): DefaultSuccess = 2; +} + +/** This cluster is used to add or remove Operational Credentials on a Commissionee or Node, as well as manage the associated Fabrics. */ +cluster OperationalCredentials = 62 { + revision 1; // NOTE: Default/not specifically set + + enum CertificateChainTypeEnum : enum8 { + kDACCertificate = 1; + kPAICertificate = 2; + } + + enum NodeOperationalCertStatusEnum : enum8 { + kOK = 0; + kInvalidPublicKey = 1; + kInvalidNodeOpId = 2; + kInvalidNOC = 3; + kMissingCsr = 4; + kTableFull = 5; + kInvalidAdminSubject = 6; + kFabricConflict = 9; + kLabelConflict = 10; + kInvalidFabricIndex = 11; + } + + fabric_scoped struct FabricDescriptorStruct { + octet_string<65> rootPublicKey = 1; + vendor_id vendorID = 2; + fabric_id fabricID = 3; + node_id nodeID = 4; + char_string<32> label = 5; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct NOCStruct { + fabric_sensitive octet_string noc = 1; + nullable fabric_sensitive octet_string icac = 2; + fabric_idx fabricIndex = 254; + } + + readonly attribute access(read: administer) NOCStruct NOCs[] = 0; + readonly attribute FabricDescriptorStruct fabrics[] = 1; + readonly attribute int8u supportedFabrics = 2; + readonly attribute int8u commissionedFabrics = 3; + readonly attribute octet_string trustedRootCertificates[] = 4; + readonly attribute int8u currentFabricIndex = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct AttestationRequestRequest { + octet_string<32> attestationNonce = 0; + } + + response struct AttestationResponse = 1 { + octet_string<900> attestationElements = 0; + octet_string<64> attestationSignature = 1; + } + + request struct CertificateChainRequestRequest { + CertificateChainTypeEnum certificateType = 0; + } + + response struct CertificateChainResponse = 3 { + octet_string<600> certificate = 0; + } + + request struct CSRRequestRequest { + octet_string<32> CSRNonce = 0; + optional boolean isForUpdateNOC = 1; + } + + response struct CSRResponse = 5 { + octet_string NOCSRElements = 0; + octet_string attestationSignature = 1; + } + + request struct AddNOCRequest { + octet_string<400> NOCValue = 0; + optional octet_string<400> ICACValue = 1; + octet_string<16> IPKValue = 2; + int64u caseAdminSubject = 3; + vendor_id adminVendorId = 4; + } + + request struct UpdateNOCRequest { + octet_string NOCValue = 0; + optional octet_string ICACValue = 1; + } + + response struct NOCResponse = 8 { + NodeOperationalCertStatusEnum statusCode = 0; + optional fabric_idx fabricIndex = 1; + optional char_string<128> debugText = 2; + } + + request struct UpdateFabricLabelRequest { + char_string<32> label = 0; + } + + request struct RemoveFabricRequest { + fabric_idx fabricIndex = 0; + } + + request struct AddTrustedRootCertificateRequest { + octet_string rootCACertificate = 0; + } + + /** Sender is requesting attestation information from the receiver. */ + command access(invoke: administer) AttestationRequest(AttestationRequestRequest): AttestationResponse = 0; + /** Sender is requesting a device attestation certificate from the receiver. */ + command access(invoke: administer) CertificateChainRequest(CertificateChainRequestRequest): CertificateChainResponse = 2; + /** Sender is requesting a certificate signing request (CSR) from the receiver. */ + command access(invoke: administer) CSRRequest(CSRRequestRequest): CSRResponse = 4; + /** Sender is requesting to add the new node operational certificates. */ + command access(invoke: administer) AddNOC(AddNOCRequest): NOCResponse = 6; + /** Sender is requesting to update the node operational certificates. */ + fabric command access(invoke: administer) UpdateNOC(UpdateNOCRequest): NOCResponse = 7; + /** This command SHALL be used by an Administrative Node to set the user-visible Label field for a given Fabric, as reflected by entries in the Fabrics attribute. */ + fabric command access(invoke: administer) UpdateFabricLabel(UpdateFabricLabelRequest): NOCResponse = 9; + /** This command is used by Administrative Nodes to remove a given fabric index and delete all associated fabric-scoped data. */ + command access(invoke: administer) RemoveFabric(RemoveFabricRequest): NOCResponse = 10; + /** This command SHALL add a Trusted Root CA Certificate, provided as its CHIP Certificate representation. */ + command access(invoke: administer) AddTrustedRootCertificate(AddTrustedRootCertificateRequest): DefaultSuccess = 11; +} + +/** The Group Key Management Cluster is the mechanism by which group keys are managed. */ +cluster GroupKeyManagement = 63 { + revision 1; // NOTE: Default/not specifically set + + enum GroupKeySecurityPolicyEnum : enum8 { + kTrustFirst = 0; + kCacheAndSync = 1; + } + + bitmap Feature : bitmap32 { + kCacheAndSync = 0x1; + } + + fabric_scoped struct GroupInfoMapStruct { + group_id groupId = 1; + endpoint_no endpoints[] = 2; + optional char_string<16> groupName = 3; + fabric_idx fabricIndex = 254; + } + + fabric_scoped struct GroupKeyMapStruct { + group_id groupId = 1; + int16u groupKeySetID = 2; + fabric_idx fabricIndex = 254; + } + + struct GroupKeySetStruct { + int16u groupKeySetID = 0; + GroupKeySecurityPolicyEnum groupKeySecurityPolicy = 1; + nullable octet_string<16> epochKey0 = 2; + nullable epoch_us epochStartTime0 = 3; + nullable octet_string<16> epochKey1 = 4; + nullable epoch_us epochStartTime1 = 5; + nullable octet_string<16> epochKey2 = 6; + nullable epoch_us epochStartTime2 = 7; + } + + attribute access(write: manage) GroupKeyMapStruct groupKeyMap[] = 0; + readonly attribute GroupInfoMapStruct groupTable[] = 1; + readonly attribute int16u maxGroupsPerFabric = 2; + readonly attribute int16u maxGroupKeysPerFabric = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct KeySetWriteRequest { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetReadRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadResponse = 2 { + GroupKeySetStruct groupKeySet = 0; + } + + request struct KeySetRemoveRequest { + int16u groupKeySetID = 0; + } + + response struct KeySetReadAllIndicesResponse = 5 { + int16u groupKeySetIDs[] = 0; + } + + /** Write a new set of keys for the given key set id. */ + fabric command access(invoke: administer) KeySetWrite(KeySetWriteRequest): DefaultSuccess = 0; + /** Read the keys for a given key set id. */ + fabric command access(invoke: administer) KeySetRead(KeySetReadRequest): KeySetReadResponse = 1; + /** Revoke a Root Key from a Group */ + fabric command access(invoke: administer) KeySetRemove(KeySetRemoveRequest): DefaultSuccess = 3; + /** Return the list of Group Key Sets associated with the accessing fabric */ + fabric command access(invoke: administer) KeySetReadAllIndices(): KeySetReadAllIndicesResponse = 4; +} + +/** This cluster provides an interface to a boolean state called StateValue. */ +cluster BooleanState = 69 { + revision 1; + + info event StateChange = 0 { + boolean stateValue = 0; + } + + readonly attribute boolean stateValue = 0; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; +} + +/** This cluster is used to configure a boolean sensor. */ +cluster BooleanStateConfiguration = 128 { + revision 1; + + bitmap AlarmModeBitmap : bitmap8 { + kVisual = 0x1; + kAudible = 0x2; + } + + bitmap Feature : bitmap32 { + kVisual = 0x1; + kAudible = 0x2; + kAlarmSuppress = 0x4; + kSensitivityLevel = 0x8; + } + + bitmap SensorFaultBitmap : bitmap16 { + kGeneralFault = 0x1; + } + + info event AlarmsStateChanged = 0 { + AlarmModeBitmap alarmsActive = 0; + optional AlarmModeBitmap alarmsSuppressed = 1; + } + + info event SensorFault = 1 { + SensorFaultBitmap sensorFault = 0; + } + + attribute optional int8u currentSensitivityLevel = 0; + readonly attribute optional int8u supportedSensitivityLevels = 1; + readonly attribute optional int8u defaultSensitivityLevel = 2; + readonly attribute optional AlarmModeBitmap alarmsActive = 3; + readonly attribute optional AlarmModeBitmap alarmsSuppressed = 4; + readonly attribute optional AlarmModeBitmap alarmsEnabled = 5; + readonly attribute optional AlarmModeBitmap alarmsSupported = 6; + readonly attribute optional SensorFaultBitmap sensorFault = 7; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct SuppressAlarmRequest { + AlarmModeBitmap alarmsToSuppress = 0; + } + + request struct EnableDisableAlarmRequest { + AlarmModeBitmap alarmsToEnableDisable = 0; + } + + /** This command is used to suppress the specified alarm mode. */ + command SuppressAlarm(SuppressAlarmRequest): DefaultSuccess = 0; + /** This command is used to enable or disable the specified alarm mode. */ + command EnableDisableAlarm(EnableDisableAlarmRequest): DefaultSuccess = 1; +} + +endpoint 0 { + device type ma_rootdevice = 22, version 1; + + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster AccessControl { + emits event AccessControlEntryChanged; + emits event AccessControlExtensionChanged; + callback attribute acl; + callback attribute extension; + callback attribute subjectsPerAccessControlEntry; + callback attribute targetsPerAccessControlEntry; + callback attribute accessControlEntriesPerFabric; + callback attribute attributeList; + ram attribute featureMap default = 0; + callback attribute clusterRevision; + } + + server cluster BasicInformation { + emits event StartUp; + emits event ShutDown; + emits event Leave; + callback attribute dataModelRevision; + callback attribute vendorName; + callback attribute vendorID; + callback attribute productName; + callback attribute productID; + persist attribute nodeLabel; + callback attribute location; + callback attribute hardwareVersion; + callback attribute hardwareVersionString; + callback attribute softwareVersion; + callback attribute softwareVersionString; + callback attribute manufacturingDate; + callback attribute partNumber; + callback attribute productURL; + callback attribute productLabel; + callback attribute serialNumber; + persist attribute localConfigDisabled default = 0; + callback attribute uniqueID; + callback attribute capabilityMinima; + callback attribute specificationVersion; + callback attribute maxPathsPerInvoke; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + } + + server cluster GeneralCommissioning { + ram attribute breadcrumb default = 0x0000000000000000; + callback attribute basicCommissioningInfo; + callback attribute regulatoryConfig; + callback attribute locationCapability; + callback attribute supportsConcurrentConnection; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + + handle command ArmFailSafe; + handle command ArmFailSafeResponse; + handle command SetRegulatoryConfig; + handle command SetRegulatoryConfigResponse; + handle command CommissioningComplete; + handle command CommissioningCompleteResponse; + } + + server cluster NetworkCommissioning { + ram attribute maxNetworks; + callback attribute networks; + ram attribute scanMaxTimeSeconds; + ram attribute connectMaxTimeSeconds; + ram attribute interfaceEnabled; + ram attribute lastNetworkingStatus; + ram attribute lastNetworkID; + ram attribute lastConnectErrorValue; + ram attribute featureMap default = 1; + ram attribute clusterRevision default = 0x0001; + + handle command ScanNetworks; + handle command ScanNetworksResponse; + handle command AddOrUpdateWiFiNetwork; + handle command AddOrUpdateThreadNetwork; + handle command RemoveNetwork; + handle command NetworkConfigResponse; + handle command ConnectNetwork; + handle command ConnectNetworkResponse; + handle command ReorderNetwork; + } + + server cluster DiagnosticLogs { + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + + handle command RetrieveLogsRequest; + handle command RetrieveLogsResponse; + } + + server cluster GeneralDiagnostics { + emits event BootReason; + callback attribute networkInterfaces; + callback attribute rebootCount; + callback attribute upTime; + callback attribute totalOperationalHours; + callback attribute bootReason; + callback attribute activeHardwareFaults; + callback attribute activeRadioFaults; + callback attribute activeNetworkFaults; + callback attribute testEventTriggersEnabled default = false; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command TestEventTrigger; + handle command TimeSnapshot; + handle command TimeSnapshotResponse; + } + + server cluster AdministratorCommissioning { + callback attribute windowStatus; + callback attribute adminFabricIndex; + callback attribute adminVendorId; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + + handle command OpenCommissioningWindow; + handle command OpenBasicCommissioningWindow; + handle command RevokeCommissioning; + } + + server cluster OperationalCredentials { + callback attribute NOCs; + callback attribute fabrics; + callback attribute supportedFabrics; + callback attribute commissionedFabrics; + callback attribute trustedRootCertificates; + callback attribute currentFabricIndex; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 0x0001; + + handle command AttestationRequest; + handle command AttestationResponse; + handle command CertificateChainRequest; + handle command CertificateChainResponse; + handle command CSRRequest; + handle command CSRResponse; + handle command AddNOC; + handle command UpdateNOC; + handle command NOCResponse; + handle command UpdateFabricLabel; + handle command RemoveFabric; + handle command AddTrustedRootCertificate; + } + + server cluster GroupKeyManagement { + callback attribute groupKeyMap; + callback attribute groupTable; + callback attribute maxGroupsPerFabric; + callback attribute maxGroupKeysPerFabric; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command KeySetWrite; + handle command KeySetRead; + handle command KeySetReadResponse; + handle command KeySetRemove; + handle command KeySetReadAllIndices; + handle command KeySetReadAllIndicesResponse; + } +} +endpoint 1 { + device type ma_water_leak_detector = 67, version 1; + + + server cluster Identify { + ram attribute identifyTime default = 0x0; + ram attribute identifyType default = 0x0; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 2; + + handle command Identify; + handle command TriggerEffect; + } + + server cluster Groups { + ram attribute nameSupport; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 3; + + handle command AddGroup; + handle command AddGroupResponse; + handle command ViewGroup; + handle command ViewGroupResponse; + handle command GetGroupMembership; + handle command GetGroupMembershipResponse; + handle command RemoveGroup; + handle command RemoveGroupResponse; + handle command RemoveAllGroups; + handle command AddGroupIfIdentifying; + } + + server cluster Descriptor { + callback attribute deviceTypeList; + callback attribute serverList; + callback attribute clientList; + callback attribute partsList; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + } + + server cluster BooleanState { + ram attribute stateValue; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } + + server cluster BooleanStateConfiguration { + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + ram attribute featureMap default = 0; + ram attribute clusterRevision default = 1; + } +} + + diff --git a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.zap b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.zap new file mode 100644 index 00000000000000..a07441c6c7dbbd --- /dev/null +++ b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.zap @@ -0,0 +1,2738 @@ +{ + "fileFormat": 2, + "featureLevel": 103, + "creator": "zap", + "keyValuePairs": [ + { + "key": "commandDiscovery", + "value": "1" + }, + { + "key": "defaultResponsePolicy", + "value": "always" + }, + { + "key": "manufacturerCodes", + "value": "0x1002" + } + ], + "package": [ + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/zcl/zcl.json", + "type": "zcl-properties", + "category": "matter", + "version": 1, + "description": "Matter SDK ZCL data" + }, + { + "pathRelativity": "relativeToZap", + "path": "../../../src/app/zap-templates/app-templates.json", + "type": "gen-templates-json", + "category": "matter", + "version": "chip-v1" + } + ], + "endpointTypes": [ + { + "id": 1, + "name": "MA-rootdevice", + "deviceTypeRef": { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + }, + "deviceTypes": [ + { + "code": 22, + "profileId": 259, + "label": "MA-rootdevice", + "name": "MA-rootdevice" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 22 + ], + "deviceTypeName": "MA-rootdevice", + "deviceTypeCode": 22, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Access Control", + "code": 31, + "mfgCode": null, + "define": "ACCESS_CONTROL_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "ACL", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Extension", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SubjectsPerAccessControlEntry", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TargetsPerAccessControlEntry", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AccessControlEntriesPerFabric", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "AccessControlEntryChanged", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "AccessControlExtensionChanged", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Basic Information", + "code": 40, + "mfgCode": null, + "define": "BASIC_INFORMATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DataModelRevision", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorName", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "VendorID", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductName", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductID", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "NodeLabel", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "Location", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersion", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "HardwareVersionString", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersion", + "code": 9, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SoftwareVersionString", + "code": 10, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ManufacturingDate", + "code": 11, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "PartNumber", + "code": 12, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductURL", + "code": 13, + "mfgCode": null, + "side": "server", + "type": "long_char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "ProductLabel", + "code": 14, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SerialNumber", + "code": 15, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "LocalConfigDisabled", + "code": 16, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "NVM", + "singleton": 1, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UniqueID", + "code": 18, + "mfgCode": null, + "side": "server", + "type": "char_string", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CapabilityMinima", + "code": 19, + "mfgCode": null, + "side": "server", + "type": "CapabilityMinimaStruct", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPathsPerInvoke", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 1, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "StartUp", + "code": 0, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "ShutDown", + "code": 1, + "mfgCode": null, + "side": "server", + "included": 1 + }, + { + "name": "Leave", + "code": 2, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "General Commissioning", + "code": 48, + "mfgCode": null, + "define": "GENERAL_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ArmFailSafe", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ArmFailSafeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfig", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "SetRegulatoryConfigResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CommissioningComplete", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CommissioningCompleteResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "Breadcrumb", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0000000000000000", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "BasicCommissioningInfo", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "BasicCommissioningInfo", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RegulatoryConfig", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LocationCapability", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "RegulatoryLocationTypeEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "SupportsConcurrentConnection", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Network Commissioning", + "code": 49, + "mfgCode": null, + "define": "NETWORK_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ScanNetworks", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ScanNetworksResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateWiFiNetwork", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddOrUpdateThreadNetwork", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveNetwork", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NetworkConfigResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ConnectNetwork", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ConnectNetworkResponse", + "code": 7, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ReorderNetwork", + "code": 8, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "MaxNetworks", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Networks", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ScanMaxTimeSeconds", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ConnectMaxTimeSeconds", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "InterfaceEnabled", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkingStatus", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "NetworkCommissioningStatusEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastNetworkID", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "octet_string", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "LastConnectErrorValue", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "int32s", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Diagnostic Logs", + "code": 50, + "mfgCode": null, + "define": "DIAGNOSTIC_LOGS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "RetrieveLogsRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RetrieveLogsResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "General Diagnostics", + "code": 51, + "mfgCode": null, + "define": "GENERAL_DIAGNOSTICS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "TestEventTrigger", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshot", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TimeSnapshotResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NetworkInterfaces", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "RebootCount", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "UpTime", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int64u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TotalOperationalHours", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BootReason", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "BootReasonEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveHardwareFaults", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveRadioFaults", + "code": 6, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ActiveNetworkFaults", + "code": 7, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TestEventTriggersEnabled", + "code": 8, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": "false", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ], + "events": [ + { + "name": "BootReason", + "code": 3, + "mfgCode": null, + "side": "server", + "included": 1 + } + ] + }, + { + "name": "Administrator Commissioning", + "code": 60, + "mfgCode": null, + "define": "ADMINISTRATOR_COMMISSIONING_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "OpenCommissioningWindow", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "OpenBasicCommissioningWindow", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RevokeCommissioning", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "WindowStatus", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "CommissioningWindowStatusEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminFabricIndex", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "fabric_idx", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AdminVendorId", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "vendor_id", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Operational Credentials", + "code": 62, + "mfgCode": null, + "define": "OPERATIONAL_CREDENTIALS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AttestationRequest", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AttestationResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CertificateChainRequest", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CertificateChainResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "CSRRequest", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CSRResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "AddNOC", + "code": 6, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "UpdateNOC", + "code": 7, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "NOCResponse", + "code": 8, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "UpdateFabricLabel", + "code": 9, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveFabric", + "code": 10, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddTrustedRootCertificate", + "code": 11, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NOCs", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "Fabrics", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "SupportedFabrics", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CommissionedFabrics", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "TrustedRootCertificates", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + }, + { + "name": "CurrentFabricIndex", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "int8u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0001", + "reportable": 1, + "minInterval": 0, + "maxInterval": 65344, + "reportableChange": 0 + } + ] + }, + { + "name": "Group Key Management", + "code": 63, + "mfgCode": null, + "define": "GROUP_KEY_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "KeySetWrite", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetRead", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "KeySetRemove", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndices", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "KeySetReadAllIndicesResponse", + "code": 5, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "GroupKeyMap", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GroupTable", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupsPerFabric", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxGroupKeysPerFabric", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + }, + { + "id": 2, + "name": "Anonymous Endpoint Type", + "deviceTypeRef": { + "code": 67, + "profileId": 259, + "label": "MA-water-leak-detector", + "name": "MA-water-leak-detector" + }, + "deviceTypes": [ + { + "code": 67, + "profileId": 259, + "label": "MA-water-leak-detector", + "name": "MA-water-leak-detector" + } + ], + "deviceVersions": [ + 1 + ], + "deviceIdentifiers": [ + 67 + ], + "deviceTypeName": "MA-water-leak-detector", + "deviceTypeCode": 67, + "deviceTypeProfileId": 259, + "clusters": [ + { + "name": "Identify", + "code": 3, + "mfgCode": null, + "define": "IDENTIFY_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "Identify", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "TriggerEffect", + "code": 64, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "IdentifyTime", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "IdentifyType", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "IdentifyTypeEnum", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0x0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "2", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Groups", + "code": 4, + "mfgCode": null, + "define": "GROUPS_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "AddGroup", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddGroupResponse", + "code": 0, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "ViewGroup", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "ViewGroupResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "GetGroupMembership", + "code": 2, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "GetGroupMembershipResponse", + "code": 2, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveGroup", + "code": 3, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "RemoveGroupResponse", + "code": 3, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + }, + { + "name": "RemoveAllGroups", + "code": 4, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "AddGroupIfIdentifying", + "code": 5, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "NameSupport", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "NameSupportBitmap", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "3", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Descriptor", + "code": 29, + "mfgCode": null, + "define": "DESCRIPTOR_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "DeviceTypeList", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ServerList", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClientList", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "PartsList", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Boolean State", + "code": 69, + "mfgCode": null, + "define": "BOOLEAN_STATE_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "StateValue", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "boolean", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, + { + "name": "Boolean State Configuration", + "code": 128, + "mfgCode": null, + "define": "BOOLEAN_STATE_CONFIGURATION_CLUSTER", + "side": "server", + "enabled": 1, + "attributes": [ + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "0", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "RAM", + "singleton": 0, + "bounded": 0, + "defaultValue": "1", + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + } + ] + } + ], + "endpoints": [ + { + "endpointTypeName": "MA-rootdevice", + "endpointTypeIndex": 0, + "profileId": 259, + "endpointId": 0, + "networkId": 0, + "parentEndpointIdentifier": null + }, + { + "endpointTypeName": "Anonymous Endpoint Type", + "endpointTypeIndex": 1, + "profileId": 259, + "endpointId": 1, + "networkId": 0, + "parentEndpointIdentifier": 0 + } + ] +} \ No newline at end of file diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index f49ed5824d5ce4..6056460bea24ff 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter @@ -507,14 +507,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -541,7 +537,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -795,67 +791,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1838,21 +1773,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - ram attribute activeLocale; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; diff --git a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap index cc78cf315cacc2..043e0a30a7c335 100644 --- a/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap +++ b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.zap @@ -929,170 +929,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, diff --git a/examples/chef/devices/template.zap b/examples/chef/devices/template.zap index c722acbb13e59e..2eec4460e870b9 100644 --- a/examples/chef/devices/template.zap +++ b/examples/chef/devices/template.zap @@ -633,6 +633,38 @@ "maxInterval": 65534, "reportableChange": 0 }, + { + "name": "SpecificationVersion", + "code": 21, + "mfgCode": null, + "side": "server", + "type": "int32u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "MaxPathsPerInvoke", + "code": 22, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 1, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, { "name": "FeatureMap", "code": 65532, @@ -1121,6 +1153,14 @@ "source": "client", "isIncoming": 1, "isEnabled": 1 + }, + { + "name": "RetrieveLogsResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 } ], "attributes": [ @@ -2445,267 +2485,6 @@ "reportableChange": 0 } ] - }, - { - "name": "Scenes Management", - "code": 98, - "mfgCode": null, - "define": "SCENES_CLUSTER", - "side": "server", - "enabled": 1, - "apiMaturity": "provisional", - "commands": [ - { - "name": "AddScene", - "code": 0, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "AddSceneResponse", - "code": 0, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "ViewScene", - "code": 1, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "ViewSceneResponse", - "code": 1, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveScene", - "code": 2, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveSceneResponse", - "code": 2, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenes", - "code": 3, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "RemoveAllScenesResponse", - "code": 3, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "StoreScene", - "code": 4, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "StoreSceneResponse", - "code": 4, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - }, - { - "name": "RecallScene", - "code": 5, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "GetSceneMembership", - "code": 6, - "mfgCode": null, - "source": "client", - "isIncoming": 1, - "isEnabled": 1 - }, - { - "name": "GetSceneMembershipResponse", - "code": 6, - "mfgCode": null, - "source": "server", - "isIncoming": 0, - "isEnabled": 1 - } - ], - "attributes": [ - { - "name": "LastConfiguredBy", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "node_id", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SceneTableSize", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FabricSceneInfo", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "EventList", - "code": 65530, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "6", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] } ] } diff --git a/examples/chef/kvs1 b/examples/chef/kvs1 new file mode 100644 index 00000000000000..1a49d937bc6aea --- /dev/null +++ b/examples/chef/kvs1 @@ -0,0 +1,7 @@ +[DEFAULT] +g/gcc=FN5mAQ== +g/gdc=53gMAA== +g/im/ec=AAABAAAAAAA= +g/lkgt=FSYAgKi8LBg= +g/sum=MAA= + diff --git a/examples/chef/sample_app_util/matter_device_types.json b/examples/chef/sample_app_util/matter_device_types.json index d1c61db86ffc40..e8ed949033d41f 100644 --- a/examples/chef/sample_app_util/matter_device_types.json +++ b/examples/chef/sample_app_util/matter_device_types.json @@ -48,5 +48,6 @@ "Laundry Washer": 115, "Robotic Vacuum Cleaner": 116, "Dishwasher": 117, - "Smoke CO Alarm": 118 + "Smoke CO Alarm": 118, + "Water Leak Detector": 67 } diff --git a/examples/chef/sample_app_util/test_files/sample_zap_file.zap b/examples/chef/sample_app_util/test_files/sample_zap_file.zap index 87dd68c26e1d74..7ad3cf51484541 100644 --- a/examples/chef/sample_app_util/test_files/sample_zap_file.zap +++ b/examples/chef/sample_app_util/test_files/sample_zap_file.zap @@ -1053,170 +1053,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "en-US", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, @@ -5484,7 +5320,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x009A", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5500,7 +5336,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFEFF", + "defaultValue": "0x01C6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5532,7 +5368,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00FA", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -5683,4 +5519,4 @@ "parentEndpointIdentifier": null } ] -} +} \ No newline at end of file diff --git a/examples/chef/sample_app_util/test_files/sample_zap_file_meta.yaml b/examples/chef/sample_app_util/test_files/sample_zap_file_meta.yaml index 798f5355b1a99a..de8678ed4f1214 100644 --- a/examples/chef/sample_app_util/test_files/sample_zap_file_meta.yaml +++ b/examples/chef/sample_app_util/test_files/sample_zap_file_meta.yaml @@ -37,9 +37,6 @@ Groups/4: attributes: FeatureMap/65532: '0' - LocalizationConfiguration/43: - attributes: - FeatureMap/65532: '0' OperationalCredentials/62: attributes: FeatureMap/65532: '0' @@ -55,9 +52,6 @@ ThreadNetworkDiagnostics/53: attributes: FeatureMap/65532: '15' - TimeFormatLocalization/44: - attributes: - FeatureMap/65532: '0' UserLabel/65: attributes: FeatureMap/65532: '0' diff --git a/examples/chip-tool/commands/clusters/ClusterCommand.h b/examples/chip-tool/commands/clusters/ClusterCommand.h index bf5c61fd02bd3f..ad77b5471251f5 100644 --- a/examples/chip-tool/commands/clusters/ClusterCommand.h +++ b/examples/chip-tool/commands/clusters/ClusterCommand.h @@ -60,7 +60,7 @@ class ClusterCommand : public InteractionModelCommands, public ModelCommand, pub const chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Type & value) { ReturnErrorOnFailure(InteractionModelCommands::SendCommand(device, endpointId, clusterId, commandId, value)); - mScopedNodeId = chip::ScopedNodeId(value.checkInNodeID, device->GetSecureSession().Value()->GetFabricIndex()); + mPeerNodeId = chip::ScopedNodeId(device->GetDeviceId(), device->GetSecureSession().Value()->GetFabricIndex()); return CHIP_NO_ERROR; } @@ -69,7 +69,8 @@ class ClusterCommand : public InteractionModelCommands, public ModelCommand, pub const chip::app::Clusters::IcdManagement::Commands::RegisterClient::Type & value) { ReturnErrorOnFailure(InteractionModelCommands::SendCommand(device, endpointId, clusterId, commandId, value)); - mScopedNodeId = chip::ScopedNodeId(value.checkInNodeID, device->GetSecureSession().Value()->GetFabricIndex()); + mPeerNodeId = chip::ScopedNodeId(device->GetDeviceId(), device->GetSecureSession().Value()->GetFabricIndex()); + mCheckInNodeId = chip::ScopedNodeId(value.checkInNodeID, device->GetSecureSession().Value()->GetFabricIndex()); mMonitoredSubject = value.monitoredSubject; mClientType = value.clientType; memcpy(mICDSymmetricKey, value.key.data(), value.key.size()); @@ -147,7 +148,9 @@ class ClusterCommand : public InteractionModelCommands, public ModelCommand, pub return; } chip::app::ICDClientInfo clientInfo; - clientInfo.peer_node = mScopedNodeId; + + clientInfo.peer_node = mPeerNodeId; + clientInfo.check_in_node = mCheckInNodeId; clientInfo.monitored_subject = mMonitoredSubject; clientInfo.start_icd_counter = value.ICDCounter; clientInfo.client_type = mClientType; @@ -159,7 +162,7 @@ class ClusterCommand : public InteractionModelCommands, public ModelCommand, pub if ((path.mEndpointId == chip::kRootEndpointId) && (path.mClusterId == chip::app::Clusters::IcdManagement::Id) && (path.mCommandId == chip::app::Clusters::IcdManagement::Commands::UnregisterClient::Id)) { - ClearICDEntry(mScopedNodeId); + ClearICDEntry(mPeerNodeId); } } @@ -260,9 +263,21 @@ class ClusterCommand : public InteractionModelCommands, public ModelCommand, pub private: chip::ClusterId mClusterId; chip::CommandId mCommandId; - chip::ScopedNodeId mScopedNodeId; - uint64_t mMonitoredSubject = static_cast(0); + // The scoped node ID to which RegisterClient and UnregisterClient command will be sent. Not set for other commands. + chip::ScopedNodeId mPeerNodeId; + // The scoped node ID to which a Check-In message will be sent. Only set for the RegisterClient command. + chip::ScopedNodeId mCheckInNodeId; + + // Used to determine if a particular client has an active subscription for the given entry. + // The MonitoredSubject, when it is a NodeID, MAY be the same as the CheckInNodeID. + // The MonitoredSubject gives the registering client the flexibility of having a different + // CheckInNodeID from the MonitoredSubject. + uint64_t mMonitoredSubject = static_cast(0); + + // Client type of the client registering chip::app::Clusters::IcdManagement::ClientTypeEnum mClientType = chip::app::Clusters::IcdManagement::ClientTypeEnum::kPermanent; + + // Shared secret between the client and the ICD to encrypt the Check-In message. uint8_t mICDSymmetricKey[chip::Crypto::kAES_CCM128_Key_Length]; CHIP_ERROR mError = CHIP_NO_ERROR; diff --git a/examples/chip-tool/commands/icd/ICDCommand.cpp b/examples/chip-tool/commands/icd/ICDCommand.cpp index 3f7bfb328d5273..a66192e48bf128 100644 --- a/examples/chip-tool/commands/icd/ICDCommand.cpp +++ b/examples/chip-tool/commands/icd/ICDCommand.cpp @@ -40,14 +40,17 @@ CHIP_ERROR ICDListCommand::RunCommand() fprintf(stderr, " +------------------------------------------------------------------------------------------+\n"); fprintf(stderr, " | %-88s |\n", "Known ICDs:"); fprintf(stderr, " +------------------------------------------------------------------------------------------+\n"); - fprintf(stderr, " | %20s | %15s | %15s | %16s | %10s |\n", "Fabric Index:Node ID", "Start Counter", "Counter Offset", - "MonitoredSubject", "ClientType"); + fprintf(stderr, " | %20s | %20s | %15s | %15s | %16s | %10s |\n", "Fabric Index:Peer Node ID", "Fabric Index:CheckIn Node ID", + "Start Counter", "Counter Offset", "MonitoredSubject", "ClientType"); while (iter->Next(info)) { fprintf(stderr, " +------------------------------------------------------------------------------------------+\n"); - fprintf(stderr, " | %3" PRIu32 ":" ChipLogFormatX64 " | %15" PRIu32 " | %15" PRIu32 " | " ChipLogFormatX64 " | %10u |\n", + fprintf(stderr, + " | %3" PRIu32 ":" ChipLogFormatX64 " | %3" PRIu32 ":" ChipLogFormatX64 " | %15" PRIu32 " | %15" PRIu32 + " | " ChipLogFormatX64 " | %10u |\n", static_cast(info.peer_node.GetFabricIndex()), ChipLogValueX64(info.peer_node.GetNodeId()), + static_cast(info.check_in_node.GetFabricIndex()), ChipLogValueX64(info.check_in_node.GetNodeId()), info.start_icd_counter, info.offset, ChipLogValueX64(info.monitored_subject), static_cast(info.client_type)); diff --git a/examples/chip-tool/commands/pairing/PairingCommand.cpp b/examples/chip-tool/commands/pairing/PairingCommand.cpp index 245c9ed57ff82c..b9034cc1285d49 100644 --- a/examples/chip-tool/commands/pairing/PairingCommand.cpp +++ b/examples/chip-tool/commands/pairing/PairingCommand.cpp @@ -469,7 +469,8 @@ void PairingCommand::OnICDRegistrationComplete(ScopedNodeId nodeId, uint32_t icd sizeof(icdSymmetricKeyHex), chip::Encoding::HexFlags::kNullTerminate); app::ICDClientInfo clientInfo; - clientInfo.peer_node = chip::ScopedNodeId(mICDCheckInNodeId.Value(), nodeId.GetFabricIndex()); + clientInfo.check_in_node = chip::ScopedNodeId(mICDCheckInNodeId.Value(), nodeId.GetFabricIndex()); + clientInfo.peer_node = nodeId; clientInfo.monitored_subject = mICDMonitoredSubject.Value(); clientInfo.start_icd_counter = icdCounter; diff --git a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py index f4e8e6711d7105..252d23c0375836 100644 --- a/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py +++ b/examples/chip-tool/py_matter_chip_tool_adapter/matter_chip_tool_adapter/encoder.py @@ -130,6 +130,14 @@ 'has_destination': False, 'has_endpoint': False, }, + 'EstablishPASESession': { + 'alias': 'code-paseonly', + 'arguments': { + 'nodeId': 'node-id' + }, + 'has_destination': False, + 'has_endpoint': False, + }, 'GetCommissionerNodeId': { 'has_destination': False, 'has_endpoint': False, diff --git a/examples/common/pigweed/protos/fabric_admin_service.proto b/examples/common/pigweed/protos/fabric_admin_service.proto index 3df3e2a7aa5f5f..4d7b2075a2ed44 100644 --- a/examples/common/pigweed/protos/fabric_admin_service.proto +++ b/examples/common/pigweed/protos/fabric_admin_service.proto @@ -27,6 +27,7 @@ message DeviceCommissioningInfo { message KeepActiveParameters { uint64 node_id = 1; uint32 stay_active_duration_ms = 2; + uint32 timeout_ms = 3; } // Define the response message to convey the status of the operation diff --git a/examples/common/pigweed/protos/fabric_bridge_service.proto b/examples/common/pigweed/protos/fabric_bridge_service.proto index 0de3b3fa243d77..1c699e6942b358 100644 --- a/examples/common/pigweed/protos/fabric_bridge_service.proto +++ b/examples/common/pigweed/protos/fabric_bridge_service.proto @@ -26,8 +26,16 @@ message KeepActiveChanged { uint32 promised_active_duration_ms = 2; } +message AdministratorCommissioningChanged { + uint64 node_id = 1; + uint32 window_status = 2; + optional uint32 opener_fabric_index = 3; + optional uint32 opener_vendor_id = 4; +} + service FabricBridge { rpc AddSynchronizedDevice(SynchronizedDevice) returns (pw.protobuf.Empty){} rpc RemoveSynchronizedDevice(SynchronizedDevice) returns (pw.protobuf.Empty){} rpc ActiveChanged(KeepActiveChanged) returns (pw.protobuf.Empty){} + rpc AdminCommissioningAttributeChanged(AdministratorCommissioningChanged) returns (pw.protobuf.Empty){} } diff --git a/examples/common/pigweed/rpc_services/FabricBridge.h b/examples/common/pigweed/rpc_services/FabricBridge.h index aab714223968df..9bd520278c13b4 100644 --- a/examples/common/pigweed/rpc_services/FabricBridge.h +++ b/examples/common/pigweed/rpc_services/FabricBridge.h @@ -48,6 +48,12 @@ class FabricBridge : public pw_rpc::nanopb::FabricBridge::Service { return pw::Status::Unimplemented(); } + + virtual pw::Status AdminCommissioningAttributeChanged(const chip_rpc_AdministratorCommissioningChanged & request, + pw_protobuf_Empty & response) + { + return pw::Status::Unimplemented(); + } }; } // namespace rpc diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter index bb1c2827a8d609..05fe9c8efe4a6f 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.matter @@ -486,14 +486,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -520,7 +516,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -774,67 +770,6 @@ cluster OtaSoftwareUpdateRequestor = 42 { command AnnounceOTAProvider(AnnounceOTAProviderRequest): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** This cluster is used to manage global aspects of the Commissioning flow. */ cluster GeneralCommissioning = 48 { revision 1; // NOTE: Default/not specifically set @@ -1914,7 +1849,7 @@ cluster BooleanState = 69 { readonly attribute int16u clusterRevision = 65533; } -/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ +/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */ cluster OccupancySensing = 1030 { revision 5; @@ -1952,6 +1887,10 @@ cluster OccupancySensing = 1030 { int16u holdTimeDefault = 2; } + info event OccupancyChanged = 0 { + OccupancyBitmap occupancy = 0; + } + readonly attribute OccupancyBitmap occupancy = 0; readonly attribute OccupancySensorTypeEnum occupancySensorType = 1; readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2; @@ -2061,21 +2000,6 @@ endpoint 0 { handle command AnnounceOTAProvider; } - server cluster LocalizationConfiguration { - persist attribute activeLocale default = "en-US"; - callback attribute supportedLocales; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - persist attribute activeCalendarType default = 0; - callback attribute supportedCalendarTypes; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster GeneralCommissioning { ram attribute breadcrumb default = 0x0000000000000000; callback attribute basicCommissioningInfo; diff --git a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap index 8815cb496a719c..2006f483e969f6 100644 --- a/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap +++ b/examples/contact-sensor-app/contact-sensor-common/contact-sensor-app.zap @@ -1069,170 +1069,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "en-US", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ActiveCalendarType", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "CalendarTypeEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedCalendarTypes", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "General Commissioning", "code": 48, @@ -4702,10 +4538,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4750,4 +4586,4 @@ "parentEndpointIdentifier": null } ] -} +} \ No newline at end of file diff --git a/examples/contact-sensor-app/linux/README.md b/examples/contact-sensor-app/linux/README.md index f99162f4fdee10..e71ea89feb7eab 100644 --- a/examples/contact-sensor-app/linux/README.md +++ b/examples/contact-sensor-app/linux/README.md @@ -69,11 +69,6 @@ details. ## Running the Complete Example on Raspberry Pi 4 -> If you want to test Echo protocol, please enable Echo handler -> -> gn gen out/debug --args='chip_app_use_echo=true' -> ninja -C out/debug - - Prerequisites 1. A Raspberry Pi 4 board @@ -112,7 +107,7 @@ details. $ cd ~/connectedhomeip/examples/contact-sensor-app/linux $ sudo out/debug/chip-contact-sensor-app --ble-device [bluetooth device number] # In this example, the device we want to use is hci1 - $ sudo out/debug/chip-contact-sensor-app --ble-device 1 + $ sudo out/debug/contact-sensor-app --ble-device 1 - Test the device using ChipDeviceController on your laptop / workstation etc. diff --git a/examples/contact-sensor-app/nxp/README.md b/examples/contact-sensor-app/nxp/README.md new file mode 100644 index 00000000000000..473afb793f9700 --- /dev/null +++ b/examples/contact-sensor-app/nxp/README.md @@ -0,0 +1,195 @@ +# Matter NXP Contact Sensor Example Application + +This reference application implements a Contact Sensor device type. It uses +board buttons or `matter-cli` for user input and LEDs for state feedback. You +can use this example as a reference for creating your own application. + +The example is based on: + +- [Matter](https://github.com/project-chip/connectedhomeip) +- [NXP github SDK](https://github.com/nxp-mcuxpresso/mcux-sdk) + +- [Matter NXP Contact Sensor Example Application](#matter-nxp-contact-sensor-example-application) + - [Supported devices](#supported-devices) + - [Introduction](#introduction) + - [Device UI](#device-ui) + - [Prerequisites for building](#prerequisites-for-building) + - [Building](#building) + - [Data model](#data-model) + - [Manufacturing data](#manufacturing-data) + - [Long Idle Time ICD Support](#long-idle-time-icd-support) + - [Low power](#low-power) + - [Flashing and debugging](#flashing-and-debugging) + +## Supported devices + +- [k32w1](k32w1/README.md) + +## Introduction + +The application showcases a contact sensor that communicates with clients over a +low-power, 802.15.4 Thread network. + +It can be commissioned into an existing Matter network using a controller such +as `chip-tool`. + +This example implements a `User-Intent Commissioning Flow`, meaning the user has +to press a button in order for the device to be ready for commissioning. The +initial commissioning is done through `ble-thread` pairing method. + +The Thread network dataset will be transferred on the device using a secure +session over Bluetooth LE. In order to start the commissioning process, the user +must enable BLE advertising on the device manually. To pair successfully, the +commissioner must know the commissioning information corresponding to the +device: setup passcode and discriminator. This data is usually encoded within a +QR code or printed to the UART console. + +## Device UI + +The example application provides a simple UI that depicts the state of the +device and offers basic user control. This UI is implemented via the +general-purpose LEDs and buttons built in the evaluation boards. Please see each +supported device readme file for details. + +## Prerequisites for building + +In order to build the example, it is recommended to use a Linux distribution. +Please visit the supported Operating Systems list in +[BUILDING.md](../../../docs/guides/BUILDING.md#prerequisites). + +- Make sure that below prerequisites are correctly installed (as described in + [BUILDING.md](../../../docs/guides/BUILDING.md#prerequisites)) + +``` +sudo apt-get install git gcc g++ pkg-config libssl-dev libdbus-1-dev libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev +``` + +- Step 1: checkout NXP specific submodules only + + ``` + user@ubuntu:~/Desktop/git/connectedhomeip$ scripts/checkout_submodules.py --shallow --platform nxp --recursive + ``` + +- Step 2: activate local environment + + ``` + user@ubuntu:~/Desktop/git/connectedhomeip$ source scripts/activate.sh + ``` + + If the script says the environment is out of date, you can update it by + running the following command: + + ``` + user@ubuntu:~/Desktop/git/connectedhomeip$ source scripts/bootstrap.sh + ``` + +- Step 3: Init NXP SDK(s) + + ``` + user@ubuntu:~/Desktop/git/connectedhomeip$ third_party/nxp/nxp_matter_support/scripts/update_nxp_sdk.py --platform common + ``` + +Note: By default, `update_nxp_sdk.py` will try to initialize all NXP SDKs. +Please run the script with arg `--help` to view all available options. + +## Building + +There are two options for building this reference app: + +- Using `build_examples.py` framework. +- Manually generating `ninja` files using `gn`. + +For manual generation and building, please see the specific readme file for your +device. + +A list of all available contact sensor targets can be viewed in the following +table: + +| target name | description | +| ---------------------------------------------------------- | ------------------------------------------------------------------------------------------- | +| nxp-device-freertos-contact-sensor-low-power | Default low-power contact sensor | +| nxp-device-freertos-contact-sensor-low-power-factory | Default low-power contact sensor with factory data | +| nxp-device-freertos-contact-sensor-low-power-lit | Low-power contact sensor as LIT ICD | +| nxp-device-freertos-contact-sensor-low-power-sw-v2 | Low-power contact sensor with software version 2 (can be used to test OTA) | +| nxp-device-freertos-contact-sensor-low-power-factory-sw-v2 | Low-power contact sensor with factory data and software version 2 (can be used to test OTA) | + +where `device` can be one of the [Supported devices](#supported-devices). + +### Data model + +There are two available data models that can be used by the application: + +| path | description | +| -------------------------------- | ------------------------------ | +| `zap-lit/contact-sensor-app.zap` | Data model for LIT ICD support | +| `zap-sit/contact-sensor-app.zap` | Data model for SIT ICD support | + +The selection is done automatically by the build system based on the ICD +configuration. + +The data model can be changed by simply replacing the gn `deps` statement +corresponding to data model target. + +### Manufacturing data + +Use `chip_with_factory_data=1` in the gn build command to enable factory data. + +For a full guide on manufacturing flow, please see +[Guide for writing manufacturing data on NXP devices](../../../docs/guides/nxp/nxp_manufacturing_flow.md). + +### Long Idle Time ICD Support + +By default, the application is compiled as a SIT ICD (Short Idle Time +Intermittently Connected Device). + +This is a list of ICD configuration gn args. + +| gn arg | default value | description | +| ------------------------------------------------------------------------------ | ------------- | ---------------------------------------------------------------------------------------------------------- | +| nxp_ot_idle_interval_ms | 2000 (ms) | OT Idle Interval duration | +| nxp_ot_active_interval_ms | 500 (ms) | OT Active Interval duration | +| nxp_idle_mode_duration_s | 600 (s) | Idle Mode Interval duration | +| nxp_active_mode_duration_ms | 10000 (ms) | Active Mode Interval duration | +| nxp_active_mode_threshold_ms | 1000 (ms) | Active Mode Threshold value | +| nxp_icd_supported_clients_per_fabric | 2 | Registration slots per fabric | +| chip_enable_icd_lit | false | Enable LIT ICD support | +| chip_persist_subscriptions | true | Try once to re-establish subscriptions from the server side after reboot. May be disabled for LIT use case | +| chip_subscription_timeout_resumption | true | Same as above, but try to re-establish timeout out subscriptions | +| using `Fibonacci Backoff` for retries pacing. May be disabled for LIT use case | + +If LIT ICD support is needed then `chip_enable_icd_lit=true` must be specified +as gn argument and the above parameters must be modified to comply with LIT +requirements (e.g.: LIT devices must configure +`chip_ot_idle_interval_ms > 15000`). Example LIT configuration: + +``` +nxp_ot_idle_interval_ms = 15000 # 15s Idle Intervals +nxp_ot_active_interval_ms = 500 # 500ms Active Intervals +nxp_idle_mode_duration_s = 3600 # 60min Idle Mode Interval +nxp_active_mode_duration_ms = 0 # 0 Active Mode Interval +nxp_active_mode_threshold_ms = 30000 # 30s Active Mode Threshold +``` + +### Low power + +The example also offers the possibility to run in low power mode. This means +that the board will go in deep sleep most of the time and the power consumption +will be very low. + +In order to build with low power support, the following gn args must be used: + +``` +chip_with_low_power = 1 +chip_openthread_ftd = false +chip_with_ot_cli = 0 +chip_logging = false +``` + +In order to maintain a low power consumption, the UI LEDs are disabled. Console +logs can be used instead, but it might affect low power timings. Also, please +note that once the board is flashed with MCUXpresso the debugger disconnects +because the board enters low power. + +## Flashing and debugging + +Please see the device specific readme file. diff --git a/examples/contact-sensor-app/nxp/k32w1/.gn b/examples/contact-sensor-app/nxp/k32w1/.gn index 885f306753076d..6a134466e0067b 100644 --- a/examples/contact-sensor-app/nxp/k32w1/.gn +++ b/examples/contact-sensor-app/nxp/k32w1/.gn @@ -28,5 +28,5 @@ default_args = { import("//args.gni") # Import default platform configs - import("${chip_root}/src/platform/nxp/k32w1/args.gni") + import("${chip_root}/src/platform/nxp/mcxw71_k32w1/args.gni") } diff --git a/examples/contact-sensor-app/nxp/k32w1/BUILD.gn b/examples/contact-sensor-app/nxp/k32w1/BUILD.gn index 119dc5cf722eac..0e24893bd06737 100644 --- a/examples/contact-sensor-app/nxp/k32w1/BUILD.gn +++ b/examples/contact-sensor-app/nxp/k32w1/BUILD.gn @@ -40,7 +40,7 @@ assert(target_os == "freertos") example_platform_dir = "${chip_root}/examples/platform/nxp/${nxp_platform}" common_example_dir = "${chip_root}/examples/platform/nxp/common" -k32w1_sdk("sdk") { +mcxw71_k32w1_sdk("sdk") { defines = [] include_dirs = [] sources = [] @@ -55,20 +55,20 @@ k32w1_sdk("sdk") { include_dirs += [ "${example_platform_dir}/app/project_include/openthread" ] include_dirs += [ - "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1", - "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480", ] sources += [ - "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480/clock_config.c", - "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480/pin_mux.c", - "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/app_services_init.c", - "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board.c", - "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_comp.c", - "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_dcdc.c", - "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_extflash.c", - "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_lp.c", - "${k32w1_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/hardware_init.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480/clock_config.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/K32W1480/pin_mux.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/app_services_init.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_comp.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_dcdc.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_extflash.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/board_lp.c", + "${nxp_sdk_root}/middleware/wireless/framework/boards/kw45_k32w1/hardware_init.c", ] if (is_debug) { @@ -90,7 +90,7 @@ k32w1_sdk("sdk") { } } -k32w1_executable("contact_sensor_app") { +mcxw71_k32w1_executable("contact_sensor_app") { output_name = "chip-k32w1-contact-example" defines = [] @@ -235,7 +235,7 @@ k32w1_executable("contact_sensor_app") { cflags = [ "-Wconversion" ] - ldscript = "${k32w1_sdk_root}/middleware/wireless/framework/Common/devices/kw45_k32w1/gcc/connectivity.ld" + ldscript = "${nxp_sdk_root}/middleware/wireless/framework/Common/devices/kw45_k32w1/gcc/connectivity.ld" inputs = [ ldscript ] diff --git a/examples/contact-sensor-app/nxp/k32w1/README.md b/examples/contact-sensor-app/nxp/k32w1/README.md index 7a70f746f6e445..217f06e11906b6 100644 --- a/examples/contact-sensor-app/nxp/k32w1/README.md +++ b/examples/contact-sensor-app/nxp/k32w1/README.md @@ -1,162 +1,57 @@ # Matter K32W1 Contact Sensor Example Application -Matter K32W1 Contact Sensor Example uses buttons to test changing the lock and -device states and LEDs to show the state of these changes. You can use this -example as a reference for creating your own application. - -The example is based on -[Matter](https://github.com/project-chip/connectedhomeip) and the NXP K32W1 SDK, -and a simulated contact sensor over a low-power, 802.15.4 Thread network. - -The example behaves as a Matter accessory, that is a device that can be paired -into an existing Matter network and can be controlled by this network. - -
+For generic information related to contact sensor application, please see the +[common README](../README.md). - [Matter K32W1 Contact Sensor Example Application](#matter-k32w1-contact-sensor-example-application) - [Introduction](#introduction) - - [Bluetooth LE Advertising](#bluetooth-le-advertising) - - [Bluetooth LE Rendezvous](#bluetooth-le-rendezvous) - - [Thread Provisioning](#thread-provisioning) - [Device UI](#device-ui) - [Building](#building) - - [Long Idle Time ICD Support](#long-idle-time-icd-support) - - [Manufacturing data](#manufacturing-data) - [Flashing](#flashing) - [Flashing the `NBU` image](#flashing-the-nbu-image) - [Flashing the host image](#flashing-the-host-image) - [Debugging](#debugging) - [OTA](#ota) - - [Convert `srec` into `sb3` file](#convert-srec-into-sb3-file) - - [Convert `sb3` into `ota` file](#convert-sb3-into-ota-file) - - [OTA factory data](#ota-factory-data) - - [Running OTA](#running-ota) - - [Low power](#low-power) - - [Known issues](#known-issues) ## Introduction -![K32W1 EVK](../../../platform/nxp/k32w1/doc/images/k32w1-evk.jpg) - -The K32W1 contact sensor example application provides a working demonstration of -a connected contact sensor device, built using the Matter codebase and the NXP -K32W1 SDK. The example supports remote access (e.g.: using CHIP Tool from a -mobile phone) and control of a simulated contact sensor over a low-power, -802.15.4 Thread network. It is capable of being paired into an existing Matter -network along with other Matter-enabled devices. - -The Matter device that runs the contact sensor application is controlled by the -Matter controller device over the Thread protocol. By default, the Matter device -has Thread disabled, and it should be paired over Bluetooth LE with the Matter -controller and obtain configuration from it. The actions required before -establishing full communication are described below. - -### Bluetooth LE Advertising - -In this example, to commission the device onto a Matter network, it must be -discoverable over Bluetooth LE. For security reasons, you must start Bluetooth -LE advertising manually after powering up the device by pressing Button SW2. - -### Bluetooth LE Rendezvous +This is a contact sensor application implemented for a k32w1 device. -In this example, the commissioning procedure (called rendezvous) is done over -Bluetooth LE between a Matter device and the Matter controller, where the -controller has the commissioner role. - -To start the rendezvous, the controller must get the commissioning information -from the Matter device. The data payload is encoded within a QR code, or printed -to the UART console. - -### Thread Provisioning +The following board was used when testing this Matter reference app for a +`k32w1` device: +![K32W1 EVK](../../../platform/nxp/mcxw71_k32w1/doc/images/k32w1-evk.jpg) ## Device UI -The example application provides a simple UI that depicts the state of the -device and offers basic user control. This UI is implemented via the -general-purpose LEDs and buttons built in the K32W1 EVK board. - -**LED 2** shows the overall state of the device and its connectivity. Four -states are depicted: - -- _Short Flash On (50ms on/950ms off)_ — The device is in an - unprovisioned (unpaired) state and is waiting for a commissioning - application to connect. +The state feedback is provided through LED effects: -* _Rapid Even Flashing (100ms on/100ms off)_ — The device is in an - unprovisioned state and a commissioning application is connected via BLE. +| widget | effect | description | +| ------- | ----------------------------------- | ----------------------------------------------------------------------------------------------------- | +| LED2 | short flash on (50ms on/950ms off) | The device is in an unprovisioned (unpaired) state and is waiting for a commissioner to connect. | +| LED2 | rapid even flashing (100ms period) | The device is in an unprovisioned state and a commissioner is connected via BLE. | +| LED2 | short flash off (950ms on/50ms off) | The device is fully provisioned, but does not yet have full network (Thread) or service connectivity. | +| LED2 | solid on | The device is fully provisioned and has full network and service connectivity. | +| RGB LED | on | The `StateValue` attribute of the `BooleanState` cluster is `true` (simulating detection). | +| RGB LED | off | The `StateValue` attribute of the `BooleanState` cluster is `false` (simulating no detection). | -- _Short Flash Off (950ms on/50ms off)_ — The device is full - provisioned, but does not yet have full network (Thread) or service - connectivity. +NOTE: `LED2` will be disabled when OTA is used. On K32W1 EVK board, `PTB0` is +wired to both `LED2` and CS (Chip Select) of the External Flash Memory. Since +the OTA image is stored in external memory, `LED2` operations will affect OTA +operation by corrupting packages and OTA will not work. -* _Solid On_ — The device is fully provisioned and has full network and - service connectivity. +The user actions are summarized below: -NOTE: LED2 will be disabled when CHIP_DEVICE_CONFIG_ENABLE_OTA_REQUESTOR is -enabled. On K32W1 EVK board, `PTB0` is wired to `LED2` also is wired to CS (Chip -Select) External Flash Memory. OTA image is stored in external memory because of -it's size. If LED2 is enabled then it will affect External Memory CS and OTA -will not work. - -**RGB LED** shows the state of the simulated contact sensor. when the LED is -lit, the sensor is contacted, when not lit, the sensor is non-contacted. - -**Button SW2**. SHORT press function is overloaded depending on the device type -and commissioning state. If the device is not commissioned, a SHORT press of the -button will enable Bluetooth LE advertising for a predefined period of time. If -the device is commissioned and is acting as a LIT ICD then a SHORT press of the -button will enable Active Mode. A LONG Press of Button SW2 initiates a factory -reset. After an initial period of 3 seconds, LED 2 and RGB LED will flash in -unison to signal the pending reset. After 6 seconds will cause the device to -reset its persistent configuration and initiate a reboot. The reset action can -be cancelled by press SW2 button at any point before the 6 second limit. - -**Button SW3** can be used to change the state of the simulated contact sensor. -The button behaves as a toggle, swapping the state every time it is short -pressed. When long pressed, it does a clean soft reset that takes into account -Matter shutdown procedure. +| button | action | state | output | +| ------ | ----------- | ---------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- | +| SW2 | short press | not commissioned | Enable BLE advertising | +| SW2 | short press | commissioned + device is LIT | Enable Active Mode | +| SW2 | long press | NA | Initiate a factory reset (can be cancelled by pressing the button again within the factory reset timeout limit - 6 seconds by default) | +| SW3 | short press | NA | Toggle attribute `StateValue` value | +| SW3 | long press | NA | Clean soft reset of the device (takes into account proper Matter shutdown procedure) | ## Building -In order to build the Project CHIP example, we recommend using a Linux -distribution. Supported Operating Systems and prerequisites are listed in -[BUILDING](../../../../docs/guides/BUILDING.md). - -- Make sure that below prerequisites are correctly installed - -``` -sudo apt-get install git gcc g++ pkg-config libssl-dev libdbus-1-dev \ - libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev \ - python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev -``` - -- Step 1: checkout NXP specific submodules only - -``` -user@ubuntu:~/Desktop/git/connectedhomeip$ scripts/checkout_submodules.py --shallow --platform nxp --recursive -``` - -- Step 2: activate local environment - -``` -user@ubuntu:~/Desktop/git/connectedhomeip$ source scripts/activate.sh -``` - -If the script says the environment is out of date, you can update it by running -the following command: - -``` -user@ubuntu:~/Desktop/git/connectedhomeip$ source scripts/bootstrap.sh -``` - -- Step 3: Init NXP SDK(s) - -``` -user@ubuntu:~/Desktop/git/connectedhomeip$ scripts/setup/nxp/update_nxp_sdk.py --platform common_sdk -``` - -Note: By default setup/nxp/update_nxp_sdk.py will try to initialize all NXP -SDKs. Arg "-- help" could be used to view all available options. +Manually building requires running the following commands: ``` user@ubuntu:~/Desktop/git/connectedhomeip$ cd examples/contact-sensor-app/nxp/k32w1 @@ -164,55 +59,11 @@ user@ubuntu:~/Desktop/git/connectedhomeip/examples/contact-sensor-app/nxp/k32w1$ user@ubuntu:~/Desktop/git/connectedhomeip/examples/contact-sensor-app/nxp/k32w1$ ninja -C out/debug ``` -In case that Openthread CLI is needed, chip_with_ot_cli build argument must be -set to 1. - -After a successful build, the `elf` and `srec` files are found in `out/debug/` - -`see the files prefixed with chip-k32w1-contact-example`. - -## Long Idle Time ICD Support - -By default, contact-sensor is compiled as SIT ICD (Short Idle Time -Intermittently Connected Device) - see rules from k32w1_sdk.gni: - -``` -chip_ot_idle_interval_ms = 2000 # 2s Idle Intervals -chip_ot_active_interval_ms = 500 # 500ms Active Intervals - -nxp_idle_mode_duration_s = 600 # 10min Idle Mode Interval -nxp_active_mode_duration_ms = 10000 # 10s Active Mode Interval -nxp_active_mode_threshold_ms = 1000 # 1s Active Mode Threshold -nxp_icd_supported_clients_per_fabric = 2 # 2 registration slots per fabric -``` - -If LIT ICD support is needed then `chip_enable_icd_lit=true` must be specified -as gn argument and the above parameters can be modified to comply with LIT -requirements (e.g.: LIT devices must configure -`chip_ot_idle_interval_ms > 15000`). Example LIT configuration: - -``` -chip_ot_idle_interval_ms = 15000 # 15s Idle Intervals -chip_ot_active_interval_ms = 500 # 500ms Active Intervals - -nxp_idle_mode_duration_s = 3600 # 60min Idle Mode Interval -nxp_active_mode_duration_ms = 0 # 0 Active Mode Interval -nxp_active_mode_threshold_ms = 30000 # 30s Active Mode Threshold -``` - -ICD parameters that may be disabled once LIT functionality is enabled: - -``` -chip_persist_subscriptions: try once to re-establish subscriptions from the server side after reboot -chip_subscription_timeout_resumption: same as above + try to re-establish timeout out subscriptions -using Fibonacci backoff for retries pacing. -``` - -## Manufacturing data - -Use `chip_with_factory_data=1` in the gn build command to enable factory data. +Please note that running `gn gen out/debug` without `--args` option will use the +default gn args values found in `args.gni`. -For a full guide on manufacturing flow, please see -[Guide for writing manufacturing data on NXP devices](../../../../docs/guides/nxp/nxp_manufacturing_flow.md). +After a successful build, the `elf` and `srec` files are found in `out/debug/`. +See the files prefixed with `chip-k32w1-contact-example`. ## Flashing @@ -222,7 +73,7 @@ Two images must be written to the board: one for the host (CM33) and one for the The image needed on the host side is the one generated in `out/debug/` while the one needed on the `NBU` side can be found in the downloaded NXP-SDK package at path - -`middleware\wireless\ieee-802.15.4\bin\k32w1\k32w1_nbu_ble_15_4_dyn_matter_$version.sb3`. +`middleware\wireless\ieee-802.15.4\bin\k32w1\k32w1_nbu_ble_15_4_dyn_matter.sb3`. ### Flashing the `NBU` image @@ -244,29 +95,26 @@ build process. If debugging is needed then jump directly to the [Debugging](#debugging) section. Otherwise, if only flashing is needed then -[JLink 7.84b](https://www.segger.com/downloads/jlink/) can be used: +[JLink 7.84b or greater](https://www.segger.com/downloads/jlink/) can be used: - Plug K32W1 to the USB port (no need to keep the SW4 button pressed while - doing this) - -- Create a new file, `commands_script`, with the following content (change - application name accordingly): - -```bash -reset -halt -loadfile chip-k32w1-contact-example.srec -reset -go -quit -``` + doing this, e.g. ISP mode is not needed for host flashing) -- copy the application and `commands_script` in the same folder that JLink - executable is placed. Execute: +- Connect JLink to the device: -```bash -$ jlink -device K32W1480 -if SWD -speed 4000 -autoconnect 1 -CommanderScript commands_script -``` + ```bash + JLinkExe -device K32W1480 -if SWD -speed 4000 -autoconnect 1 + ``` + +- Run the following commands: + ```bash + reset + halt + loadfile chip-k32w1-contact-example.srec + reset + go + quit + ``` ## Debugging @@ -275,7 +123,7 @@ One option for debugging would be to use MCUXpresso IDE. - Drag-and-drop the zip file containing the NXP SDK in the "Installed SDKs" tab: -![Installed SDKs](../../../platform/nxp/k32w1/doc/images/installed_sdks.jpg) +![Installed SDKs](../../../platform/nxp/mcxw71_k32w1/doc/images/installed_sdks.jpg) - Import any demo application from the installed SDK: @@ -283,7 +131,7 @@ One option for debugging would be to use MCUXpresso IDE. Import SDK example(s).. -> choose a demo app (demo_apps -> hello_world) -> Finish ``` -![Import demo](../../../platform/nxp/k32w1/doc/images/import_demo.jpg) +![Import demo](../../../platform/nxp/mcxw71_k32w1/doc/images/import_demo.jpg) - Flash the previously imported demo application on the board: @@ -302,7 +150,7 @@ resulted after ot-nxp compilation. File -> Import -> C/C++ -> Existing Code as Makefile Project ``` -![New Project](../../../platform/nxp/k32w1/doc/images/new_project.jpg) +![New Project](../../../platform/nxp/mcxw71_k32w1/doc/images/new_project.jpg) - Replace the path of the existing demo application with the path of the K32W1 application: @@ -311,199 +159,9 @@ File -> Import -> C/C++ -> Existing Code as Makefile Project Run -> Debug Configurations... -> C/C++ Application ``` -![Debug K32W1](../../../platform/nxp/k32w1/doc/images/debug_k32w1.jpg) +![Debug K32W1](../../../platform/nxp/mcxw71_k32w1/doc/images/debug_k32w1.jpg) ## OTA -### Convert `srec` into `sb3` file - -The OTA image files must be encrypted using Over The Air Programming Tool -([OTAP](https://www.nxp.com/design/microcontrollers-developer-resources/connectivity-tool-suite:CONNECTIVITY-TOOL-SUITE?#downloads)). -Bootloader will load the new OTA image only if it detects that the file was -encrypted with the `OTAP` correct keys. - -`.srec` file is input for Over The air Programming (`OTAP`) application -(unencrypted) and it's converted to `.sb3` format (encrypted). - -In `OTAP` application - -- select OTA protocol => `OTAP` Matter -- Browse File -- follow default options (KW45/K32W148, Preserve NVM) -- image information: will update "Application Core (MCU)" - this will generate - the image only for the CM33 core -- keep other settings at default values - -### Convert `sb3` into `ota` file - -In order to build an OTA image, use NXP wrapper over the standard tool -`src/app/ota_image_tool.py`: - -- `scripts/tools/nxp/factory_data_generator/ota_image_tool.py`. - -The tool can be used to generate an OTA image with the following format: - -``` - | OTA image header | TLV1 | TLV2 | ... | TLVn | -``` - -where each TLV is in the form `|tag|length|value|`. - -Note that "standard" TLV format is used. Matter TLV format is only used for -factory data TLV value. - -Please see more in the -[OTA image tool guide](../../../../scripts/tools/nxp/ota/README.md). - -Here is an example that generates an OTA image with application update TLV from -a `sb3` file: - -``` -./scripts/tools/nxp/ota/ota_image_tool.py create -v 0xDEAD -p 0xBEEF -vn 43033 -vs "1.0" -da sha256 --app-input-file ~/binaries/chip-k32w1-43033.sb3 ~/binaries/chip-k32w1-43033.ota - -``` - -A note regarding OTA image header version (`-vn` option). An application binary -has its own software version (given by -`CHIP_DEVICE_CONFIG_DEVICE_SOFTWARE_VERSION`, which can be overwritten). For -having a correct OTA process, the OTA header version should be the same as the -binary embedded software version. A user can set a custom software version in -the gn build args by setting `chip_software_version` to the wanted version. - -### OTA factory data - -A user can update the factory data through OTA, at the same time the application -firmware is updated by enabling the following processor in the `gn args`: - -- `chip_enable_ota_factory_data_processor=1` to enable default factory data - update processor (disabled by default). - -The OTA image used must be updated to include the new factory data. - -[OTA image tool guide](../../../../scripts/tools/nxp/ota/README.md). - -### Running OTA - -The OTA topology used for OTA testing is illustrated in the figure below. -Topology is similar with the one used for Matter Test Events. - -![OTA_TOPOLOGY](../../../platform/nxp/k32w1/doc/images/ota_topology.JPG) - -The concept for OTA is the next one: - -- there is an OTA Provider Application that holds the OTA image. In our case, - this is a Linux application running on an Ubuntu based-system; -- the OTA Requestor functionality is embedded inside the Contact Sensor - Application. It will be used for requesting OTA blocks from the OTA - Provider; -- the controller (a linux application called chip-tool) will be used for - commissioning both the device and the OTA Provider App. The device will be - commissioned using the standard Matter flow (BLE + IEEE 802.15.4) while the - OTA Provider Application will be commissioned using the _onnetwork_ option - of chip-tool; -- during commissioning, each device is assigned a node id by the chip-tool - (can be specified manually by the user). Using the node id of the device and - of the contact sensor application, chip-tool triggers the OTA transfer by - invoking the _announce-ota-provider_ command - basically, the OTA Requestor - is informed of the node id of the OTA Provider Application. - -_Computer #1_ can be any system running an Ubuntu distribution. We recommand -using CSA official instructions from -[here](https://groups.csa-iot.org/wg/matter-csg/document/28566), where RPi 4 are -proposed. Also, CSA official instructions document point to the OS/Docker images -that should be used on the RPis. For compatibility reasons, we recommand -compiling chip-tool and OTA Provider applications with the same commit id that -was used for compiling the Contact Sensor Application. Also, please note that -there is a single controller (chip-tool) running on Computer #1 which is used -for commissioning both the device and the OTA Provider Application. If needed, -[these instructions](https://itsfoss.com/connect-wifi-terminal-ubuntu/) could be -used for connecting the RPis to WiFi. - -Build the Linux OTA provider application: - -``` -user@computer1:~/connectedhomeip$ : ./scripts/examples/gn_build_example.sh examples/ota-provider-app/linux out/ota-provider-app chip_config_network_layer_ble=false -``` - -Build Linux chip-tool: - -``` -user@computer1:~/connectedhomeip$ : ./scripts/examples/gn_build_example.sh examples/chip-tool out/chip-tool-app -``` - -Start the OTA Provider Application: - -``` -user@computer1:~/connectedhomeip$ : rm -rf /tmp/chip_* -user@computer1:~/connectedhomeip$ : ./out/ota-provider-app/chip-ota-provider-app -f chip-k32w1-43033.ota -``` - -Provision the OTA provider application and assign node id _1_. Also, grant ACL -entries to allow OTA requestors: - -``` -user@computer1:~/connectedhomeip$ : rm -rf /tmp/chip_* -user@computer1:~/connectedhomeip$ : ./out/chip-tool-app/chip-tool pairing onnetwork 1 20202021 -user@computer1:~/connectedhomeip$ : ./out/chip-tool-app/chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects": [112233], "targets": null}, {"fabricIndex": 1, "privilege": 3, "authMode": 2, "subjects": null, "targets": null}]' 1 0 -``` - -Provision the device and assign node id _2_: - -``` -user@computer1:~/connectedhomeip$ : ./out/chip-tool-app/chip-tool pairing ble-thread 2 hex: 20202021 3840 -``` - -Start the OTA process: - -``` -user@computer1:~/connectedhomeip$ : ./out/chip-tool-app/chip-tool otasoftwareupdaterequestor announce-ota-provider 1 0 0 0 2 0 -``` - -## Low power - -The example also offers the possibility to run in low power mode. This means -that the board will go in deep sleep most of the time and the power consumption -will be very low. - -In order to build with low power support, the `chip_with_low_power=1` must be -provided to the build system. In this case, please note that the GN build -arguments `chip_openthread_ftd` and `chip_with_ot_cli` must be set to `false/0` -and `chip_logging` must be set to `false` to disable logging. - -In order to maintain a low power consumption, the LEDs showing the state of the -contact sensor and the internal state are disabled. Console logs can be used -instead. Also, please note that once the board is flashed with MCUXpresso the -debugger disconnects because the board enters low power. - -### Known issues - -- SRP cache on the openthread border router needs to flushed each time a new - commissioning process is attempted. For this, factory reset the device, then - execute _ot-ctl server disable_ followed by _ot-ctl server enable_. After - this step, the commissioning process of the device can start; -- Due to some MDNS issues, the commissioning of the OTA Provider Application - may fail. Please make sure that the SRP cache is disabled (_ot-ctl srp - server disable_) on the openthread border router while commissioning the OTA - Provider Application; -- No other Docker image should be running (e.g.: Docker image needed by Test - Harness) except the OTBR one. A docker image can be killed using the - command: - -``` -user@computer1:~/connectedhomeip$ : sudo docker kill $container_id -``` - -- In order to avoid MDNS issues, only one interface should be active at one - time. E.g.: if WiFi is used then disable the Ethernet interface and also - disable multicast on that interface: - -``` -user@computer1:~/connectedhomeip$ sudo ip link set dev eth0 down -user@computer1:~/connectedhomeip$ sudo ifconfig eth0 -multicast -``` - -- If OTBR Docker image is used, then the "-B" parameter should point to the - interface used for the backbone. - -- If Wi-Fi is used on a RPI4, then a 5Ghz network should be selected. - Otherwise, issues related to BLE-WiFi combo may appear. +Please see +[k32w1 OTA guide](../../../../docs/guides/nxp/nxp_mcxw71_ota_guide.md). diff --git a/examples/contact-sensor-app/nxp/k32w1/args.gni b/examples/contact-sensor-app/nxp/k32w1/args.gni index cb952c94bd74d1..b1c31aa7eb642a 100644 --- a/examples/contact-sensor-app/nxp/k32w1/args.gni +++ b/examples/contact-sensor-app/nxp/k32w1/args.gni @@ -23,6 +23,7 @@ nxp_device = "K32W1480" chip_enable_ota_requestor = true chip_stack_lock_tracking = "fatal" chip_enable_ble = true +chip_generate_link_map_file = true chip_system_config_provide_statistics = false chip_system_config_use_open_thread_inet_endpoints = true diff --git a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter index 4a3e015ddedb5c..5e877d10e662a1 100644 --- a/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter +++ b/examples/contact-sensor-app/nxp/zap-lit/contact-sensor-app.matter @@ -409,14 +409,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -443,7 +439,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both diff --git a/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter b/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter index d8d2734e60a98b..e60ea683965225 100644 --- a/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter +++ b/examples/contact-sensor-app/nxp/zap-sit/contact-sensor-app.matter @@ -409,14 +409,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -443,7 +439,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both diff --git a/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm b/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm index 97b7c09806d200..47a29f80c3a4e5 100644 --- a/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/clusters/ModelCommandBridge.mm @@ -25,9 +25,10 @@ CHIP_ERROR ModelCommand::RunCommand() { - MTRDeviceController * commissioner = CurrentCommissioner(); ChipLogProgress(chipTool, "Sending command to node 0x" ChipLogFormatX64, ChipLogValueX64(mNodeId)); - auto * device = [MTRBaseDevice deviceWithNodeID:@(mNodeId) controller:commissioner]; + auto * device = BaseDeviceWithNodeId(mNodeId); + VerifyOrReturnError(device != nil, CHIP_ERROR_INCORRECT_STATE); + CHIP_ERROR err = SendCommand(device, mEndPointId); if (err != CHIP_NO_ERROR) { diff --git a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.h b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.h index 6cb580ded9c35f..9458d304dbebb2 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.h +++ b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.h @@ -17,6 +17,7 @@ */ #pragma once + #import #include #include @@ -26,8 +27,6 @@ #include "../provider/OTAProviderDelegate.h" -#pragma once - inline constexpr char kIdentityAlpha[] = "alpha"; inline constexpr char kIdentityBeta[] = "beta"; inline constexpr char kIdentityGamma[] = "gamma"; @@ -91,6 +90,10 @@ class CHIPCommandBridge : public Command { MTRDeviceController * GetCommissioner(const char * identity); + // Returns the MTRBaseDevice for the specified node ID. + // Will utilize an existing PASE connection if the device is being commissioned. + MTRBaseDevice * BaseDeviceWithNodeId(chip::NodeId nodeId); + // Will log the given string and given error (as progress if success, error // if failure). void LogNSError(const char * logString, NSError * error); diff --git a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm index bb232e3772135e..8b9a5d3e9f1eb2 100644 --- a/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/common/CHIPCommandBridge.mm @@ -195,6 +195,14 @@ MTRDeviceController * CHIPCommandBridge::GetCommissioner(const char * identity) { return mControllers[identity]; } +MTRBaseDevice * CHIPCommandBridge::BaseDeviceWithNodeId(chip::NodeId nodeId) +{ + MTRDeviceController * controller = CurrentCommissioner(); + VerifyOrReturnValue(controller != nil, nil); + return [controller deviceBeingCommissionedWithNodeID:@(nodeId) error:nullptr] + ?: [MTRBaseDevice deviceWithNodeID:@(nodeId) controller:controller]; +} + void CHIPCommandBridge::StopCommissioners() { for (auto & pair : mControllers) { diff --git a/examples/darwin-framework-tool/commands/pairing/Commands.h b/examples/darwin-framework-tool/commands/pairing/Commands.h index bc1bccdfd0ce43..47f06a5ffad9e2 100644 --- a/examples/darwin-framework-tool/commands/pairing/Commands.h +++ b/examples/darwin-framework-tool/commands/pairing/Commands.h @@ -28,38 +28,52 @@ class PairCode : public PairingCommandBridge { public: - PairCode() : PairingCommandBridge("code", PairingMode::Code, PairingNetworkType::None) {} + PairCode() : PairingCommandBridge("code", PairingMode::Code, CommissioningType::WithoutNetwork) {} +}; + +class PairCodePASEOnly : public PairingCommandBridge +{ +public: + PairCodePASEOnly() : PairingCommandBridge("code-paseonly", PairingMode::Code, CommissioningType::None) {} }; class PairCodeWifi : public PairingCommandBridge { public: - PairCodeWifi() : PairingCommandBridge("code-wifi", PairingMode::Code, PairingNetworkType::WiFi) {} + PairCodeWifi() : PairingCommandBridge("code-wifi", PairingMode::Code, CommissioningType::WithWiFi) {} }; class PairCodeThread : public PairingCommandBridge { public: - PairCodeThread() : PairingCommandBridge("code-thread", PairingMode::Code, PairingNetworkType::Thread) {} + PairCodeThread() : PairingCommandBridge("code-thread", PairingMode::Code, CommissioningType::WithThread) {} }; class PairBleWiFi : public PairingCommandBridge { public: - PairBleWiFi() : PairingCommandBridge("ble-wifi", PairingMode::Ble, PairingNetworkType::WiFi) {} + PairBleWiFi() : PairingCommandBridge("ble-wifi", PairingMode::Ble, CommissioningType::WithWiFi) {} }; class PairBleThread : public PairingCommandBridge { public: - PairBleThread() : PairingCommandBridge("ble-thread", PairingMode::Ble, PairingNetworkType::Thread) {} + PairBleThread() : PairingCommandBridge("ble-thread", PairingMode::Ble, CommissioningType::WithThread) {} }; class PairAlreadyDiscoveredByIndex : public PairingCommandBridge { public: PairAlreadyDiscoveredByIndex() : - PairingCommandBridge("by-index", PairingMode::AlreadyDiscoveredByIndex, PairingNetworkType::None) + PairingCommandBridge("by-index", PairingMode::AlreadyDiscoveredByIndex, CommissioningType::WithoutNetwork) + {} +}; + +class PairAlreadyDiscoveredByIndexPASEOnly : public PairingCommandBridge +{ +public: + PairAlreadyDiscoveredByIndexPASEOnly() : + PairingCommandBridge("by-index-paseonly", PairingMode::AlreadyDiscoveredByIndex, CommissioningType::None) {} }; @@ -67,7 +81,7 @@ class PairAlreadyDiscoveredByIndexWithWiFi : public PairingCommandBridge { public: PairAlreadyDiscoveredByIndexWithWiFi() : - PairingCommandBridge("by-index-with-wifi", PairingMode::AlreadyDiscoveredByIndex, PairingNetworkType::WiFi) + PairingCommandBridge("by-index-with-wifi", PairingMode::AlreadyDiscoveredByIndex, CommissioningType::WithWiFi) {} }; @@ -75,14 +89,14 @@ class PairAlreadyDiscoveredByIndexWithThread : public PairingCommandBridge { public: PairAlreadyDiscoveredByIndexWithThread() : - PairingCommandBridge("by-index-with-thread", PairingMode::AlreadyDiscoveredByIndex, PairingNetworkType::Thread) + PairingCommandBridge("by-index-with-thread", PairingMode::AlreadyDiscoveredByIndex, CommissioningType::WithThread) {} }; class Unpair : public PairingCommandBridge { public: - Unpair() : PairingCommandBridge("unpair", PairingMode::None, PairingNetworkType::None) {} + Unpair() : PairingCommandBridge("unpair", PairingMode::Unpair, CommissioningType::None) {} }; void registerCommandsPairing(Commands & commands) @@ -91,11 +105,13 @@ void registerCommandsPairing(Commands & commands) commands_list clusterCommands = { make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), make_unique(), + make_unique(), make_unique(), make_unique(), make_unique(), diff --git a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm index 52f0fd4bb10a17..92ff56a2c72b3d 100644 --- a/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm +++ b/examples/darwin-framework-tool/commands/pairing/DeviceControllerDelegateBridge.mm @@ -50,6 +50,11 @@ - (void)controller:(MTRDeviceController *)controller commissioningSessionEstabli } ChipLogProgress(chipTool, "Pairing Success"); ChipLogProgress(chipTool, "PASE establishment successful"); + if (_params == nil) { + _commandBridge->SetCommandExitStatus(nil); + return; + } + NSError * commissionError; [_commissioner commissionNodeWithID:@(_deviceID) commissioningParams:_params error:&commissionError]; if (commissionError != nil) { diff --git a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.h b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.h index 4ca6c4c2b73582..b5f3d4625e6ec2 100644 --- a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.h +++ b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.h @@ -22,44 +22,44 @@ enum class PairingMode { - None, + Unpair, Code, Ble, AlreadyDiscoveredByIndex, }; -enum class PairingNetworkType +enum class CommissioningType { - None, - WiFi, - Thread, - Ethernet, + None, // establish PASE only + WithoutNetwork, // commission but don't configure network + WithWiFi, // commission and configure WiFi + WithThread, // commission and configure Thread }; class PairingCommandBridge : public CHIPCommandBridge { public: - PairingCommandBridge(const char * commandName, PairingMode mode, PairingNetworkType networkType) : - CHIPCommandBridge(commandName), mPairingMode(mode), mNetworkType(networkType) + PairingCommandBridge(const char * commandName, PairingMode mode, CommissioningType commissioningType) : + CHIPCommandBridge(commandName), mPairingMode(mode), mCommissioningType(commissioningType) { AddArgument("node-id", 0, UINT64_MAX, &mNodeId); - switch (networkType) + switch (commissioningType) { - case PairingNetworkType::None: - case PairingNetworkType::Ethernet: + case CommissioningType::None: + case CommissioningType::WithoutNetwork: break; - case PairingNetworkType::WiFi: + case CommissioningType::WithWiFi: AddArgument("ssid", &mSSID); AddArgument("password", &mPassword); break; - case PairingNetworkType::Thread: + case CommissioningType::WithThread: AddArgument("operationalDataset", &mOperationalDataset); break; } switch (mode) { - case PairingMode::None: + case PairingMode::Unpair: break; case PairingMode::Code: AddArgument("payload", &mOnboardingPayload); @@ -74,17 +74,16 @@ class PairingCommandBridge : public CHIPCommandBridge break; } - if (mode != PairingMode::None) + if (commissioningType != CommissioningType::None) { AddArgument("country-code", &mCountryCode, "Country code to use to set the Basic Information cluster's Location attribute"); + AddArgument("use-device-attestation-delegate", 0, 1, &mUseDeviceAttestationDelegate, + "If true, use a device attestation delegate that always wants to be notified about attestation results. " + "Defaults to false."); + AddArgument("device-attestation-failsafe-time", 0, UINT16_MAX, &mDeviceAttestationFailsafeTime, + "If set, the time to extend the failsafe to before calling the device attestation delegate"); } - - AddArgument("use-device-attestation-delegate", 0, 1, &mUseDeviceAttestationDelegate, - "If true, use a device attestation delegate that always wants to be notified about attestation results. " - "Defaults to false."); - AddArgument("device-attestation-failsafe-time", 0, UINT16_MAX, &mDeviceAttestationFailsafeTime, - "If set, the time to extend the failsafe to before calling the device attestation delegate"); } /////////// CHIPCommandBridge Interface ///////// @@ -99,7 +98,7 @@ class PairingCommandBridge : public CHIPCommandBridge void SetUpDeviceControllerDelegate(); const PairingMode mPairingMode; - const PairingNetworkType mNetworkType; + const CommissioningType mCommissioningType; chip::ByteSpan mOperationalDataset; chip::ByteSpan mSSID; chip::ByteSpan mPassword; diff --git a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm index 2ab95a9f5b5e68..b1902677ed14ae 100644 --- a/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm +++ b/examples/darwin-framework-tool/commands/pairing/PairingCommandBridge.mm @@ -48,40 +48,42 @@ - (void)deviceAttestationCompletedForController:(MTRDeviceController *)controlle void PairingCommandBridge::SetUpDeviceControllerDelegate() { - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.pairing", DISPATCH_QUEUE_SERIAL); CHIPToolDeviceControllerDelegate * deviceControllerDelegate = [[CHIPToolDeviceControllerDelegate alloc] init]; - MTRCommissioningParameters * params = [[MTRCommissioningParameters alloc] init]; - MTRDeviceController * commissioner = CurrentCommissioner(); - + [deviceControllerDelegate setCommandBridge:this]; [deviceControllerDelegate setDeviceID:mNodeId]; - switch (mNetworkType) { - case PairingNetworkType::None: - case PairingNetworkType::Ethernet: - break; - case PairingNetworkType::WiFi: - [params setWifiSSID:[NSData dataWithBytes:mSSID.data() length:mSSID.size()]]; - [params setWifiCredentials:[NSData dataWithBytes:mPassword.data() length:mPassword.size()]]; - break; - case PairingNetworkType::Thread: - [params setThreadOperationalDataset:[NSData dataWithBytes:mOperationalDataset.data() length:mOperationalDataset.size()]]; - break; - } - if (mUseDeviceAttestationDelegate.ValueOr(false)) { - params.deviceAttestationDelegate = [[NoOpAttestationDelegate alloc] init]; - if (mDeviceAttestationFailsafeTime.HasValue()) { - params.failSafeTimeout = @(mDeviceAttestationFailsafeTime.Value()); + if (mCommissioningType != CommissioningType::None) { + MTRCommissioningParameters * params = [[MTRCommissioningParameters alloc] init]; + switch (mCommissioningType) { + case CommissioningType::None: + case CommissioningType::WithoutNetwork: + break; + case CommissioningType::WithWiFi: + [params setWifiSSID:[NSData dataWithBytes:mSSID.data() length:mSSID.size()]]; + [params setWifiCredentials:[NSData dataWithBytes:mPassword.data() length:mPassword.size()]]; + break; + case CommissioningType::WithThread: + [params setThreadOperationalDataset:[NSData dataWithBytes:mOperationalDataset.data() length:mOperationalDataset.size()]]; + break; } - } - if (mCountryCode.HasValue()) { - params.countryCode = [NSString stringWithUTF8String:mCountryCode.Value()]; + if (mUseDeviceAttestationDelegate.ValueOr(false)) { + params.deviceAttestationDelegate = [[NoOpAttestationDelegate alloc] init]; + if (mDeviceAttestationFailsafeTime.HasValue()) { + params.failSafeTimeout = @(mDeviceAttestationFailsafeTime.Value()); + } + } + + if (mCountryCode.HasValue()) { + params.countryCode = [NSString stringWithUTF8String:mCountryCode.Value()]; + } + + [deviceControllerDelegate setParams:params]; } - [deviceControllerDelegate setCommandBridge:this]; - [deviceControllerDelegate setParams:params]; + MTRDeviceController * commissioner = CurrentCommissioner(); [deviceControllerDelegate setCommissioner:commissioner]; - + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.pairing", DISPATCH_QUEUE_SERIAL); [commissioner setDeviceControllerDelegate:deviceControllerDelegate queue:callbackQueue]; } @@ -89,7 +91,7 @@ - (void)deviceAttestationCompletedForController:(MTRDeviceController *)controlle { NSError * error; switch (mPairingMode) { - case PairingMode::None: + case PairingMode::Unpair: Unpair(); break; case PairingMode::Code: @@ -155,8 +157,7 @@ - (void)deviceAttestationCompletedForController:(MTRDeviceController *)controlle void PairingCommandBridge::Unpair() { dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip-tool.command", DISPATCH_QUEUE_SERIAL); - MTRDeviceController * commissioner = CurrentCommissioner(); - auto * device = [MTRBaseDevice deviceWithNodeID:@(mNodeId) controller:commissioner]; + auto * device = BaseDeviceWithNodeId(mNodeId); ChipLogProgress(chipTool, "Attempting to unpair device %llu", mNodeId); MTRBaseClusterOperationalCredentials * opCredsCluster = diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index 661a2e74de4f4e..578a806c9d7253 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter @@ -507,14 +507,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -541,7 +537,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -641,67 +637,6 @@ cluster BasicInformation = 40 { command MfgSpecificPing(): DefaultSuccess = 0; } -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing common languages, units of measurements, and numerical formatting - standards. As such, Nodes that visually or audibly convey information need a mechanism by which - they can be configured to use a user’s preferred language, units, etc */ -cluster LocalizationConfiguration = 43 { - revision 1; // NOTE: Default/not specifically set - - attribute access(write: manage) char_string<35> activeLocale = 0; - readonly attribute char_string supportedLocales[] = 1; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - -/** Nodes should be expected to be deployed to any and all regions of the world. These global regions - may have differing preferences for how dates and times are conveyed. As such, Nodes that visually - or audibly convey time information need a mechanism by which they can be configured to use a - user’s preferred format. */ -cluster TimeFormatLocalization = 44 { - revision 1; // NOTE: Default/not specifically set - - enum CalendarTypeEnum : enum8 { - kBuddhist = 0; - kChinese = 1; - kCoptic = 2; - kEthiopian = 3; - kGregorian = 4; - kHebrew = 5; - kIndian = 6; - kIslamic = 7; - kJapanese = 8; - kKorean = 9; - kPersian = 10; - kTaiwanese = 11; - kUseActiveLocale = 255; - } - - enum HourFormatEnum : enum8 { - k12hr = 0; - k24hr = 1; - kUseActiveLocale = 255; - } - - bitmap Feature : bitmap32 { - kCalendarFormat = 0x1; - } - - attribute access(write: manage) HourFormatEnum hourFormat = 0; - attribute access(write: manage) optional CalendarTypeEnum activeCalendarType = 1; - readonly attribute optional CalendarTypeEnum supportedCalendarTypes[] = 2; - readonly attribute command_id generatedCommandList[] = 65528; - readonly attribute command_id acceptedCommandList[] = 65529; - readonly attribute event_id eventList[] = 65530; - readonly attribute attrib_id attributeList[] = 65531; - readonly attribute bitmap32 featureMap = 65532; - readonly attribute int16u clusterRevision = 65533; -} - /** Nodes should be expected to be deployed to any and all regions of the world. These global regions may have differing preferences for the units in which values are conveyed in communication to a user. As such, Nodes that visually or audibly convey measurable values to the user need a @@ -1618,25 +1553,6 @@ endpoint 0 { ram attribute clusterRevision default = 3; } - server cluster LocalizationConfiguration { - persist attribute activeLocale default = "en-US"; - callback attribute supportedLocales; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - - server cluster TimeFormatLocalization { - persist attribute hourFormat default = 0; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute attributeList; - ram attribute featureMap default = 0; - ram attribute clusterRevision default = 1; - } - server cluster UnitLocalization { persist attribute temperatureUnit default = 0; callback attribute generatedCommandList; diff --git a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap index 12cad848810d09..d8804e9526b4af 100644 --- a/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap +++ b/examples/dishwasher-app/dishwasher-common/dishwasher-app.zap @@ -1098,234 +1098,6 @@ } ] }, - { - "name": "Localization Configuration", - "code": 43, - "mfgCode": null, - "define": "LOCALIZATION_CONFIGURATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "ActiveLocale", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "char_string", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "en-US", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "SupportedLocales", - "code": 1, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, - { - "name": "Time Format Localization", - "code": 44, - "mfgCode": null, - "define": "TIME_FORMAT_LOCALIZATION_CLUSTER", - "side": "server", - "enabled": 1, - "attributes": [ - { - "name": "HourFormat", - "code": 0, - "mfgCode": null, - "side": "server", - "type": "HourFormatEnum", - "included": 1, - "storageOption": "NVM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "GeneratedCommandList", - "code": 65528, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AcceptedCommandList", - "code": 65529, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "AttributeList", - "code": 65531, - "mfgCode": null, - "side": "server", - "type": "array", - "included": 1, - "storageOption": "External", - "singleton": 0, - "bounded": 0, - "defaultValue": null, - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "FeatureMap", - "code": 65532, - "mfgCode": null, - "side": "server", - "type": "bitmap32", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "0", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "ClusterRevision", - "code": 65533, - "mfgCode": null, - "side": "server", - "type": "int16u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "1", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - } - ] - }, { "name": "Unit Localization", "code": 45, diff --git a/examples/all-clusters-app/cc13x4_26x4/main/Globals.cpp b/examples/energy-management-app/energy-management-common/device-energy-management/include/DEMDelegate.h similarity index 75% rename from examples/all-clusters-app/cc13x4_26x4/main/Globals.cpp rename to examples/energy-management-app/energy-management-common/device-energy-management/include/DEMDelegate.h index 00fd64e3125218..ac5cc5000e71b9 100644 --- a/examples/all-clusters-app/cc13x4_26x4/main/Globals.cpp +++ b/examples/energy-management-app/energy-management-common/device-energy-management/include/DEMDelegate.h @@ -1,6 +1,6 @@ /* * - * Copyright (c) 2022 Project CHIP Authors + * Copyright (c) 2024 Project CHIP Authors * All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -16,9 +16,8 @@ * limitations under the License. */ -#include "Globals.h" +#pragma once -#if (LED_ENABLE == 1) -LED_Handle sAppRedHandle; -LED_Handle sAppGreenHandle; -#endif +#include + +chip::app::Clusters::DeviceEnergyManagement::DeviceEnergyManagementDelegate * GetDEMDelegate(); diff --git a/examples/energy-management-app/energy-management-common/device-energy-management/include/DeviceEnergyManagementDelegateImpl.h b/examples/energy-management-app/energy-management-common/device-energy-management/include/DeviceEnergyManagementDelegateImpl.h index e540d56e030058..da563910f749c7 100644 --- a/examples/energy-management-app/energy-management-common/device-energy-management/include/DeviceEnergyManagementDelegateImpl.h +++ b/examples/energy-management-app/energy-management-common/device-energy-management/include/DeviceEnergyManagementDelegateImpl.h @@ -189,6 +189,7 @@ class DeviceEnergyManagementDelegate : public DeviceEnergyManagement::Delegate CHIP_ERROR SetAbsMinPower(int64_t); CHIP_ERROR SetAbsMaxPower(int64_t); CHIP_ERROR SetPowerAdjustmentCapability(const DataModel::Nullable &); + CHIP_ERROR SetPowerAdjustmentCapabilityPowerAdjustReason(const PowerAdjustReasonEnum); // The DeviceEnergyManagementDelegate owns the master copy of the ForecastStruct object which is accessed via GetForecast and // SetForecast. The slots field of forecast is owned and managed by the object that implements the DEMManufacturerDelegate diff --git a/examples/energy-management-app/energy-management-common/device-energy-management/src/DEMTestEventTriggers.cpp b/examples/energy-management-app/energy-management-common/device-energy-management/src/DEMTestEventTriggers.cpp index 469b781a9b6211..ff545ecf38c762 100644 --- a/examples/energy-management-app/energy-management-common/device-energy-management/src/DEMTestEventTriggers.cpp +++ b/examples/energy-management-app/energy-management-common/device-energy-management/src/DEMTestEventTriggers.cpp @@ -16,6 +16,7 @@ * limitations under the License. */ +#include #include #include #include @@ -41,16 +42,6 @@ static chip::app::Clusters::DeviceEnergyManagement::Structs::PowerAdjustCapabili static chip::app::DataModel::Nullable sPowerAdjustmentCapability; -DeviceEnergyManagementDelegate * GetDEMDelegate() -{ - EVSEManufacturer * mn = GetEvseManufacturer(); - VerifyOrDieWithMsg(mn != nullptr, AppServer, "EVSEManufacturer is null"); - DeviceEnergyManagementDelegate * dg = mn->GetDEMDelegate(); - VerifyOrDieWithMsg(dg != nullptr, AppServer, "DEM Delegate is null"); - - return dg; -} - CHIP_ERROR ConfigureForecast(uint16_t numSlots) { uint32_t chipEpoch = 0; @@ -92,9 +83,9 @@ CHIP_ERROR ConfigureForecast(uint16_t numSlots) if (GetDEMDelegate()->HasFeature(DeviceEnergyManagement::Feature::kPowerForecastReporting)) { - sSlots[0].nominalPower.SetValue(1500); - sSlots[0].minPower.SetValue(1000); - sSlots[0].maxPower.SetValue(2000); + sSlots[0].nominalPower.SetValue(2500000); + sSlots[0].minPower.SetValue(1200000); + sSlots[0].maxPower.SetValue(7600000); } sSlots[0].nominalEnergy.SetValue(2000); @@ -119,9 +110,9 @@ CHIP_ERROR ConfigureForecast(uint16_t numSlots) if (GetDEMDelegate()->HasFeature(DeviceEnergyManagement::Feature::kPowerForecastReporting)) { - sSlots[slotNo].nominalPower.SetValue(2 * sSlots[slotNo - 1].nominalPower.Value()); - sSlots[slotNo].minPower.SetValue(2 * sSlots[slotNo - 1].minPower.Value()); - sSlots[slotNo].maxPower.SetValue(2 * sSlots[slotNo - 1].maxPower.Value()); + sSlots[slotNo].nominalPower.SetValue(sSlots[slotNo - 1].nominalPower.Value()); + sSlots[slotNo].minPower.SetValue(sSlots[slotNo - 1].minPower.Value()); + sSlots[slotNo].maxPower.SetValue(sSlots[slotNo - 1].maxPower.Value()); sSlots[slotNo].nominalEnergy.SetValue(2 * sSlots[slotNo - 1].nominalEnergy.Value()); } @@ -134,10 +125,7 @@ CHIP_ERROR ConfigureForecast(uint16_t numSlots) sForecastStruct.slots = DataModel::List(sSlots, numSlots); - EVSEManufacturer * mn = GetEvseManufacturer(); - mn->GetDEMDelegate()->SetForecast(DataModel::MakeNullable(sForecastStruct)); - mn->GetDEMDelegate()->SetAbsMinPower(1000); - mn->GetDEMDelegate()->SetAbsMaxPower(256 * 2000 * 1000); + GetDEMDelegate()->SetForecast(DataModel::MakeNullable(sForecastStruct)); return CHIP_NO_ERROR; } diff --git a/examples/energy-management-app/energy-management-common/device-energy-management/src/DeviceEnergyManagementDelegateImpl.cpp b/examples/energy-management-app/energy-management-common/device-energy-management/src/DeviceEnergyManagementDelegateImpl.cpp index 273bc9e0614333..157b85d4773f5f 100644 --- a/examples/energy-management-app/energy-management-common/device-energy-management/src/DeviceEnergyManagementDelegateImpl.cpp +++ b/examples/energy-management-app/energy-management-common/device-energy-management/src/DeviceEnergyManagementDelegateImpl.cpp @@ -120,11 +120,11 @@ Status DeviceEnergyManagementDelegate::PowerAdjustRequest(const int64_t powerMw, switch (cause) { case AdjustmentCauseEnum::kLocalOptimization: - mPowerAdjustCapabilityStruct.Value().cause = PowerAdjustReasonEnum::kLocalOptimizationAdjustment; + SetPowerAdjustmentCapabilityPowerAdjustReason(PowerAdjustReasonEnum::kLocalOptimizationAdjustment); break; case AdjustmentCauseEnum::kGridOptimization: - mPowerAdjustCapabilityStruct.Value().cause = PowerAdjustReasonEnum::kGridOptimizationAdjustment; + SetPowerAdjustmentCapabilityPowerAdjustReason(PowerAdjustReasonEnum::kGridOptimizationAdjustment); break; default: @@ -175,7 +175,7 @@ void DeviceEnergyManagementDelegate::HandlePowerAdjustRequestFailure() mPowerAdjustmentInProgress = false; - mPowerAdjustCapabilityStruct.Value().cause = PowerAdjustReasonEnum::kNoAdjustment; + SetPowerAdjustmentCapabilityPowerAdjustReason(PowerAdjustReasonEnum::kNoAdjustment); // TODO // Should we inform the mpDEMManufacturerDelegate that PowerAdjustRequest has failed? @@ -210,7 +210,7 @@ void DeviceEnergyManagementDelegate::HandlePowerAdjustTimerExpiry() SetESAState(ESAStateEnum::kOnline); - mPowerAdjustCapabilityStruct.Value().cause = PowerAdjustReasonEnum::kNoAdjustment; + SetPowerAdjustmentCapabilityPowerAdjustReason(PowerAdjustReasonEnum::kNoAdjustment); // Generate a PowerAdjustEnd event GeneratePowerAdjustEndEvent(CauseEnum::kNormalCompletion); @@ -264,8 +264,7 @@ CHIP_ERROR DeviceEnergyManagementDelegate::CancelPowerAdjustRequestAndGenerateEv SetESAState(ESAStateEnum::kOnline); mPowerAdjustmentInProgress = false; - - mPowerAdjustCapabilityStruct.Value().cause = PowerAdjustReasonEnum::kNoAdjustment; + SetPowerAdjustmentCapabilityPowerAdjustReason(PowerAdjustReasonEnum::kNoAdjustment); CHIP_ERROR err = GeneratePowerAdjustEndEvent(cause); @@ -377,10 +376,14 @@ Status DeviceEnergyManagementDelegate::StartTimeAdjustRequest(const uint32_t req mForecast.Value().startTime = savedStartTime; mForecast.Value().endTime = savedEndTime; + MatterReportingAttributeChangeCallback(mEndpointId, DeviceEnergyManagement::Id, Forecast::Id); + return Status::Failure; } } + MatterReportingAttributeChangeCallback(mEndpointId, DeviceEnergyManagement::Id, Forecast::Id); + return Status::Success; } @@ -457,10 +460,14 @@ Status DeviceEnergyManagementDelegate::PauseRequest(const uint32_t durationS, Ad if (cause == AdjustmentCauseEnum::kLocalOptimization) { mForecast.Value().forecastUpdateReason = ForecastUpdateReasonEnum::kLocalOptimization; + + MatterReportingAttributeChangeCallback(mEndpointId, DeviceEnergyManagement::Id, Forecast::Id); } else if (cause == AdjustmentCauseEnum::kGridOptimization) { mForecast.Value().forecastUpdateReason = ForecastUpdateReasonEnum::kGridOptimization; + + MatterReportingAttributeChangeCallback(mEndpointId, DeviceEnergyManagement::Id, Forecast::Id); } return Status::Success; @@ -606,6 +613,8 @@ Status DeviceEnergyManagementDelegate::ResumeRequest() // The PauseRequest has effectively been cancelled so as a result the device should // go back to InternalOptimisation mForecast.Value().forecastUpdateReason = ForecastUpdateReasonEnum::kInternalOptimization; + + MatterReportingAttributeChangeCallback(mEndpointId, DeviceEnergyManagement::Id, Forecast::Id); } CHIP_ERROR err = CancelPauseRequestAndGenerateEvent(CauseEnum::kCancelled); @@ -672,6 +681,8 @@ Status DeviceEnergyManagementDelegate::ModifyForecastRequest( } mForecast.Value().forecastID++; + + MatterReportingAttributeChangeCallback(mEndpointId, DeviceEnergyManagement::Id, Forecast::Id); } return status; @@ -725,6 +736,8 @@ Status DeviceEnergyManagementDelegate::RequestConstraintBasedForecast( mForecast.Value().forecastID++; + MatterReportingAttributeChangeCallback(mEndpointId, DeviceEnergyManagement::Id, Forecast::Id); + status = Status::Success; } @@ -748,6 +761,8 @@ Status DeviceEnergyManagementDelegate::CancelRequest() mForecast.Value().forecastUpdateReason = ForecastUpdateReasonEnum::kInternalOptimization; + MatterReportingAttributeChangeCallback(mEndpointId, DeviceEnergyManagement::Id, Forecast::Id); + /* It is expected the mpDEMManufacturerDelegate will cancel the effects of any previous adjustment * request commands, and re-evaluate its forecast for intended operation ignoring those previous * requests. @@ -906,6 +921,18 @@ DeviceEnergyManagementDelegate::SetPowerAdjustmentCapability( return CHIP_NO_ERROR; } +CHIP_ERROR +DeviceEnergyManagementDelegate::SetPowerAdjustmentCapabilityPowerAdjustReason(PowerAdjustReasonEnum powerAdjustReason) +{ + assertChipStackLockedByCurrentThread(); + + mPowerAdjustCapabilityStruct.Value().cause = powerAdjustReason; + + MatterReportingAttributeChangeCallback(mEndpointId, DeviceEnergyManagement::Id, PowerAdjustmentCapability::Id); + + return CHIP_NO_ERROR; +} + CHIP_ERROR DeviceEnergyManagementDelegate::SetForecast(const DataModel::Nullable & forecast) { assertChipStackLockedByCurrentThread(); @@ -946,9 +973,9 @@ CHIP_ERROR DeviceEnergyManagementDelegate::SetOptOutState(OptOutStateEnum newVal if (mPowerAdjustmentInProgress) { if ((newValue == OptOutStateEnum::kLocalOptOut && - mPowerAdjustCapabilityStruct.Value().cause == PowerAdjustReasonEnum::kLocalOptimizationAdjustment) || + GetPowerAdjustmentCapability().Value().cause == PowerAdjustReasonEnum::kLocalOptimizationAdjustment) || (newValue == OptOutStateEnum::kGridOptOut && - mPowerAdjustCapabilityStruct.Value().cause == PowerAdjustReasonEnum::kGridOptimizationAdjustment) || + GetPowerAdjustmentCapability().Value().cause == PowerAdjustReasonEnum::kGridOptimizationAdjustment) || newValue == OptOutStateEnum::kOptOut) { err = CancelPowerAdjustRequestAndGenerateEvent(DeviceEnergyManagement::CauseEnum::kUserOptOut); @@ -980,6 +1007,8 @@ CHIP_ERROR DeviceEnergyManagementDelegate::SetOptOutState(OptOutStateEnum newVal if ((mOptOutState == OptOutStateEnum::kOptOut) || (mOptOutState == OptOutStateEnum::kLocalOptOut)) { mForecast.Value().forecastUpdateReason = ForecastUpdateReasonEnum::kInternalOptimization; + + MatterReportingAttributeChangeCallback(mEndpointId, DeviceEnergyManagement::Id, Forecast::Id); // Generate a new forecast with Internal Optimization // TODO } @@ -988,6 +1017,8 @@ CHIP_ERROR DeviceEnergyManagementDelegate::SetOptOutState(OptOutStateEnum newVal if ((mOptOutState == OptOutStateEnum::kOptOut) || (mOptOutState == OptOutStateEnum::kGridOptOut)) { mForecast.Value().forecastUpdateReason = ForecastUpdateReasonEnum::kInternalOptimization; + + MatterReportingAttributeChangeCallback(mEndpointId, DeviceEnergyManagement::Id, Forecast::Id); // Generate a new forecast with Internal Optimization // TODO } diff --git a/examples/energy-management-app/energy-management-common/energy-evse/include/EVSEManufacturerImpl.h b/examples/energy-management-app/energy-management-common/energy-evse/include/EVSEManufacturerImpl.h index b94220d11b28f3..17d2c865bbaf53 100644 --- a/examples/energy-management-app/energy-management-common/energy-evse/include/EVSEManufacturerImpl.h +++ b/examples/energy-management-app/energy-management-common/energy-evse/include/EVSEManufacturerImpl.h @@ -213,6 +213,13 @@ class EVSEManufacturer : public DEMManufacturerDelegate */ static void FakeReadingsTimerExpiry(System::Layer * systemLayer, void * manufacturer); + /* + * @brief Updates the parameters used to generate fake power and energy readings + * + * @param maximumChargeCurrent Maximum Charge current in mA + */ + void UpdateEVFakeReadings(const Amperage_mA maximumChargeCurrent); + private: EnergyEvseManager * mEvseInstance; ElectricalPowerMeasurement::ElectricalPowerMeasurementInstance * mEPMInstance; diff --git a/examples/energy-management-app/energy-management-common/energy-evse/include/EnergyEvseDelegateImpl.h b/examples/energy-management-app/energy-management-common/energy-evse/include/EnergyEvseDelegateImpl.h index c43707d9d09589..0b84e8fcc87c22 100644 --- a/examples/energy-management-app/energy-management-common/energy-evse/include/EnergyEvseDelegateImpl.h +++ b/examples/energy-management-app/energy-management-common/energy-evse/include/EnergyEvseDelegateImpl.h @@ -56,33 +56,47 @@ enum EVSEStateMachineEvent class EvseSession { public: - EvseSession(EndpointId aEndpoint) { mEndpointId = aEndpoint; } + EvseSession() {} /** * @brief This function records the start time and provided energy meter values as part of the new session. * + * @param endpointId - The endpoint to report the update on * @param chargingMeterValue - The current value of the energy meter (charging) in mWh * @param dischargingMeterValue - The current value of the energy meter (discharging) in mWh */ - void StartSession(int64_t chargingMeterValue, int64_t dischargingMeterValue); + void StartSession(EndpointId endpointId, int64_t chargingMeterValue, int64_t dischargingMeterValue); + + /** + * @brief This function updates the session information at the unplugged event + * + * @param endpointId - The endpoint to report the update on + * @param chargingMeterValue - The current value of the energy meter (charging) in mWh + * @param dischargingMeterValue - The current value of the energy meter (discharging) in mWh + */ + void StopSession(EndpointId endpointId, int64_t chargingMeterValue, int64_t dischargingMeterValue); /** * @brief This function updates the session Duration to allow read attributes to return latest values + * + * @param endpointId - The endpoint to report the update on */ - void RecalculateSessionDuration(); + void RecalculateSessionDuration(EndpointId endpointId); /** * @brief This function updates the EnergyCharged meter value * + * @param endpointId - The endpoint to report the update on * @param chargingMeterValue - The value of the energy meter (charging) in mWh */ - void UpdateEnergyCharged(int64_t chargingMeterValue); + void UpdateEnergyCharged(EndpointId endpointId, int64_t chargingMeterValue); /** * @brief This function updates the EnergyDischarged meter value * + * @param endpointId - The endpoint to report the update on * @param dischargingMeterValue - The value of the energy meter (discharging) in mWh */ - void UpdateEnergyDischarged(int64_t dischargingMeterValue); + void UpdateEnergyDischarged(EndpointId endpointId, int64_t dischargingMeterValue); /* Public members - represent attributes in the cluster */ DataModel::Nullable mSessionID; @@ -91,8 +105,6 @@ class EvseSession DataModel::Nullable mSessionEnergyDischarged; private: - EndpointId mEndpointId = 0; - uint32_t mStartTime = 0; // Epoch_s - 0 means it hasn't started yet int64_t mSessionEnergyChargedAtStart = 0; // in mWh - 0 means it hasn't been set yet int64_t mSessionEnergyDischargedAtStart = 0; // in mWh - 0 means it hasn't been set yet @@ -358,7 +370,7 @@ class EnergyEvseDelegate : public EnergyEvse::Delegate DataModel::Nullable mVehicleID; /* Session Object */ - EvseSession mSession = EvseSession(mEndpointId); + EvseSession mSession = EvseSession(); /* Helper variable to hold meter val since last EnergyTransferStarted event */ int64_t mMeterValueAtEnergyTransferStart; diff --git a/examples/energy-management-app/energy-management-common/energy-evse/include/EnergyEvseMain.h b/examples/energy-management-app/energy-management-common/energy-evse/include/EnergyEvseMain.h index 2e7e29537ef3b4..07dce510e9b38c 100644 --- a/examples/energy-management-app/energy-management-common/energy-evse/include/EnergyEvseMain.h +++ b/examples/energy-management-app/energy-management-common/energy-evse/include/EnergyEvseMain.h @@ -18,5 +18,16 @@ #pragma once +#include + void EvseApplicationInit(); void EvseApplicationShutdown(); + +CHIP_ERROR DeviceEnergyManagementInit(); +CHIP_ERROR DeviceEnergyManagementShutdown(); + +CHIP_ERROR EnergyMeterInit(); +CHIP_ERROR EnergyMeterShutdown(); + +CHIP_ERROR PowerTopologyInit(); +CHIP_ERROR PowerTopologyShutdown(); diff --git a/examples/energy-management-app/energy-management-common/energy-evse/src/EVSEManufacturerImpl.cpp b/examples/energy-management-app/energy-management-common/energy-evse/src/EVSEManufacturerImpl.cpp index 00ced85a9aa2b6..4f28c3249f6538 100644 --- a/examples/energy-management-app/energy-management-common/energy-evse/src/EVSEManufacturerImpl.cpp +++ b/examples/energy-management-app/energy-management-common/energy-evse/src/EVSEManufacturerImpl.cpp @@ -24,6 +24,7 @@ #include #include +#include #include #include #include @@ -70,6 +71,10 @@ CHIP_ERROR EVSEManufacturer::Init() /* For Device Energy Management we need the ESA to be Online and ready to accept commands */ dem->SetESAState(ESAStateEnum::kOnline); + // Set the abs min and max power + dem->SetAbsMinPower(1200000); // 1.2KW + dem->SetAbsMaxPower(7600000); // 7.6KW + /* * This is an example implementation for manufacturers to consider * @@ -547,6 +552,13 @@ CHIP_ERROR EVSEManufacturer::SendPeriodicEnergyReading(EndpointId aEndpointId, i return CHIP_NO_ERROR; } +void EVSEManufacturer::UpdateEVFakeReadings(const Amperage_mA maximumChargeCurrent) +{ + FakeReadings::GetInstance().SetCurrent(maximumChargeCurrent); + // Note we have to divide by 1000 to make ma * mv = mW + FakeReadings::GetInstance().SetPower((FakeReadings::GetInstance().GetVoltage() * maximumChargeCurrent) / 1000); +} + /** * @brief Main Callback handler - to be implemented by Manufacturer * @@ -569,6 +581,7 @@ void EVSEManufacturer::ApplicationCallbackHandler(const EVSECbInfo * cb, intptr_ ChipLogProgress(AppServer, "EVSE callback - maxChargeCurrent changed to %ld", static_cast(cb->ChargingCurrent.maximumChargeCurrent)); pClass->ComputeChargingSchedule(); + pClass->UpdateEVFakeReadings(cb->ChargingCurrent.maximumChargeCurrent); break; case EVSECallbackType::EnergyMeterReadingRequested: ChipLogProgress(AppServer, "EVSE callback - EnergyMeterReadingRequested"); diff --git a/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseDelegateImpl.cpp b/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseDelegateImpl.cpp index 6266be245c2a4a..0294a0349e8f29 100644 --- a/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseDelegateImpl.cpp +++ b/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseDelegateImpl.cpp @@ -672,8 +672,8 @@ Status EnergyEvseDelegate::HandleEVPluggedInEvent() if (mState == StateEnum::kNotPluggedIn) { /* EV was not plugged in - start a new session */ - // TODO get energy meter readings - mSession.StartSession(0, 0); + // TODO get energy meter readings - #35370 + mSession.StartSession(mEndpointId, 0, 0); SendEVConnectedEvent(); /* Set the state to either PluggedInNoDemand or PluggedInDemand as indicated by mHwState */ @@ -694,6 +694,8 @@ Status EnergyEvseDelegate::HandleEVNotDetectedEvent() SendEnergyTransferStoppedEvent(EnergyTransferStoppedReasonEnum::kOther); } + // TODO get energy meter readings - #35370 + mSession.StopSession(mEndpointId, 0, 0); SendEVNotDetectedEvent(); SetState(StateEnum::kNotPluggedIn); return Status::Success; @@ -706,7 +708,7 @@ Status EnergyEvseDelegate::HandleEVNoDemandEvent() /* * EV was transferring current - EV decided to stop */ - mSession.RecalculateSessionDuration(); + mSession.RecalculateSessionDuration(mEndpointId); SendEnergyTransferStoppedEvent(EnergyTransferStoppedReasonEnum::kEVStopped); } /* We must still be plugged in to get here - so no need to check if we are plugged in! */ @@ -1601,7 +1603,6 @@ DataModel::Nullable EnergyEvseDelegate::GetSessionID() } DataModel::Nullable EnergyEvseDelegate::GetSessionDuration() { - mSession.RecalculateSessionDuration(); return mSession.mSessionDuration; } DataModel::Nullable EnergyEvseDelegate::GetSessionEnergyCharged() @@ -1626,10 +1627,11 @@ bool EnergyEvseDelegate::IsEvsePluggedIn() /** * @brief This function samples the start-time, and energy meter to hold the session info * + * @param endpointId - The endpoint to report the update on * @param chargingMeterValue - The current value of the energy meter (charging) in mWh * @param dischargingMeterValue - The current value of the energy meter (discharging) in mWh */ -void EvseSession::StartSession(int64_t chargingMeterValue, int64_t dischargingMeterValue) +void EvseSession::StartSession(EndpointId endpointId, int64_t chargingMeterValue, int64_t dischargingMeterValue) { /* Get Timestamp */ uint32_t chipEpoch = 0; @@ -1661,13 +1663,13 @@ void EvseSession::StartSession(int64_t chargingMeterValue, int64_t dischargingMe mSessionEnergyCharged = MakeNullable(static_cast(0)); mSessionEnergyDischarged = MakeNullable(static_cast(0)); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, SessionID::Id); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, SessionDuration::Id); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, SessionEnergyCharged::Id); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, SessionEnergyDischarged::Id); + MatterReportingAttributeChangeCallback(endpointId, EnergyEvse::Id, SessionID::Id); + MatterReportingAttributeChangeCallback(endpointId, EnergyEvse::Id, SessionDuration::Id); + MatterReportingAttributeChangeCallback(endpointId, EnergyEvse::Id, SessionEnergyCharged::Id); + MatterReportingAttributeChangeCallback(endpointId, EnergyEvse::Id, SessionEnergyDischarged::Id); // Write values to persistent storage. - ConcreteAttributePath path = ConcreteAttributePath(mEndpointId, EnergyEvse::Id, SessionID::Id); + ConcreteAttributePath path = ConcreteAttributePath(endpointId, EnergyEvse::Id, SessionID::Id); GetSafeAttributePersistenceProvider()->WriteScalarValue(path, mSessionID); // TODO persist mStartTime @@ -1675,12 +1677,28 @@ void EvseSession::StartSession(int64_t chargingMeterValue, int64_t dischargingMe // TODO persist mSessionEnergyDischargedAtStart } +/** + * @brief This function updates the session information at the unplugged event + * + * @param endpointId - The endpoint to report the update on + * @param chargingMeterValue - The current value of the energy meter (charging) in mWh + * @param dischargingMeterValue - The current value of the energy meter (discharging) in mWh + */ +void EvseSession::StopSession(EndpointId endpointId, int64_t chargingMeterValue, int64_t dischargingMeterValue) +{ + RecalculateSessionDuration(endpointId); + UpdateEnergyCharged(endpointId, chargingMeterValue); + UpdateEnergyDischarged(endpointId, dischargingMeterValue); +} + /*---------------------- EvseSession functions --------------------------*/ /** * @brief This function updates the session attrs to allow read attributes to return latest values + * + * @param endpointId - The endpoint to report the update on */ -void EvseSession::RecalculateSessionDuration() +void EvseSession::RecalculateSessionDuration(EndpointId endpointId) { /* Get Timestamp */ uint32_t chipEpoch = 0; @@ -1696,27 +1714,29 @@ void EvseSession::RecalculateSessionDuration() uint32_t duration = chipEpoch - mStartTime; mSessionDuration = MakeNullable(duration); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, SessionDuration::Id); + MatterReportingAttributeChangeCallback(endpointId, EnergyEvse::Id, SessionDuration::Id); } /** * @brief This function updates the EnergyCharged meter value * + * @param endpointId - The endpoint to report the update on * @param chargingMeterValue - The value of the energy meter (charging) in mWh */ -void EvseSession::UpdateEnergyCharged(int64_t chargingMeterValue) +void EvseSession::UpdateEnergyCharged(EndpointId endpointId, int64_t chargingMeterValue) { mSessionEnergyCharged = MakeNullable(chargingMeterValue - mSessionEnergyChargedAtStart); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, SessionEnergyCharged::Id); + MatterReportingAttributeChangeCallback(endpointId, EnergyEvse::Id, SessionEnergyCharged::Id); } /** * @brief This function updates the EnergyDischarged meter value * + * @param endpointId - The endpoint to report the update on * @param dischargingMeterValue - The value of the energy meter (discharging) in mWh */ -void EvseSession::UpdateEnergyDischarged(int64_t dischargingMeterValue) +void EvseSession::UpdateEnergyDischarged(EndpointId endpointId, int64_t dischargingMeterValue) { mSessionEnergyDischarged = MakeNullable(dischargingMeterValue - mSessionEnergyDischargedAtStart); - MatterReportingAttributeChangeCallback(mEndpointId, EnergyEvse::Id, SessionEnergyDischarged::Id); + MatterReportingAttributeChangeCallback(endpointId, EnergyEvse::Id, SessionEnergyDischarged::Id); } diff --git a/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseMain.cpp b/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseMain.cpp index bd22c67eafd9b5..8e900c0948008a 100644 --- a/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseMain.cpp +++ b/examples/energy-management-app/energy-management-common/energy-evse/src/EnergyEvseMain.cpp @@ -67,6 +67,13 @@ EVSEManufacturer * EnergyEvse::GetEvseManufacturer() return gEvseManufacturer.get(); } +DeviceEnergyManagement::DeviceEnergyManagementDelegate * GetDEMDelegate() +{ + VerifyOrDieWithMsg(gDEMDelegate.get() != nullptr, AppServer, "DEM Delegate is null"); + + return gDEMDelegate.get(); +} + /* * @brief Creates a Delegate and Instance for DEM * @@ -472,7 +479,7 @@ void EvseApplicationInit() void EvseApplicationShutdown() { - ChipLogDetail(AppServer, "Energy Management App: ApplicationShutdown()"); + ChipLogDetail(AppServer, "Energy Management App (EVSE): ApplicationShutdown()"); /* Shutdown in reverse order that they were created */ EVSEManufacturerShutdown(); /* Free the EVSEManufacturer */ diff --git a/examples/energy-management-app/energy-management-common/energy-management-app.matter b/examples/energy-management-app/energy-management-common/energy-management-app.matter index e7fba7e08e028f..3dae5dc5d7a88f 100644 --- a/examples/energy-management-app/energy-management-common/energy-management-app.matter +++ b/examples/energy-management-app/energy-management-common/energy-management-app.matter @@ -409,14 +409,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -443,7 +439,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both @@ -1737,6 +1733,67 @@ cluster ElectricalEnergyMeasurement = 145 { readonly attribute int16u clusterRevision = 65533; } +/** This cluster is used to allow clients to control the operation of a hot water heating appliance so that it can be used with energy management. */ +provisional cluster WaterHeaterManagement = 148 { + revision 2; + + enum BoostStateEnum : enum8 { + kInactive = 0; + kActive = 1; + } + + bitmap Feature : bitmap32 { + kEnergyManagement = 0x1; + kTankPercent = 0x2; + } + + bitmap WaterHeaterHeatSourceBitmap : bitmap8 { + kImmersionElement1 = 0x1; + kImmersionElement2 = 0x2; + kHeatPump = 0x4; + kBoiler = 0x8; + kOther = 0x10; + } + + struct WaterHeaterBoostInfoStruct { + elapsed_s duration = 0; + optional boolean oneShot = 1; + optional boolean emergencyBoost = 2; + optional temperature temporarySetpoint = 3; + optional percent targetPercentage = 4; + optional percent targetReheat = 5; + } + + info event BoostStarted = 0 { + WaterHeaterBoostInfoStruct boostInfo = 0; + } + + info event BoostEnded = 1 { + } + + readonly attribute WaterHeaterHeatSourceBitmap heaterTypes = 0; + readonly attribute WaterHeaterHeatSourceBitmap heatDemand = 1; + readonly attribute optional int16u tankVolume = 2; + readonly attribute optional energy_mwh estimatedHeatRequired = 3; + readonly attribute optional percent tankPercentage = 4; + readonly attribute BoostStateEnum boostState = 5; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct BoostRequest { + WaterHeaterBoostInfoStruct boostInfo = 0; + } + + /** Allows a client to request that the water heater is put into a Boost state. */ + command access(invoke: manage) Boost(BoostRequest): DefaultSuccess = 0; + /** Allows a client to cancel an ongoing Boost operation. */ + command access(invoke: manage) CancelBoost(): DefaultSuccess = 1; +} + /** This cluster allows a client to manage the power draw of a device. An example of such a client could be an Energy Management System (EMS) which controls an Energy Smart Appliance (ESA). */ provisional cluster DeviceEnergyManagement = 152 { revision 4; @@ -2165,6 +2222,16 @@ cluster EnergyEvseMode = 157 { revision 1; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kManual = 16384; kTimeOfUse = 16385; kSolarCharging = 16386; @@ -2210,11 +2277,81 @@ cluster EnergyEvseMode = 157 { command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; } +/** Attributes and commands for selecting a mode from a list of supported options. */ +cluster WaterHeaterMode = 158 { + revision 1; + + enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; + kOff = 16384; + kManual = 16385; + kTimed = 16386; + } + + bitmap Feature : bitmap32 { + kOnOff = 0x1; + } + + struct ModeTagStruct { + optional vendor_id mfgCode = 0; + enum16 value = 1; + } + + struct ModeOptionStruct { + char_string<64> label = 0; + int8u mode = 1; + ModeTagStruct modeTags[] = 2; + } + + readonly attribute ModeOptionStruct supportedModes[] = 0; + readonly attribute int8u currentMode = 1; + attribute optional nullable int8u startUpMode = 2; + attribute optional nullable int8u onMode = 3; + readonly attribute command_id generatedCommandList[] = 65528; + readonly attribute command_id acceptedCommandList[] = 65529; + readonly attribute event_id eventList[] = 65530; + readonly attribute attrib_id attributeList[] = 65531; + readonly attribute bitmap32 featureMap = 65532; + readonly attribute int16u clusterRevision = 65533; + + request struct ChangeToModeRequest { + int8u newMode = 0; + } + + response struct ChangeToModeResponse = 1 { + enum8 status = 0; + optional char_string statusText = 1; + } + + /** This command is used to change device modes. + On receipt of this command the device SHALL respond with a ChangeToModeResponse command. */ + command ChangeToMode(ChangeToModeRequest): ChangeToModeResponse = 0; +} + /** Attributes and commands for selecting a mode from a list of supported options. */ provisional cluster DeviceEnergyManagementMode = 159 { revision 1; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kNoOptimization = 16384; kDeviceOptimization = 16385; kLocalOptimization = 16386; @@ -2557,6 +2694,24 @@ endpoint 1 { ram attribute clusterRevision default = 1; } + server cluster WaterHeaterManagement { + callback attribute heaterTypes; + callback attribute heatDemand; + callback attribute tankVolume; + callback attribute estimatedHeatRequired; + callback attribute tankPercentage; + callback attribute boostState; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + callback attribute clusterRevision; + + handle command Boost; + handle command CancelBoost; + } + server cluster DeviceEnergyManagement { emits event PowerAdjustStart; emits event PowerAdjustEnd; @@ -2575,7 +2730,7 @@ endpoint 1 { callback attribute eventList; callback attribute attributeList; callback attribute featureMap; - ram attribute clusterRevision default = 3; + ram attribute clusterRevision default = 4; handle command PowerAdjustRequest; handle command CancelPowerAdjustRequest; @@ -2640,8 +2795,20 @@ endpoint 1 { server cluster EnergyEvseMode { callback attribute supportedModes; callback attribute currentMode; - ram attribute startUpMode; - ram attribute onMode; + callback attribute generatedCommandList; + callback attribute acceptedCommandList; + callback attribute eventList; + callback attribute attributeList; + callback attribute featureMap; + ram attribute clusterRevision default = 1; + + handle command ChangeToMode; + handle command ChangeToModeResponse; + } + + server cluster WaterHeaterMode { + callback attribute supportedModes; + callback attribute currentMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; @@ -2656,8 +2823,6 @@ endpoint 1 { server cluster DeviceEnergyManagementMode { callback attribute supportedModes; callback attribute currentMode; - ram attribute startUpMode; - ram attribute onMode; callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute eventList; diff --git a/examples/energy-management-app/energy-management-common/energy-management-app.zap b/examples/energy-management-app/energy-management-common/energy-management-app.zap index 566588ab8e4d0d..17a539dbf13348 100644 --- a/examples/energy-management-app/energy-management-common/energy-management-app.zap +++ b/examples/energy-management-app/energy-management-common/energy-management-app.zap @@ -3696,6 +3696,227 @@ } ] }, + { + "name": "Water Heater Management", + "code": 148, + "mfgCode": null, + "define": "WATER_HEATER_MANAGEMENT_CLUSTER", + "side": "server", + "enabled": 1, + "apiMaturity": "provisional", + "commands": [ + { + "name": "Boost", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + }, + { + "name": "CancelBoost", + "code": 1, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "HeaterTypes", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "WaterHeaterHeatSourceBitmap", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "HeatDemand", + "code": 1, + "mfgCode": null, + "side": "server", + "type": "WaterHeaterHeatSourceBitmap", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TankVolume", + "code": 2, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EstimatedHeatRequired", + "code": 3, + "mfgCode": null, + "side": "server", + "type": "energy_mwh", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "TankPercentage", + "code": 4, + "mfgCode": null, + "side": "server", + "type": "percent", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "BoostState", + "code": 5, + "mfgCode": null, + "side": "server", + "type": "BoostStateEnum", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "GeneratedCommandList", + "code": 65528, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + } + ] + }, { "name": "Device Energy Management", "code": 152, @@ -3989,7 +4210,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "3", + "defaultValue": "4", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4680,32 +4901,156 @@ "reportableChange": 0 }, { - "name": "StartUpMode", - "code": 2, + "name": "GeneratedCommandList", + "code": 65528, "mfgCode": null, "side": "server", - "type": "int8u", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AcceptedCommandList", + "code": 65529, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "EventList", + "code": 65530, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "AttributeList", + "code": 65531, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "FeatureMap", + "code": 65532, + "mfgCode": null, + "side": "server", + "type": "bitmap32", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "ClusterRevision", + "code": 65533, + "mfgCode": null, + "side": "server", + "type": "int16u", "included": 1, "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "1", "reportable": 1, "minInterval": 1, "maxInterval": 65534, "reportableChange": 0 + } + ] + }, + { + "name": "Water Heater Mode", + "code": 158, + "mfgCode": null, + "define": "WATER_HEATER_MODE_CLUSTER", + "side": "server", + "enabled": 1, + "commands": [ + { + "name": "ChangeToMode", + "code": 0, + "mfgCode": null, + "source": "client", + "isIncoming": 1, + "isEnabled": 1 }, { - "name": "OnMode", - "code": 3, + "name": "ChangeToModeResponse", + "code": 1, + "mfgCode": null, + "source": "server", + "isIncoming": 0, + "isEnabled": 1 + } + ], + "attributes": [ + { + "name": "SupportedModes", + "code": 0, + "mfgCode": null, + "side": "server", + "type": "array", + "included": 1, + "storageOption": "External", + "singleton": 0, + "bounded": 0, + "defaultValue": null, + "reportable": 1, + "minInterval": 1, + "maxInterval": 65534, + "reportableChange": 0 + }, + { + "name": "CurrentMode", + "code": 1, "mfgCode": null, "side": "server", "type": "int8u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4868,38 +5213,6 @@ "maxInterval": 65534, "reportableChange": 0 }, - { - "name": "StartUpMode", - "code": 2, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, - { - "name": "OnMode", - "code": 3, - "mfgCode": null, - "side": "server", - "type": "int8u", - "included": 1, - "storageOption": "RAM", - "singleton": 0, - "bounded": 0, - "defaultValue": "", - "reportable": 1, - "minInterval": 1, - "maxInterval": 65534, - "reportableChange": 0 - }, { "name": "GeneratedCommandList", "code": 65528, diff --git a/examples/energy-management-app/energy-management-common/energy-reporting/include/FakeReadings.h b/examples/energy-management-app/energy-management-common/energy-reporting/include/FakeReadings.h index f8334ba2708b7e..4d8415ac39a40b 100644 --- a/examples/energy-management-app/energy-management-common/energy-reporting/include/FakeReadings.h +++ b/examples/energy-management-app/energy-management-common/energy-reporting/include/FakeReadings.h @@ -18,6 +18,7 @@ #pragma once +#include #include #include @@ -58,6 +59,15 @@ class FakeReadings */ void FakeReadingsUpdate(); + void SetPower(chip::Power_mW power_mW); + chip::Power_mW GetPower(); + + void SetVoltage(chip::Voltage_mV voltage_mV); + chip::Voltage_mV GetVoltage(); + + void SetCurrent(chip::Amperage_mA current_mA); + chip::Amperage_mA GetCurrent(); + /** * @brief Timer expiry callback to handle fake load */ diff --git a/examples/energy-management-app/energy-management-common/energy-reporting/src/FakeReadings.cpp b/examples/energy-management-app/energy-management-common/energy-reporting/src/FakeReadings.cpp index c887357a5f7b58..78795976c0bbc2 100644 --- a/examples/energy-management-app/energy-management-common/energy-reporting/src/FakeReadings.cpp +++ b/examples/energy-management-app/energy-management-common/energy-reporting/src/FakeReadings.cpp @@ -180,3 +180,28 @@ void FakeReadings::FakeReadingsTimerExpiry(System::Layer * systemLayer, void * m mn->FakeReadingsUpdate(); } + +void FakeReadings::SetPower(Power_mW aPower_mW) +{ + mPower_mW = aPower_mW; +} +Power_mW FakeReadings::GetPower() +{ + return mPower_mW; +}; +void FakeReadings::SetVoltage(Voltage_mV aVoltage_mV) +{ + mVoltage_mV = aVoltage_mV; +} +Voltage_mV FakeReadings::GetVoltage() +{ + return mVoltage_mV; +}; +void FakeReadings::SetCurrent(Amperage_mA aCurrent_mA) +{ + mCurrent_mA = aCurrent_mA; +} +Amperage_mA FakeReadings::GetCurrent() +{ + return mCurrent_mA; +} diff --git a/examples/energy-management-app/energy-management-common/water-heater/include/WaterHeaterMain.h b/examples/energy-management-app/energy-management-common/water-heater/include/WaterHeaterMain.h new file mode 100644 index 00000000000000..819ff9e4d160ca --- /dev/null +++ b/examples/energy-management-app/energy-management-common/water-heater/include/WaterHeaterMain.h @@ -0,0 +1,32 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +namespace chip { +namespace app { +namespace Clusters { +namespace WaterHeaterManagement { + +void FullWhmApplicationInit(); +void FullWhmApplicationShutdown(); + +} // namespace WaterHeaterManagement +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/all-clusters-app/all-clusters-common/include/WhmDelegate.h b/examples/energy-management-app/energy-management-common/water-heater/include/WhmDelegate.h similarity index 87% rename from examples/all-clusters-app/all-clusters-common/include/WhmDelegate.h rename to examples/energy-management-app/energy-management-common/water-heater/include/WhmDelegate.h index 27d8cd7cd96ecf..dffa91b5297efc 100644 --- a/examples/all-clusters-app/all-clusters-common/include/WhmDelegate.h +++ b/examples/energy-management-app/energy-management-common/water-heater/include/WhmDelegate.h @@ -104,8 +104,8 @@ class WaterHeaterManagementDelegate : public WaterHeaterManagement::Delegate * SHALL be rejected with appropriate error. */ Protocols::InteractionModel::Status HandleBoost(uint32_t duration, Optional oneShot, Optional emergencyBoost, - Optional temporarySetpoint, Optional targetPercentage, - Optional targetReheat) override; + Optional temporarySetpoint, Optional targetPercentage, + Optional targetReheat) override; /** * @brief Delegate should implement a handler to cancel a boost command. @@ -121,7 +121,7 @@ class WaterHeaterManagementDelegate : public WaterHeaterManagement::Delegate BitMask GetHeaterTypes() override; BitMask GetHeatDemand() override; uint16_t GetTankVolume() override; - int64_t GetEstimatedHeatRequired() override; + Energy_mWh GetEstimatedHeatRequired() override; Percent GetTankPercentage() override; BoostStateEnum GetBoostState() override; @@ -130,7 +130,7 @@ class WaterHeaterManagementDelegate : public WaterHeaterManagement::Delegate void SetHeaterTypes(BitMask heaterTypes); void SetHeatDemand(BitMask heatDemand); void SetTankVolume(uint16_t tankVolume); - void SetEstimatedHeatRequired(int64_t estimatedHeatRequired); + void SetEstimatedHeatRequired(Energy_mWh estimatedHeatRequired); void SetTankPercentage(Percent tankPercentage); void SetBoostState(BoostStateEnum boostState); @@ -152,19 +152,22 @@ class WaterHeaterManagementDelegate : public WaterHeaterManagement::Delegate * * @param waterTemperature The water temperature in 100th's Celsius */ - void SetWaterTemperature(uint16_t waterTemperature); + void SetWaterTemperature(int16_t waterTemperature); /** * @brief Set the target water temperature of the tank * * @param targetWaterTemperature The water temperature in 100th's Celsius */ - void SetTargetWaterTemperature(uint16_t targetWaterTemperature); + void SetTargetWaterTemperature(int16_t targetWaterTemperature); /** - * @brief Determine whether the heating sources need to be turned on or off + * @brief Determine whether the heating sources need to be turned on or off or left unchanged. + * + * @return Success if the heating was successfully turned on or off or left unchanged otherwise an error + * code is returned if turning the heating on or off failed. */ - Protocols::InteractionModel::Status CheckIfHeatNeedsToBeTurnedOnOrOff(); + Protocols::InteractionModel::Status ChangeHeatingIfNecessary(); /** * @brief Static timer callback for when Boost timer expires. @@ -194,9 +197,34 @@ class WaterHeaterManagementDelegate : public WaterHeaterManagement::Delegate * @param replacedWaterTemperature The temperature of the * percentageReplaced water. */ - void DrawOffHotWater(chip::Percent percentageReplaced, uint16_t replacedWaterTemperature); + void DrawOffHotWater(Percent percentageReplaced, int16_t replacedWaterTemperature); + + /** + * Set the temperature of the cold water that fills the tank as the hot water + * is drawn off. + * + * @param coldWaterTemperature The cold water temperature in 100th of a C + */ + void SetColdWaterTemperature(int16_t coldWaterTemperature); private: + /** + * Return the target temperature. + * If a boost command is in progress and has a mBoostTemporarySetpoint value use that as the + * target temperature otherwise use the temperature set via SetTargetWaterTemperature(). + * + * @return the target temperature + */ + int16_t GetActiveTargetWaterTemperature() const; + + /** + * @brief Calculate the percentage of the water in the tank at the target + * temperature. + * + * @return Percentage of water at the target temperature + */ + uint8_t CalculateTankPercentage() const; + /** * @brief Determine whether heating needs to be turned on or off or left as * is. @@ -223,13 +251,13 @@ class WaterHeaterManagementDelegate : public WaterHeaterManagement::Delegate WhmManufacturer * mpWhmManufacturer; // Target water temperature in 100ths of a C - uint16_t mTargetWaterTemperature; + int16_t mTargetWaterTemperature; // Actual water temperature in 100ths of a C - uint16_t mWaterTemperature; + int16_t mWaterTemperature; - // The % of water at temperature mReplacedWaterTemperature - uint16_t mReplacedWaterTemperature; + // The cold water temperature in 100ths of a C + int16_t mColdWaterTemperature; // Boost command parameters @@ -253,7 +281,7 @@ class WaterHeaterManagementDelegate : public WaterHeaterManagement::Delegate // amount of water that SHALL be heated by this Boost command before the // heater is switched off. This field is optional, however it SHALL be // included if the TargetReheat field is included. - Optional mBoostTargetPercentage; + Optional mBoostTargetPercentage; // If the tank supports the TankPercent feature, and the heating by this // Boost command has ceased because the TargetPercentage of the water in the @@ -266,7 +294,7 @@ class WaterHeaterManagementDelegate : public WaterHeaterManagement::Delegate // heat back up to 80% of hot water. If this field and the OneShot field // were both omitted, heating would begin again after any water draw which // reduced the TankPercentage below 80%. - Optional mBoostTargetReheat; + Optional mBoostTargetReheat; // Track whether the water temperature has reached the water temperature // specified in the boost command. Used in conjunction with the boost @@ -299,7 +327,7 @@ class WaterHeaterManagementDelegate : public WaterHeaterManagement::Delegate // taking the specific heat capacity of water (4182 J/kg °C) and by knowing // the current temperature of the water, the tank volume and target // temperature. - int64_t mEstimatedHeatRequired; + Energy_mWh mEstimatedHeatRequired; // This attribute SHALL indicate an approximate level of hot water stored in // the tank, which may help consumers understand the amount of hot water diff --git a/examples/all-clusters-app/all-clusters-common/include/WhmInstance.h b/examples/energy-management-app/energy-management-common/water-heater/include/WhmInstance.h similarity index 100% rename from examples/all-clusters-app/all-clusters-common/include/WhmInstance.h rename to examples/energy-management-app/energy-management-common/water-heater/include/WhmInstance.h diff --git a/examples/all-clusters-app/all-clusters-common/include/WhmMain.h b/examples/energy-management-app/energy-management-common/water-heater/include/WhmMain.h similarity index 89% rename from examples/all-clusters-app/all-clusters-common/include/WhmMain.h rename to examples/energy-management-app/energy-management-common/water-heater/include/WhmMain.h index 21dc9d86519307..34f04d8cbb6b8f 100644 --- a/examples/all-clusters-app/all-clusters-common/include/WhmMain.h +++ b/examples/energy-management-app/energy-management-common/water-heater/include/WhmMain.h @@ -18,13 +18,15 @@ #pragma once +#include + namespace chip { namespace app { namespace Clusters { namespace WaterHeaterManagement { -void WhmApplicationInit(); -void WhmApplicationShutdown(); +CHIP_ERROR WhmApplicationInit(); +CHIP_ERROR WhmApplicationShutdown(); } // namespace WaterHeaterManagement } // namespace Clusters diff --git a/examples/all-clusters-app/all-clusters-common/include/WhmManufacturer.h b/examples/energy-management-app/energy-management-common/water-heater/include/WhmManufacturer.h similarity index 94% rename from examples/all-clusters-app/all-clusters-common/include/WhmManufacturer.h rename to examples/energy-management-app/energy-management-common/water-heater/include/WhmManufacturer.h index b56aa24abf491f..3a48b467ee22c5 100644 --- a/examples/all-clusters-app/all-clusters-common/include/WhmManufacturer.h +++ b/examples/energy-management-app/energy-management-common/water-heater/include/WhmManufacturer.h @@ -18,6 +18,7 @@ #pragma once +#include #include #include @@ -32,7 +33,7 @@ namespace WaterHeaterManagement { * Helps with handling the test triggers. */ -class WhmManufacturer +class WhmManufacturer : public DeviceEnergyManagement::DEMManufacturerDelegate { public: WhmManufacturer(WaterHeaterManagementInstance * whmInstance) { mWhmInstance = whmInstance; } @@ -139,6 +140,13 @@ class WhmManufacturer */ void BoostCommandFinished(); + /* Implement the DEMManufacturerDelegate interface */ + + /** + * @brief The PowerAdjustEnd event needs to report the approximate energy used by the ESA during the session. + */ + int64_t GetApproxEnergyDuringSession() override; + private: WaterHeaterManagementInstance * mWhmInstance; }; diff --git a/examples/all-clusters-app/all-clusters-common/include/water-heater-mode.h b/examples/energy-management-app/energy-management-common/water-heater/include/water-heater-mode.h similarity index 100% rename from examples/all-clusters-app/all-clusters-common/include/water-heater-mode.h rename to examples/energy-management-app/energy-management-common/water-heater/include/water-heater-mode.h diff --git a/examples/energy-management-app/energy-management-common/water-heater/src/WaterHeaterMain.cpp b/examples/energy-management-app/energy-management-common/water-heater/src/WaterHeaterMain.cpp new file mode 100644 index 00000000000000..0dcfb81f59a8f0 --- /dev/null +++ b/examples/energy-management-app/energy-management-common/water-heater/src/WaterHeaterMain.cpp @@ -0,0 +1,100 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "EnergyManagementAppCmdLineOptions.h" + +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include + +namespace chip { +namespace app { +namespace Clusters { +namespace WaterHeaterManagement { + +void FullWhmApplicationInit() +{ + ReturnOnFailure(WhmApplicationInit()); + + if (DeviceEnergyManagementInit() != CHIP_NO_ERROR) + { + WhmApplicationShutdown(); + return; + } + + if (EnergyMeterInit() != CHIP_NO_ERROR) + { + DeviceEnergyManagementShutdown(); + WhmApplicationShutdown(); + return; + } + + if (PowerTopologyInit() != CHIP_NO_ERROR) + { + EnergyMeterShutdown(); + DeviceEnergyManagementShutdown(); + WhmApplicationShutdown(); + return; + } + + /* For Device Energy Management we need the ESA to be Online and ready to accept commands */ + + GetDEMDelegate()->SetESAState(ESAStateEnum::kOnline); + GetDEMDelegate()->SetDEMManufacturerDelegate(*GetWhmManufacturer()); + + // Set the abs min and max power + GetDEMDelegate()->SetAbsMinPower(1200000); // 1.2KW + GetDEMDelegate()->SetAbsMaxPower(7600000); // 7.6KW +} + +void FullWhmApplicationShutdown() +{ + ChipLogDetail(AppServer, "Energy Management App (WaterHeater): ApplicationShutdown()"); + + /* Shutdown in reverse order that they were created */ + PowerTopologyShutdown(); /* Free the PowerTopology */ + EnergyMeterShutdown(); /* Free the Energy Meter */ + DeviceEnergyManagementShutdown(); /* Free the DEM */ + WhmApplicationShutdown(); + + Clusters::DeviceEnergyManagementMode::Shutdown(); + Clusters::WaterHeaterMode::Shutdown(); +} + +} // namespace WaterHeaterManagement +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp b/examples/energy-management-app/energy-management-common/water-heater/src/WhmDelegateImpl.cpp similarity index 77% rename from examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp rename to examples/energy-management-app/energy-management-common/water-heater/src/WhmDelegateImpl.cpp index af09a13a0dab2d..79a64d5226f486 100644 --- a/examples/all-clusters-app/all-clusters-common/src/WhmDelegateImpl.cpp +++ b/examples/energy-management-app/energy-management-common/water-heater/src/WhmDelegateImpl.cpp @@ -21,6 +21,8 @@ #include #include +#include + using namespace chip; using namespace chip::app; using namespace chip::app::Clusters; @@ -29,7 +31,7 @@ using namespace chip::app::Clusters::WaterHeaterManagement; using Protocols::InteractionModel::Status; WaterHeaterManagementDelegate::WaterHeaterManagementDelegate(EndpointId clustersEndpoint) : - mpWhmInstance(nullptr), mpWhmManufacturer(nullptr), mWaterTemperature(0), mReplacedWaterTemperature(0), + mpWhmInstance(nullptr), mpWhmManufacturer(nullptr), mTargetWaterTemperature(0), mWaterTemperature(0), mColdWaterTemperature(0), mBoostTargetTemperatureReached(false), mTankVolume(0), mEstimatedHeatRequired(0), mTankPercentage(0), mBoostState(BoostStateEnum::kInactive) {} @@ -65,7 +67,7 @@ uint16_t WaterHeaterManagementDelegate::GetTankVolume() return mTankVolume; } -int64_t WaterHeaterManagementDelegate::GetEstimatedHeatRequired() +Energy_mWh WaterHeaterManagementDelegate::GetEstimatedHeatRequired() { return mEstimatedHeatRequired; } @@ -110,7 +112,7 @@ void WaterHeaterManagementDelegate::SetTankVolume(uint16_t tankVolume) } } -void WaterHeaterManagementDelegate::SetEstimatedHeatRequired(int64_t estimatedHeatRequired) +void WaterHeaterManagementDelegate::SetEstimatedHeatRequired(Energy_mWh estimatedHeatRequired) { if (mEstimatedHeatRequired != estimatedHeatRequired) { @@ -128,8 +130,6 @@ void WaterHeaterManagementDelegate::SetTankPercentage(Percent tankPercentage) { mTankPercentage = tankPercentage; - CheckIfHeatNeedsToBeTurnedOnOrOff(); - MatterReportingAttributeChangeCallback(mEndpointId, WaterHeaterManagement::Id, Attributes::TankPercentage::Id); } } @@ -201,13 +201,22 @@ Status WaterHeaterManagementDelegate::HandleBoost(uint32_t durationS, OptionalBoostCommandCancelled(); VerifyOrReturnValue(status == Status::Success, status); - status = CheckIfHeatNeedsToBeTurnedOnOrOff(); + // Note ChangeHeatingIfNecessary can generate a BoostEnded event but only if the boost state is kActive + // which it cannot be when called from here. + status = ChangeHeatingIfNecessary(); VerifyOrReturnValue(status == Status::Success, status); + + CHIP_ERROR err = GenerateBoostEndedEvent(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(AppServer, "HandleCancelBoost: Failed to generate BoostEnded event: %" CHIP_ERROR_FORMAT, err.Format()); + + return Status::Failure; + } } return Status::Success; @@ -273,61 +300,83 @@ Status WaterHeaterManagementDelegate::HandleCancelBoost() * *********************************************************************************/ -void WaterHeaterManagementDelegate::SetWaterTemperature(uint16_t waterTemperature) +int16_t WaterHeaterManagementDelegate::GetActiveTargetWaterTemperature() const +{ + // Determine the target temperature. If a boost command is in progress and has a mBoostTemporarySetpoint value use that as the + // target temperature. + // Note, in practise the actual heating is likely to be controlled by the thermostat's occupiedHeatingSetpoint most of the + // time, and the TemporarySetpoint (if not null) would be overiding the thermostat's occupiedHeatingSetpoint. + // However, this code doesn't rely upon the thermostat cluster. + int16_t targetTemperature = (mBoostState == BoostStateEnum::kActive && mBoostTemporarySetpoint.HasValue()) + ? mBoostTemporarySetpoint.Value() + : mTargetWaterTemperature; + + return targetTemperature; +} + +uint8_t WaterHeaterManagementDelegate::CalculateTankPercentage() const +{ + int32_t tankPercentage; + int32_t divisor = static_cast(GetActiveTargetWaterTemperature()) - static_cast(mColdWaterTemperature); + + tankPercentage = 100; + if (divisor > 0) + { + tankPercentage = 100 * (static_cast(mWaterTemperature) - static_cast(mColdWaterTemperature)) / divisor; + } + + tankPercentage = std::min(tankPercentage, static_cast(100)); + tankPercentage = std::max(tankPercentage, static_cast(0)); + + return static_cast(tankPercentage); +} + +void WaterHeaterManagementDelegate::SetColdWaterTemperature(int16_t coldWaterTemperature) +{ + mColdWaterTemperature = coldWaterTemperature; +} + +void WaterHeaterManagementDelegate::SetWaterTemperature(int16_t waterTemperature) { mWaterTemperature = waterTemperature; if (mpWhmInstance != nullptr && mpWhmInstance->HasFeature(Feature::kTankPercent)) { - mTankPercentage = 100; + // Recalculate the tankPercentage as the waterTemperature has changed + SetTankPercentage(CalculateTankPercentage()); } // See if the heat needs to be turned on or off - CheckIfHeatNeedsToBeTurnedOnOrOff(); + ChangeHeatingIfNecessary(); } -void WaterHeaterManagementDelegate::SetTargetWaterTemperature(uint16_t targetWaterTemperature) +void WaterHeaterManagementDelegate::SetTargetWaterTemperature(int16_t targetWaterTemperature) { mTargetWaterTemperature = targetWaterTemperature; // See if the heat needs to be turned on or off - CheckIfHeatNeedsToBeTurnedOnOrOff(); + ChangeHeatingIfNecessary(); } -void WaterHeaterManagementDelegate::DrawOffHotWater(Percent percentageReplaced, uint16_t replacedWaterTemperature) +void WaterHeaterManagementDelegate::DrawOffHotWater(Percent percentageReplaced, int16_t replacedWaterTemperature) { - // Only supported in the kTankPercent is supported. + // First calculate the new average water temperature + mWaterTemperature = static_cast( + (mWaterTemperature * (100 - percentageReplaced) + replacedWaterTemperature * percentageReplaced) / 100); + // Replaces percentageReplaced% of the water in the tank with water of a temperature replacedWaterTemperature + // Only supported if the kTankPercent feature is supported. if (mpWhmInstance != nullptr && mpWhmInstance->HasFeature(Feature::kTankPercent)) { - // See if all of the water has now been replaced with replacedWaterTemperature - if (mTankPercentage >= percentageReplaced) - { - mTankPercentage = static_cast(mTankPercentage - percentageReplaced); - } - else - { - mTankPercentage = 0; - } - - mReplacedWaterTemperature = replacedWaterTemperature; + SetTankPercentage(CalculateTankPercentage()); - CheckIfHeatNeedsToBeTurnedOnOrOff(); + ChangeHeatingIfNecessary(); } } bool WaterHeaterManagementDelegate::HasWaterTemperatureReachedTarget() const { - // Determine the target temperature. If a boost command is in progress and has a mBoostTemporarySetpoint value use that as the - // target temperature. - // Note, in practise the actual heating is likely to be controlled by the thermostat's occupiedHeatingSetpoint most of the - // time, and the TemporarySetpoint (if not null) would be overiding the thermostat's occupiedHeatingSetpoint. - // However, this code doesn't rely upon the thermostat cluster. - uint16_t targetTemperature = (mBoostState == BoostStateEnum::kActive && mBoostTemporarySetpoint.HasValue()) - ? static_cast(mBoostTemporarySetpoint.Value()) - : mTargetWaterTemperature; - - VerifyOrReturnValue(mWaterTemperature >= targetTemperature, false); + int16_t targetTemperature = GetActiveTargetWaterTemperature(); if (mBoostState == BoostStateEnum::kActive) { @@ -351,13 +400,22 @@ bool WaterHeaterManagementDelegate::HasWaterTemperatureReachedTarget() const // If tank percentage is supported AND the targetPercentage.HasValue() then use target percentage to heat up. VerifyOrReturnValue(mTankPercentage >= mBoostTargetPercentage.Value(), false); } + else + { + VerifyOrReturnValue(mWaterTemperature >= targetTemperature, false); + } + } + else + { + // Just relying on mWaterTemperature to determine whether the temperature is at the target temperature + VerifyOrReturnValue(mWaterTemperature >= targetTemperature, false); } // Must have reached the right temperature return true; } -Status WaterHeaterManagementDelegate::CheckIfHeatNeedsToBeTurnedOnOrOff() +Status WaterHeaterManagementDelegate::ChangeHeatingIfNecessary() { VerifyOrReturnError(mpWhmManufacturer != nullptr, Status::InvalidInState); @@ -384,6 +442,13 @@ Status WaterHeaterManagementDelegate::CheckIfHeatNeedsToBeTurnedOnOrOff() mBoostEmergencyBoost.ClearValue(); status = mpWhmManufacturer->BoostCommandCancelled(); + + CHIP_ERROR err = GenerateBoostEndedEvent(); + if (err != CHIP_NO_ERROR) + { + ChipLogError(AppServer, "ChangeHeatingIfNecessary: Failed to generate BoostEnded event: %" CHIP_ERROR_FORMAT, + err.Format()); + } } // Turn the heating off @@ -457,5 +522,5 @@ Status WaterHeaterManagementDelegate::SetWaterHeaterMode(uint8_t modeValue) return status; } - return CheckIfHeatNeedsToBeTurnedOnOrOff(); + return ChangeHeatingIfNecessary(); } diff --git a/examples/all-clusters-app/all-clusters-common/src/WhmInstance.cpp b/examples/energy-management-app/energy-management-common/water-heater/src/WhmInstance.cpp similarity index 100% rename from examples/all-clusters-app/all-clusters-common/src/WhmInstance.cpp rename to examples/energy-management-app/energy-management-common/water-heater/src/WhmInstance.cpp diff --git a/examples/all-clusters-app/all-clusters-common/src/WhmMain.cpp b/examples/energy-management-app/energy-management-common/water-heater/src/WhmMain.cpp similarity index 95% rename from examples/all-clusters-app/all-clusters-common/src/WhmMain.cpp rename to examples/energy-management-app/energy-management-common/water-heater/src/WhmMain.cpp index ea59fef2d095f5..038e332bd31aff 100644 --- a/examples/all-clusters-app/all-clusters-common/src/WhmMain.cpp +++ b/examples/energy-management-app/energy-management-common/water-heater/src/WhmMain.cpp @@ -167,25 +167,22 @@ CHIP_ERROR WhmManufacturerShutdown() return CHIP_NO_ERROR; } -void WhmApplicationInit() +CHIP_ERROR WhmApplicationInit() { - if (WhmInit() != CHIP_NO_ERROR) - { - return; - } + ReturnErrorOnFailure(WhmInit()); /* Do this last so that the instances for other clusters can be wrapped inside */ - if (WhmManufacturerInit() != CHIP_NO_ERROR) - { - WhmShutdown(); - return; - } + ReturnErrorOnFailure(WhmManufacturerInit()); + + return CHIP_NO_ERROR; } -void WhmApplicationShutdown() +CHIP_ERROR WhmApplicationShutdown() { /* Shutdown in reverse order that they were created */ WhmManufacturerShutdown(); + + return WhmShutdown(); } } // namespace WaterHeaterManagement diff --git a/examples/all-clusters-app/all-clusters-common/src/WhmManufacturer.cpp b/examples/energy-management-app/energy-management-common/water-heater/src/WhmManufacturer.cpp similarity index 85% rename from examples/all-clusters-app/all-clusters-common/src/WhmManufacturer.cpp rename to examples/energy-management-app/energy-management-common/water-heater/src/WhmManufacturer.cpp index 8865501fcca6fe..446d684e41be64 100644 --- a/examples/all-clusters-app/all-clusters-common/src/WhmManufacturer.cpp +++ b/examples/energy-management-app/energy-management-common/water-heater/src/WhmManufacturer.cpp @@ -44,8 +44,7 @@ CHIP_ERROR WhmManufacturer::Init() } dg->SetHeaterTypes(BitMask(WaterHeaterHeatSourceBitmap::kImmersionElement1)); - dg->SetHeatDemand(BitMask(WaterHeaterHeatSourceBitmap::kImmersionElement1)); - dg->SetEstimatedHeatRequired(10000); + dg->SetColdWaterTemperature(2000); return CHIP_NO_ERROR; } @@ -65,38 +64,30 @@ BitMask WhmManufacturer::DetermineHeatingSources() } // A list of valid heaterTypes - uint8_t waterHeaterTypeValues[] = { - static_cast(WaterHeaterHeatSourceBitmap::kImmersionElement1), - static_cast(WaterHeaterHeatSourceBitmap::kImmersionElement2), - static_cast(WaterHeaterHeatSourceBitmap::kHeatPump), - static_cast(WaterHeaterHeatSourceBitmap::kBoiler), - static_cast(WaterHeaterHeatSourceBitmap::kOther), - }; - - // The corresponding list of valid headerDemands - uint8_t waterHeaterDemandValues[] = { - static_cast(WaterHeaterHeatSourceBitmap::kImmersionElement1), - static_cast(WaterHeaterHeatSourceBitmap::kImmersionElement2), - static_cast(WaterHeaterHeatSourceBitmap::kHeatPump), - static_cast(WaterHeaterHeatSourceBitmap::kBoiler), - static_cast(WaterHeaterHeatSourceBitmap::kOther), + BitMask waterHeaterTypeValues[] = { + BitMask(WaterHeaterHeatSourceBitmap::kImmersionElement1), + BitMask(WaterHeaterHeatSourceBitmap::kImmersionElement2), + BitMask(WaterHeaterHeatSourceBitmap::kHeatPump), + BitMask(WaterHeaterHeatSourceBitmap::kBoiler), + BitMask(WaterHeaterHeatSourceBitmap::kOther), }; // Iterate across the valid waterHeaterTypes seeing which heating sources are available based on heaterTypes. // Set the corresponding bit in the heaterDemand bitmap. - BitMask heaterTypes = dg->GetHeaterTypes(); + BitMask waterHeaterTypes = dg->GetHeaterTypes(); - uint8_t heaterDemandMask = 0; - for (uint16_t idx = 0; idx < static_cast(sizeof(waterHeaterTypeValues) / sizeof(waterHeaterTypeValues[0])); idx++) + BitMask waterHeaterDemand; + + for (auto & waterHeaterType : waterHeaterTypeValues) { // Is this heating source being used? - if (heaterTypes.Raw() & waterHeaterTypeValues[idx]) + if (waterHeaterTypes.Has(waterHeaterType)) { - heaterDemandMask |= waterHeaterDemandValues[idx]; + waterHeaterDemand.Set(waterHeaterType); } } - return BitMask(heaterDemandMask); + return waterHeaterDemand; } Status WhmManufacturer::TurnHeatingOn(bool emergencyBoost) @@ -160,6 +151,12 @@ WaterHeaterManagementDelegate * GetWhmDelegate() return wg; } +// The PowerAdjustEnd event needs to report the approximate energy used by the ESA during the session. +int64_t WhmManufacturer::GetApproxEnergyDuringSession() +{ + return 300; +} + void SetTestEventTrigger_BasicInstallationTestEvent() { WaterHeaterManagementDelegate * dg = GetWhmDelegate(); @@ -167,7 +164,11 @@ void SetTestEventTrigger_BasicInstallationTestEvent() // Simulate installation in a 100L tank full of water at 20C, with a target temperature of 60C, in OFF mode dg->SetTankVolume(100); dg->SetTargetWaterTemperature(6000); - dg->SetHeaterTypes(BitMask(WaterHeaterHeatSourceBitmap::kImmersionElement1)); + + // kImmersionElement2 will be used in addition to kImmersionElement1 when emergencyBoost is specified + // in the BoostStarted command. + dg->SetHeaterTypes(BitMask(WaterHeaterHeatSourceBitmap::kImmersionElement1, + WaterHeaterHeatSourceBitmap::kImmersionElement2)); dg->DrawOffHotWater(100, 2000); } diff --git a/examples/all-clusters-app/all-clusters-common/src/water-heater-mode.cpp b/examples/energy-management-app/energy-management-common/water-heater/src/water-heater-mode.cpp similarity index 100% rename from examples/all-clusters-app/all-clusters-common/src/water-heater-mode.cpp rename to examples/energy-management-app/energy-management-common/water-heater/src/water-heater-mode.cpp diff --git a/examples/energy-management-app/esp32/README.md b/examples/energy-management-app/esp32/README.md index c2fb2bc7a1f63c..733ac5a632d48a 100644 --- a/examples/energy-management-app/esp32/README.md +++ b/examples/energy-management-app/esp32/README.md @@ -1,7 +1,8 @@ # Matter ESP32 Energy Management Example -This example demonstrates the Matter Electric Vehicle Supply Equipment -application on ESP platforms. +This example demonstrates the Matter Electric Vehicle Supply Equipment and Water +Heater example application along with several other energy management clusters +on ESP platforms. Please [setup ESP-IDF and CHIP Environment](../../../docs/guides/esp32/setup_idf_chip.md) @@ -11,14 +12,14 @@ guides to get started. ### Enabling ESP-Insights: -- Before building the app, enable the option: ESP_INSIGHTS_ENABLED through +- Before building the app, enable the option: `ESP_INSIGHTS_ENABLED` through menuconfig. -- Create a file named insights_auth_key.txt in the main directory of the +- Create a file named `insights_auth_key.txt` in the main directory of the example. -- Follow the steps - present[here](https://github.com/espressif/esp-insights/blob/main/examples/README.md#set-up-esp-insights-account) +- Follow the steps present + [here](https://github.com/espressif/esp-insights/blob/main/examples/README.md#set-up-esp-insights-account) to set up an insights_account and the auth key created while setting it up will be used in the example. @@ -35,6 +36,41 @@ cp /path/to/auth/key.txt path/to/connectedhomeip/examples/energy-management-app/ --- +### Build time configuration + +- Application mode: By default the example app will run the EVSE example, + however this can be changed using the `idf.py menuconfig` command and + searching for: + + ENABLE_EXAMPLE_WATER_HEATER_DEVICE + ENABLE_EXAMPLE_EVSE_DEVICE + +- Test Event Trigger support: By default the EVSE, Water Heater, Device Energy + Management (DEM), Energy Reporting test event triggers are enabled in the + build. To turn these off run `idf.py menuconfig` and search for the + following config entries: + + ENABLE_DEVICE_ENERGY_MANAGEMENT_TRIGGER + ENABLE_ENERGY_EVSE_TRIGGER + ENABLE_WATER_HEATER_MANAGEMENT_TRIGGER + ENABLE_ENERGY_REPORTING_TRIGGER + +- Device Energy Management feature support: Depending on the capabilities of + the device it may support Power Forecast Reporting `PFR` or State Forecast + Reporting `SFR`. However it is not allowed to support both of these at once. + + By default `PFR` is enabled in the build. To change this run + `idf.py menuconfig` and search for the following config entries: + + DEM_SUPPORT_STATE_FORECAST_REPORTING + DEM_SUPPORT_POWER_FORECAST_REPORTING + + Note only one of these can be enabled to meet Matter specification + conformance. + + When running in test events, some test cases (e.g. TC_DEM_2.7 and + TC_DEM_2.8) depend on the correct setting to be used in the binary DUT. + ### Cluster Control - After successful commissioning, use the Energy Electric Vehicle Supply @@ -47,3 +83,6 @@ cp /path/to/auth/key.txt path/to/connectedhomeip/examples/energy-management-app/ ``` $ ./out/debug/chip-tool energyevse enable-charging 0xFFFFFFFF 6000 32000 1 --timedInteractionTimeoutMs
''' diff --git a/scripts/setup/nxp/update_nxp_sdk.py b/scripts/setup/nxp/update_nxp_sdk.py deleted file mode 100755 index da948306f887d7..00000000000000 --- a/scripts/setup/nxp/update_nxp_sdk.py +++ /dev/null @@ -1,120 +0,0 @@ -#!/usr/bin/env python3 -# -# Copyright (c) 2024 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import argparse -import logging -import os -import shutil -import subprocess -import sys -from dataclasses import dataclass - -CHIP_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '../../..')) - - -@dataclass(init=False) -class NxpSdk: - sdk_name: str - sdk_target_location: str - sdk_manifest_path: str - - def __init__(self, name, sdk_target_location): - self.sdk_name = name - self.sdk_target_location = sdk_target_location - self.sdk_manifest_path = os.path.abspath(os.path.join(sdk_target_location, 'manifest')) - - -def NxpSdk_k32w0(): - rel_path_k32w0 = 'third_party/nxp/nxp_matter_support/github_sdk/k32w0' - sdk = NxpSdk('k32w0', os.path.abspath(os.path.join(CHIP_ROOT, rel_path_k32w0))) - return sdk - - -ALL_PLATFORM_SDK = [ - NxpSdk_k32w0(), -] - -ALL_PLATFORM_NAME = [p.sdk_name for p in ALL_PLATFORM_SDK] - - -def clean_sdk_local_changes(sdk_location): - logging.warning("SDK will be cleaned all local modification(s) will be lost") - # Cleaning all local modifications - git_clean_command = "git reset --hard && git clean -xdf" - command = ['west', 'forall', '-c', git_clean_command, '-a'] - subprocess.run(command, cwd=sdk_location, check=True) - - -def init_nxp_sdk_version(nxp_sdk, force): - print("Init SDK in: " + nxp_sdk.sdk_target_location) - west_path = os.path.join(nxp_sdk.sdk_target_location, '.west') - if os.path.exists(west_path): - if not force: - logging.error("SDK is already initialized, use --force to force init") - sys.exit(1) - shutil.rmtree(west_path) - - command = ['west', 'init', '-l', nxp_sdk.sdk_manifest_path, '--mf', 'west.yml'] - subprocess.run(command, check=True) - update_nxp_sdk_version(nxp_sdk, force) - - -def update_nxp_sdk_version(nxp_sdk, force): - print("Update SDK in " + nxp_sdk.sdk_target_location) - if not os.path.exists(os.path.join(nxp_sdk.sdk_target_location, '.west')): - logging.error("--update-only error SDK is not initialized") - sys.exit(1) - command = ['west', 'update', '--fetch', 'smart'] - try: - subprocess.run(command, cwd=nxp_sdk.sdk_target_location, check=True) - except (RuntimeError, subprocess.CalledProcessError) as exception: - if force: - if nxp_sdk.sdk_name == 'k32w0': - logging.error('Force update not yet supported for %s platform', nxp_sdk.sdk_name) - else: - # In case of force update option and in case of update failure: - # 1. try to clean all local modications if any - # 2. Retry the west update command. It should be successfull now as all local modifications have been cleaned - clean_sdk_local_changes(nxp_sdk.sdk_target_location) - subprocess.run(command, cwd=nxp_sdk.sdk_target_location, check=True) - else: - logging.exception( - 'Error SDK cannot be updated, local changes should be cleaned manually or use --force to force update %s', exception) - - -def main(): - - parser = argparse.ArgumentParser(description='Checkout or update relevant NXP SDK') - parser.add_argument( - "--update-only", help="Update NXP SDK to the correct version. Would fail if the SDK does not exist", action="store_true") - parser.add_argument('--platform', nargs='+', choices=ALL_PLATFORM_NAME, default=ALL_PLATFORM_NAME, - help='Allows to select which SDK for a particular NXP platform to initialize') - parser.add_argument('--force', action='store_true', - help='Force SDK initialization, hard clean will be done in case of failure - WARNING -- All local SDK modification(s) will be lost') - - args = parser.parse_args() - - for current_plat in args.platform: - nxp_sdk = [p for p in ALL_PLATFORM_SDK if p.sdk_name == current_plat][0] - if args.update_only: - update_nxp_sdk_version(nxp_sdk, args.force) - else: - init_nxp_sdk_version(nxp_sdk, args.force) - - -if __name__ == '__main__': - main() diff --git a/scripts/spec_xml/generate_spec_xml.py b/scripts/spec_xml/generate_spec_xml.py index 7f9ea4ccd24120..0d41b3f5194b5a 100755 --- a/scripts/spec_xml/generate_spec_xml.py +++ b/scripts/spec_xml/generate_spec_xml.py @@ -29,21 +29,34 @@ os.path.join(os.path.dirname(__file__), '..', '..')) DEFAULT_OUTPUT_DIR_1_3 = os.path.abspath( os.path.join(DEFAULT_CHIP_ROOT, 'data_model', '1.3')) +DEFAULT_OUTPUT_DIR_IN_PROGRESS = os.path.abspath( + os.path.join(DEFAULT_CHIP_ROOT, 'data_model', 'in_progress')) DEFAULT_OUTPUT_DIR_TOT = os.path.abspath( os.path.join(DEFAULT_CHIP_ROOT, 'data_model', 'master')) DEFAULT_DOCUMENTATION_FILE = os.path.abspath( os.path.join(DEFAULT_CHIP_ROOT, 'docs', 'spec_clusters.md')) +# questions +# is energy-calendar still in? +# is heat-pump out? wasn't in 0.7 +# location-cluster - is this define gone now? +# queuedpreset - is this define gone now? +CURRENT_IN_PROGRESS_DEFINES = ['aliro', 'atomicwrites', 'battery-storage', 'device-location', 'e2e-jf', 'energy-calendar', 'energy-drlc', + 'energy-management', 'heat-pump', 'hrap-1', 'hvac', 'matter-fabric-synchronization', 'metering', 'secondary-net', + 'service-area-cluster', 'solar-power', 'tcp', 'water-heater', 'wifiSetup'] + def get_xml_path(filename, output_dir): xml = os.path.basename(filename).replace('.adoc', '.xml') return os.path.abspath(os.path.join(output_dir, xml)) -def make_asciidoc(target: str, include_in_progress: bool, spec_dir: str, dry_run: bool) -> str: +def make_asciidoc(target: str, include_in_progress: str, spec_dir: str, dry_run: bool) -> str: cmd = ['make', 'PRINT_FILENAMES=1'] - if include_in_progress: + if include_in_progress == 'All': cmd.append('INCLUDE_IN_PROGRESS=1') + elif include_in_progress == 'Current': + cmd.append(f'INCLUDE_IN_PROGRESS={" ".join(CURRENT_IN_PROGRESS_DEFINES)}') cmd.append(target) if dry_run: print(cmd) @@ -75,13 +88,12 @@ def make_asciidoc(target: str, include_in_progress: bool, spec_dir: str, dry_run help='Flag for dry run') @click.option( '--include-in-progress', - default=True, - type=bool, - help='Include in-progress items from spec') + type=click.Choice(['All', 'None', 'Current']), default='All') def main(scraper, spec_root, output_dir, dry_run, include_in_progress): # Clusters need to be scraped first because the cluster directory is passed to the device type directory if not output_dir: - output_dir = DEFAULT_OUTPUT_DIR_TOT if include_in_progress else DEFAULT_OUTPUT_DIR_1_3 + output_dir_map = {'All': DEFAULT_OUTPUT_DIR_TOT, 'None': DEFAULT_OUTPUT_DIR_1_3, 'Current': DEFAULT_OUTPUT_DIR_IN_PROGRESS} + output_dir = output_dir_map[include_in_progress] scrape_clusters(scraper, spec_root, output_dir, dry_run, include_in_progress) scrape_device_types(scraper, spec_root, output_dir, dry_run, include_in_progress) if not dry_run: @@ -115,8 +127,11 @@ def scrape_cluster(filename: str) -> None: xml_path = get_xml_path(filename, clusters_output_dir) cmd = [scraper, 'cluster', '-i', filename, '-o', xml_path, '-nd'] - if include_in_progress: + if include_in_progress == 'All': cmd.extend(['--define', 'in-progress']) + elif include_in_progress == 'Current': + cmd.extend(['--define']) + cmd.extend(CURRENT_IN_PROGRESS_DEFINES) if dry_run: print(cmd) else: diff --git a/scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py b/scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py index 32f0b9bf61a2cf..567bf146c7b772 100755 --- a/scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py +++ b/scripts/tests/TestTimeSyncTrustedTimeSourceRunner.py @@ -14,6 +14,7 @@ # See the License for the specific language governing permissions and # limitations under the License. +import argparse import logging import os import signal @@ -21,30 +22,32 @@ import sys import time -DEFAULT_CHIP_ROOT = os.path.abspath( - os.path.join(os.path.dirname(__file__), '..', '..')) +DEFAULT_CHIP_ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), '..', '..')) + +DEFAULT_ALL_CLUSTERS = os.path.join( + DEFAULT_CHIP_ROOT, + 'out', + 'linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test', + 'chip-all-clusters-app') +DEFAULT_TEST_RUNNER = os.path.join(DEFAULT_CHIP_ROOT, 'scripts', 'tests', 'run_python_test.py') +DEFAULT_TEST_SCRIPT = os.path.join(DEFAULT_CHIP_ROOT, 'src', 'python_testing', 'TestTimeSyncTrustedTimeSource.py') class TestDriver: - def __init__(self): - self.app_path = os.path.abspath(os.path.join(DEFAULT_CHIP_ROOT, 'out', - 'linux-x64-all-clusters-ipv6only-no-ble-no-wifi-tsan-clang-test', 'chip-all-clusters-app')) - self.run_python_test_path = os.path.abspath(os.path.join(os.path.dirname(__file__), 'run_python_test.py')) + def __init__(self, all_clusters: str, test_runner: str, test_script: str): + self.app_path = all_clusters + self.run_python_test_path = test_runner + self.script_path = test_script - self.script_path = os.path.abspath(os.path.join( - DEFAULT_CHIP_ROOT, 'src', 'python_testing', 'TestTimeSyncTrustedTimeSource.py')) if not os.path.exists(self.app_path): - msg = 'chip-all-clusters-app not found' - logging.error(msg) - raise FileNotFoundError(msg) + logging.error('%s not found', self.app_path) + raise FileNotFoundError(self.app_path) if not os.path.exists(self.run_python_test_path): - msg = 'run_python_test.py script not found' - logging.error(msg) - raise FileNotFoundError(msg) + logging.error('%s not found', self.run_python_test_path) + raise FileNotFoundError(self.run_python_test_path) if not os.path.exists(self.script_path): - msg = 'TestTimeSyncTrustedTimeSource.py script not found' - logging.error(msg) - raise FileNotFoundError(msg) + logging.error('%s not found', self.script_path) + raise FileNotFoundError(self.script_path) def get_base_run_python_cmd(self, run_python_test_path, app_path, app_args, script_path, script_args): return f'{str(run_python_test_path)} --app {str(app_path)} --app-args "{app_args}" --script {str(script_path)} --script-args "{script_args}"' @@ -78,7 +81,17 @@ def main(): base_script_args = '--storage-path admin_storage.json --discriminator 1234 --passcode 20202021' script_args = base_script_args + ' --commissioning-method on-network --commission-only' - driver = TestDriver() + parser = argparse.ArgumentParser('TimeSyncTrustedTimeSource runner', formatter_class=argparse.ArgumentDefaultsHelpFormatter) + parser.add_argument('--all-clusters', default=DEFAULT_ALL_CLUSTERS, help="All clusters application.") + parser.add_argument('--test-runner', default=DEFAULT_TEST_RUNNER, help="the run_python_test.py script.") + parser.add_argument('--test-script', default=DEFAULT_TEST_SCRIPT, help="The path to the TimeSyncTrustedTimeSource test.") + args = parser.parse_args() + + driver = TestDriver( + all_clusters=args.all_clusters, + test_runner=args.test_runner, + test_script=args.test_script, + ) ret = driver.run_test_section(app_args, script_args, factory_reset_all=True) if ret != 0: return ret diff --git a/scripts/tests/chiptest/__init__.py b/scripts/tests/chiptest/__init__.py index 03ac663427ce84..2826e506382556 100644 --- a/scripts/tests/chiptest/__init__.py +++ b/scripts/tests/chiptest/__init__.py @@ -220,6 +220,7 @@ def _GetDarwinFrameworkToolUnsupportedTests() -> Set[str]: "Test_TC_SC_4_1", # darwin-framework-tool does not support dns-sd commands. "Test_TC_SC_5_2", # darwin-framework-tool does not support group commands. "Test_TC_S_2_3", # darwin-framework-tool does not support group commands. + "Test_TC_THNETDIR_2_2", # darwin-framework-tool does not support negative timed-invoke tests } diff --git a/scripts/tests/run_python_test.py b/scripts/tests/run_python_test.py index 61ec274bfc1c64..eb8f0633c0a91a 100755 --- a/scripts/tests/run_python_test.py +++ b/scripts/tests/run_python_test.py @@ -87,11 +87,14 @@ def DumpProgramOutputToQueue(thread_list: typing.List[threading.Thread], tag: st 'mobile-device-test.py'), help='Test script to use.') @click.option("--script-args", type=str, default='', help='Script arguments, can use placeholders like {SCRIPT_BASE_NAME}.') +@click.option("--script-start-delay", type=int, default=0, + help='Delay in seconds before starting the script.') @click.option("--script-gdb", is_flag=True, help='Run script through gdb') @click.option("--quiet", is_flag=True, help="Do not print output from passing tests. Use this flag in CI to keep github log sizes manageable.") @click.option("--load-from-env", default=None, help="YAML file that contains values for environment variables.") -def main(app: str, factoryreset: bool, factoryreset_app_only: bool, app_args: str, script: str, script_args: str, script_gdb: bool, quiet: bool, load_from_env): +def main(app: str, factoryreset: bool, factoryreset_app_only: bool, app_args: str, + script: str, script_args: str, script_start_delay: int, script_gdb: bool, quiet: bool, load_from_env): if load_from_env: reader = MetadataReader(load_from_env) runs = reader.parse_script(script) @@ -103,6 +106,7 @@ def main(app: str, factoryreset: bool, factoryreset_app_only: bool, app_args: st app=app, app_args=app_args, script_args=script_args, + script_start_delay=script_start_delay, factoryreset=factoryreset, factoryreset_app_only=factoryreset_app_only, script_gdb=script_gdb, @@ -117,10 +121,11 @@ def main(app: str, factoryreset: bool, factoryreset_app_only: bool, app_args: st for run in runs: print(f"Executing {run.py_script_path.split('/')[-1]} {run.run}") main_impl(run.app, run.factoryreset, run.factoryreset_app_only, run.app_args, - run.py_script_path, run.script_args, run.script_gdb, run.quiet) + run.py_script_path, run.script_args, run.script_start_delay, run.script_gdb, run.quiet) -def main_impl(app: str, factoryreset: bool, factoryreset_app_only: bool, app_args: str, script: str, script_args: str, script_gdb: bool, quiet: bool): +def main_impl(app: str, factoryreset: bool, factoryreset_app_only: bool, app_args: str, + script: str, script_args: str, script_start_delay: int, script_gdb: bool, quiet: bool): app_args = app_args.replace('{SCRIPT_BASE_NAME}', os.path.splitext(os.path.basename(script))[0]) script_args = script_args.replace('{SCRIPT_BASE_NAME}', os.path.splitext(os.path.basename(script))[0]) @@ -175,6 +180,8 @@ def main_impl(app: str, factoryreset: bool, factoryreset_app_only: bool, app_arg DumpProgramOutputToQueue( log_cooking_threads, Fore.GREEN + "APP " + Style.RESET_ALL, app_process, stream_output, log_queue) + time.sleep(script_start_delay) + script_command = [script, "--paa-trust-store-path", os.path.join(DEFAULT_CHIP_ROOT, MATTER_DEVELOPMENT_PAA_ROOT_CERTS), '--log-format', '%(message)s', "--app-pid", str(app_pid)] + shlex.split(script_args) diff --git a/scripts/tools/check_includes_config.py b/scripts/tools/check_includes_config.py index 2af375d7c4bdfd..2e79c6f8f9cfa9 100644 --- a/scripts/tools/check_includes_config.py +++ b/scripts/tools/check_includes_config.py @@ -180,9 +180,11 @@ 'src/lib/support/jsontlv/JsonToTlv.h': {'string'}, 'src/lib/support/jsontlv/TlvToJson.h': {'string'}, 'src/lib/support/jsontlv/TextFormat.h': {'string'}, + 'src/lib/support/TemporaryFileStream.h': {'ostream', 'streambuf', 'string'}, 'src/app/icd/client/DefaultICDClientStorage.cpp': {'vector'}, 'src/app/icd/client/DefaultICDClientStorage.h': {'vector'}, 'src/app/icd/client/DefaultICDStorageKey.h': {'vector'}, 'src/controller/CHIPDeviceController.cpp': {'string'}, 'src/qrcodetool/setup_payload_commands.cpp': {'string'}, + 'src/access/AccessRestrictionProvider.h': {'vector', 'map'}, } diff --git a/scripts/tools/nxp/factory_data_generator/generate.py b/scripts/tools/nxp/factory_data_generator/generate.py index b3ee98562b6c3a..945f8bde641749 100755 --- a/scripts/tools/nxp/factory_data_generator/generate.py +++ b/scripts/tools/nxp/factory_data_generator/generate.py @@ -106,7 +106,7 @@ def generate(self): return data - def to_bin(self, klv, out, aes128_key): + def to_bin(self, klv, out, aes_key): fullContent = bytearray() with open(out, "wb") as file: for entry in klv: @@ -115,7 +115,7 @@ def to_bin(self, klv, out, aes128_key): fullContent += entry[2] size = len(fullContent) - if (aes128_key is None): + if (aes_key is None): # Calculate 4 bytes of hashing hashing = hashlib.sha256(fullContent).hexdigest() hashing = hashing[0:8] @@ -146,7 +146,7 @@ def to_bin(self, klv, out, aes128_key): logging.info("Size of final generated binary is: {} bytes".format(size)) file.write(fullContent) else: - # In case a aes128_key is given the data will be encrypted + # In case a aes_key is given the data will be encrypted # Always add a padding to be 16 bytes aligned padding_len = size % 16 padding_len = 16 - padding_len @@ -156,7 +156,7 @@ def to_bin(self, klv, out, aes128_key): size = len(fullContent) logging.info("(After padding) Size of generated binary is: {} bytes".format(size)) from Crypto.Cipher import AES - cipher = AES.new(bytes.fromhex(aes128_key), AES.MODE_ECB) + cipher = AES.new(bytes.fromhex(aes_key), AES.MODE_ECB) fullContentCipher = cipher.encrypt(fullContent) # Add 4 bytes of hashing to generated binary to check for integrity @@ -229,6 +229,8 @@ def main(): help="[base64 str] Already generated spake2p verifier") optional.add_argument("--aes128_key", help="[hex] AES 128 bits key used to encrypt the whole dataset") + optional.add_argument("--aes256_key", + help="[hex] AES 256 bits key used to encrypt the whole dataset") optional.add_argument("--date", type=ManufacturingDate, help="[str] Manufacturing Date (YYYY-MM-DD)") optional.add_argument("--part_number", type=PartNumber, @@ -252,7 +254,12 @@ def main(): klv = KlvGenerator(args) data = klv.generate() - klv.to_bin(data, args.out, args.aes128_key) + aes_key = None + if args.aes256_key: + aes_key = args.aes256_key + elif args.aes128_key: + aes_key = args.aes128_key + klv.to_bin(data, args.out, aes_key) if __name__ == "__main__": diff --git a/scripts/tools/zap/tests/inputs/all-clusters-app.zap b/scripts/tools/zap/tests/inputs/all-clusters-app.zap index 1cbd309ffa123a..0ec92a5c61294d 100644 --- a/scripts/tools/zap/tests/inputs/all-clusters-app.zap +++ b/scripts/tools/zap/tests/inputs/all-clusters-app.zap @@ -9648,7 +9648,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -9804,7 +9804,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -17018,7 +17018,7 @@ "code": 5, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "DriftCompensationEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -17066,7 +17066,7 @@ "code": 8, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "ColorModeEnum", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -17082,7 +17082,7 @@ "code": 15, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "OptionsBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -17594,7 +17594,7 @@ "code": 16385, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "EnhancedColorModeEnum", "included": 1, "storageOption": "NVM", "singleton": 0, @@ -17690,7 +17690,7 @@ "code": 16394, "mfgCode": null, "side": "server", - "type": "bitmap16", + "type": "ColorCapabilitiesBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -17711,7 +17711,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0x0000", + "defaultValue": "0x009A", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -17727,7 +17727,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "0xFEFF", + "defaultValue": "0x01C6", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -17759,7 +17759,7 @@ "storageOption": "NVM", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": "0x00FA", "reportable": 1, "minInterval": 0, "maxInterval": 65344, @@ -18707,10 +18707,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -24720,10 +24720,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/scripts/tools/zap/tests/inputs/lighting-app.zap b/scripts/tools/zap/tests/inputs/lighting-app.zap index 9935fea81069d3..b0bb70a68fbe5d 100644 --- a/scripts/tools/zap/tests/inputs/lighting-app.zap +++ b/scripts/tools/zap/tests/inputs/lighting-app.zap @@ -5552,7 +5552,7 @@ "code": 8, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "ColorModeEnum", "included": 1, "storageOption": "NVM", "singleton": 0, @@ -5568,7 +5568,7 @@ "code": 15, "mfgCode": null, "side": "server", - "type": "bitmap8", + "type": "OptionsBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5616,7 +5616,7 @@ "code": 16385, "mfgCode": null, "side": "server", - "type": "enum8", + "type": "EnhancedColorModeEnum", "included": 1, "storageOption": "NVM", "singleton": 0, @@ -5712,7 +5712,7 @@ "code": 16394, "mfgCode": null, "side": "server", - "type": "bitmap16", + "type": "ColorCapabilitiesBitmap", "included": 1, "storageOption": "RAM", "singleton": 0, @@ -5884,10 +5884,10 @@ "side": "server", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h index 8f0c8ef6cb729a..9b35ecb22d178c 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/access.h @@ -511,7 +511,6 @@ #define GENERATED_ACCESS_READ_EVENT__CLUSTER { \ 0x0000001F, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \ 0x0000001F, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \ - 0x0000001F, /* Cluster: Access Control, Event: AccessRestrictionEntryChanged, Privilege: administer */ \ 0x0000001F, /* Cluster: Access Control, Event: FabricRestrictionReviewUpdate, Privilege: administer */ \ } @@ -519,15 +518,13 @@ #define GENERATED_ACCESS_READ_EVENT__EVENT { \ 0x00000000, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \ 0x00000001, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \ - 0x00000002, /* Cluster: Access Control, Event: AccessRestrictionEntryChanged, Privilege: administer */ \ - 0x00000003, /* Cluster: Access Control, Event: FabricRestrictionReviewUpdate, Privilege: administer */ \ + 0x00000002, /* Cluster: Access Control, Event: FabricRestrictionReviewUpdate, Privilege: administer */ \ } // Parallel array data (cluster, event, *privilege*) for read event #define GENERATED_ACCESS_READ_EVENT__PRIVILEGE { \ chip::Access::Privilege::kAdminister, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \ chip::Access::Privilege::kAdminister, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \ - chip::Access::Privilege::kAdminister, /* Cluster: Access Control, Event: AccessRestrictionEntryChanged, Privilege: administer */ \ chip::Access::Privilege::kAdminister, /* Cluster: Access Control, Event: FabricRestrictionReviewUpdate, Privilege: administer */ \ } diff --git a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h index 3146dd902ffb68..6ea480e199be51 100644 --- a/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h +++ b/scripts/tools/zap/tests/outputs/all-clusters-app/app-templates/endpoint_config.h @@ -322,15 +322,15 @@ { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0x1 }, /* ScheduleProgrammingVisibility */ \ \ /* Endpoint: 1, Cluster: Color Control (server) */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* WhitePointX */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* WhitePointY */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointRX */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointRY */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointGX */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointGY */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointBX */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointBY */ \ - { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* StartUpColorTemperatureMireds */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* WhitePointX */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* WhitePointY */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointRX */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointRY */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointGX */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointGY */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointBX */ \ + { (uint16_t) 0x0, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* ColorPointBY */ \ + { (uint16_t) 0xFA, (uint16_t) 0x0, (uint16_t) 0xFEFF }, /* StartUpColorTemperatureMireds */ \ \ /* Endpoint: 1, Cluster: Ballast Configuration (server) */ \ { (uint16_t) 0x1, (uint16_t) 0x1, (uint16_t) 0xFE }, /* MinLevel */ \ @@ -977,13 +977,13 @@ { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* SupportedModes */ \ { ZAP_EMPTY_DEFAULT(), 0x00000001, 1, ZAP_TYPE(INT8U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* CurrentMode */ \ { ZAP_EMPTY_DEFAULT(), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + { ZAP_SIMPLE_DEFAULT(3), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: RVC Clean Mode (server) */ \ { ZAP_EMPTY_DEFAULT(), 0x00000000, 0, ZAP_TYPE(ARRAY), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* SupportedModes */ \ { ZAP_EMPTY_DEFAULT(), 0x00000001, 1, ZAP_TYPE(INT8U), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* CurrentMode */ \ { ZAP_EMPTY_DEFAULT(), 0x0000FFFC, 4, ZAP_TYPE(BITMAP32), ZAP_ATTRIBUTE_MASK(EXTERNAL_STORAGE) }, /* FeatureMap */ \ - { ZAP_SIMPLE_DEFAULT(2), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ + { ZAP_SIMPLE_DEFAULT(3), 0x0000FFFD, 2, ZAP_TYPE(INT16U), 0 }, /* ClusterRevision */ \ \ /* Endpoint: 1, Cluster: Temperature Control (server) */ \ { ZAP_SIMPLE_DEFAULT(0), 0x00000004, 1, ZAP_TYPE(INT8U), 0 }, /* SelectedTemperatureLevel */ \ @@ -1495,8 +1495,8 @@ { ZAP_SIMPLE_DEFAULT(0x2300), 0x00004005, 2, ZAP_TYPE(INT16U), 0 }, /* ColorLoopStartEnhancedHue */ \ { ZAP_SIMPLE_DEFAULT(0x0000), 0x00004006, 2, ZAP_TYPE(INT16U), 0 }, /* ColorLoopStoredEnhancedHue */ \ { ZAP_SIMPLE_DEFAULT(0x1F), 0x0000400A, 2, ZAP_TYPE(BITMAP16), 0 }, /* ColorCapabilities */ \ - { ZAP_SIMPLE_DEFAULT(0x0000), 0x0000400B, 2, ZAP_TYPE(INT16U), 0 }, /* ColorTempPhysicalMinMireds */ \ - { ZAP_SIMPLE_DEFAULT(0xFEFF), 0x0000400C, 2, ZAP_TYPE(INT16U), 0 }, /* ColorTempPhysicalMaxMireds */ \ + { ZAP_SIMPLE_DEFAULT(0x009A), 0x0000400B, 2, ZAP_TYPE(INT16U), 0 }, /* ColorTempPhysicalMinMireds */ \ + { ZAP_SIMPLE_DEFAULT(0x01C6), 0x0000400C, 2, ZAP_TYPE(INT16U), 0 }, /* ColorTempPhysicalMaxMireds */ \ { ZAP_EMPTY_DEFAULT(), 0x0000400D, 2, ZAP_TYPE(INT16U), 0 }, /* CoupleColorTempToLevelMinMireds */ \ { ZAP_MIN_MAX_DEFAULTS_INDEX(36), 0x00004010, 2, ZAP_TYPE(INT16U), \ ZAP_ATTRIBUTE_MASK(MIN_MAX) | ZAP_ATTRIBUTE_MASK(TOKENIZE) | ZAP_ATTRIBUTE_MASK(WRITABLE) | \ @@ -2217,6 +2217,7 @@ }; \ const EmberAfGenericClusterFunction chipFuncArrayThermostatServer[] = { \ (EmberAfGenericClusterFunction) emberAfThermostatClusterServerInitCallback, \ + (EmberAfGenericClusterFunction) MatterThermostatClusterServerAttributeChangedCallback, \ (EmberAfGenericClusterFunction) MatterThermostatClusterServerShutdownCallback, \ (EmberAfGenericClusterFunction) MatterThermostatClusterServerPreAttributeChangedCallback, \ }; \ @@ -3756,7 +3757,7 @@ .attributes = ZAP_ATTRIBUTE_INDEX(616), \ .attributeCount = 26, \ .clusterSize = 72, \ - .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ + .mask = ZAP_CLUSTER_MASK(SERVER) | ZAP_CLUSTER_MASK(INIT_FUNCTION) | ZAP_CLUSTER_MASK(ATTRIBUTE_CHANGED_FUNCTION) | ZAP_CLUSTER_MASK(SHUTDOWN_FUNCTION) | ZAP_CLUSTER_MASK(PRE_ATTRIBUTE_CHANGED_FUNCTION), \ .functions = chipFuncArrayThermostatServer, \ .acceptedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 241 ), \ .generatedCommandList = ZAP_GENERATED_COMMANDS_INDEX( 246 ), \ diff --git a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/access.h b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/access.h index 45b93e99bae3c8..acef1673384c14 100644 --- a/scripts/tools/zap/tests/outputs/lighting-app/app-templates/access.h +++ b/scripts/tools/zap/tests/outputs/lighting-app/app-templates/access.h @@ -292,7 +292,6 @@ #define GENERATED_ACCESS_READ_EVENT__CLUSTER { \ 0x0000001F, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \ 0x0000001F, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \ - 0x0000001F, /* Cluster: Access Control, Event: AccessRestrictionEntryChanged, Privilege: administer */ \ 0x0000001F, /* Cluster: Access Control, Event: FabricRestrictionReviewUpdate, Privilege: administer */ \ } @@ -300,15 +299,13 @@ #define GENERATED_ACCESS_READ_EVENT__EVENT { \ 0x00000000, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \ 0x00000001, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \ - 0x00000002, /* Cluster: Access Control, Event: AccessRestrictionEntryChanged, Privilege: administer */ \ - 0x00000003, /* Cluster: Access Control, Event: FabricRestrictionReviewUpdate, Privilege: administer */ \ + 0x00000002, /* Cluster: Access Control, Event: FabricRestrictionReviewUpdate, Privilege: administer */ \ } // Parallel array data (cluster, event, *privilege*) for read event #define GENERATED_ACCESS_READ_EVENT__PRIVILEGE { \ chip::Access::Privilege::kAdminister, /* Cluster: Access Control, Event: AccessControlEntryChanged, Privilege: administer */ \ chip::Access::Privilege::kAdminister, /* Cluster: Access Control, Event: AccessControlExtensionChanged, Privilege: administer */ \ - chip::Access::Privilege::kAdminister, /* Cluster: Access Control, Event: AccessRestrictionEntryChanged, Privilege: administer */ \ chip::Access::Privilege::kAdminister, /* Cluster: Access Control, Event: FabricRestrictionReviewUpdate, Privilege: administer */ \ } diff --git a/scripts/tools/zap/zap_download.py b/scripts/tools/zap/zap_download.py index 72dea27048a0c6..9d1a553feac0e8 100755 --- a/scripts/tools/zap/zap_download.py +++ b/scripts/tools/zap/zap_download.py @@ -23,6 +23,7 @@ import shutil import subprocess import sys +import tempfile import zipfile from typing import Optional @@ -123,13 +124,22 @@ def _SetupReleaseZap(install_directory: str, zap_version: str): logging.info("Fetching: %s", url) r = requests.get(url, stream=True) - z = zipfile.ZipFile(io.BytesIO(r.content)) - - logging.info("Data downloaded, extracting ...") - # extractall() does not preserve permissions (https://github.com/python/cpython/issues/59999) - for entry in z.filelist: - path = z.extract(entry, install_directory) - os.chmod(path, (entry.external_attr >> 16) & 0o777) + if zap_platform == 'mac': + # zipfile does not support symlinks (https://github.com/python/cpython/issues/82102), + # making a zap.app extracted with it unusable due to embedded frameworks. + with tempfile.NamedTemporaryFile(suffix='.zip') as tf: + for chunk in r.iter_content(chunk_size=4096): + tf.write(chunk) + tf.flush() + os.makedirs(install_directory, exist_ok=True) + _ExecuteProcess(['/usr/bin/unzip', '-oq', tf.name], install_directory) + else: + z = zipfile.ZipFile(io.BytesIO(r.content)) + logging.info("Data downloaded, extracting ...") + # extractall() does not preserve permissions (https://github.com/python/cpython/issues/59999) + for entry in z.filelist: + path = z.extract(entry, install_directory) + os.chmod(path, (entry.external_attr >> 16) & 0o777) logging.info("Done extracting.") diff --git a/examples/all-clusters-app/cc13x4_26x4/main/include/AppConfig.h b/src/access/AccessConfig.h similarity index 81% rename from examples/all-clusters-app/cc13x4_26x4/main/include/AppConfig.h rename to src/access/AccessConfig.h index 7f6ce19a384bdc..b9318a10d9e4d5 100644 --- a/examples/all-clusters-app/cc13x4_26x4/main/include/AppConfig.h +++ b/src/access/AccessConfig.h @@ -1,6 +1,6 @@ /* - * Copyright (c) 2020 Project CHIP Authors - * All rights reserved. + * + * Copyright (c) 2024 Project CHIP Authors * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -15,7 +15,8 @@ * limitations under the License. */ -#ifndef APP_CONFIG_H -#define APP_CONFIG_H +#pragma once -#endif // APP_CONFIG_H +#if CHIP_HAVE_CONFIG_H +#include +#endif diff --git a/src/access/AccessControl.cpp b/src/access/AccessControl.cpp index fcb5a43d975f8e..c9da05e51038cc 100644 --- a/src/access/AccessControl.cpp +++ b/src/access/AccessControl.cpp @@ -181,7 +181,7 @@ char GetRequestTypeStringForLogging(RequestType requestType) return 'w'; case RequestType::kCommandInvokeRequest: return 'i'; - case RequestType::kEventReadOrSubscribeRequest: + case RequestType::kEventReadRequest: return 'e'; default: return '?'; @@ -325,7 +325,11 @@ void AccessControl::RemoveEntryListener(EntryListener & listener) bool AccessControl::IsAccessRestrictionListSupported() const { - return false; // not yet supported +#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS + return mAccessRestrictionProvider != nullptr; +#else + return false; +#endif } CHIP_ERROR AccessControl::Check(const SubjectDescriptor & subjectDescriptor, const RequestPath & requestPath, @@ -333,6 +337,21 @@ CHIP_ERROR AccessControl::Check(const SubjectDescriptor & subjectDescriptor, con { VerifyOrReturnError(IsInitialized(), CHIP_ERROR_INCORRECT_STATE); + CHIP_ERROR result = CheckACL(subjectDescriptor, requestPath, requestPrivilege); + +#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS + if (result == CHIP_NO_ERROR) + { + result = CheckARL(subjectDescriptor, requestPath, requestPrivilege); + } +#endif + + return result; +} + +CHIP_ERROR AccessControl::CheckACL(const SubjectDescriptor & subjectDescriptor, const RequestPath & requestPath, + Privilege requestPrivilege) +{ #if CHIP_PROGRESS_LOGGING && CHIP_CONFIG_ACCESS_CONTROL_POLICY_LOGGING_VERBOSITY > 1 { constexpr size_t kMaxCatsToLog = 6; @@ -347,11 +366,6 @@ CHIP_ERROR AccessControl::Check(const SubjectDescriptor & subjectDescriptor, con } #endif // CHIP_PROGRESS_LOGGING && CHIP_CONFIG_ACCESS_CONTROL_POLICY_LOGGING_VERBOSITY > 1 - if (IsAccessRestrictionListSupported()) - { - VerifyOrReturnError(requestPath.requestType != RequestType::kRequestTypeUnknown, CHIP_ERROR_INVALID_ARGUMENT); - } - { CHIP_ERROR result = mDelegate->Check(subjectDescriptor, requestPath, requestPrivilege); if (result != CHIP_ERROR_NOT_IMPLEMENTED) @@ -368,6 +382,7 @@ CHIP_ERROR AccessControl::Check(const SubjectDescriptor & subjectDescriptor, con (result == CHIP_ERROR_ACCESS_DENIED) ? "denied" : "error"); } #endif // CHIP_CONFIG_ACCESS_CONTROL_POLICY_LOGGING_VERBOSITY > 0 + return result; } } @@ -497,6 +512,40 @@ CHIP_ERROR AccessControl::Check(const SubjectDescriptor & subjectDescriptor, con return CHIP_ERROR_ACCESS_DENIED; } +#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS +CHIP_ERROR AccessControl::CheckARL(const SubjectDescriptor & subjectDescriptor, const RequestPath & requestPath, + Privilege requestPrivilege) +{ + CHIP_ERROR result = CHIP_NO_ERROR; + + VerifyOrReturnError(requestPath.requestType != RequestType::kRequestTypeUnknown, CHIP_ERROR_INVALID_ARGUMENT); + + if (!IsAccessRestrictionListSupported()) + { + // Access Restriction support is compiled in, but not configured/enabled. Nothing to restrict. + return CHIP_NO_ERROR; + } + + if (subjectDescriptor.isCommissioning) + { + result = mAccessRestrictionProvider->CheckForCommissioning(subjectDescriptor, requestPath); + } + else + { + result = mAccessRestrictionProvider->Check(subjectDescriptor, requestPath); + } + + if (result != CHIP_NO_ERROR) + { + ChipLogProgress(DataManagement, "AccessControl: %s", + (result == CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL) ? "denied (restricted)" : "denied (restriction error)"); + return result; + } + + return result; +} +#endif + #if CHIP_ACCESS_CONTROL_DUMP_ENABLED CHIP_ERROR AccessControl::Dump(const Entry & entry) { diff --git a/src/access/AccessControl.h b/src/access/AccessControl.h index a7c3472f5d99b4..df986864b8ff4c 100644 --- a/src/access/AccessControl.h +++ b/src/access/AccessControl.h @@ -18,6 +18,12 @@ #pragma once +#include + +#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS +#include "AccessRestrictionProvider.h" +#endif + #include "Privilege.h" #include "RequestPath.h" #include "SubjectDescriptor.h" @@ -627,6 +633,16 @@ class AccessControl // Removes a listener from the listener list, if in the list. void RemoveEntryListener(EntryListener & listener); +#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS + // Set an optional AcceessRestriction object for MNGD feature. + void SetAccessRestrictionProvider(AccessRestrictionProvider * accessRestrictionProvider) + { + mAccessRestrictionProvider = accessRestrictionProvider; + } + + AccessRestrictionProvider * GetAccessRestrictionProvider() { return mAccessRestrictionProvider; } +#endif + /** * Check whether or not Access Restriction List is supported. * @@ -638,6 +654,8 @@ class AccessControl * Check whether access (by a subject descriptor, to a request path, * requiring a privilege) should be allowed or denied. * + * If an AccessRestrictionProvider object is set, it will be checked for additional access restrictions. + * * @retval #CHIP_ERROR_ACCESS_DENIED if denied. * @retval other errors should also be treated as denied. * @retval #CHIP_NO_ERROR if allowed. @@ -656,12 +674,29 @@ class AccessControl void NotifyEntryChanged(const SubjectDescriptor * subjectDescriptor, FabricIndex fabric, size_t index, const Entry * entry, EntryListener::ChangeType changeType); + /** + * Check ACL for whether access (by a subject descriptor, to a request path, + * requiring a privilege) should be allowed or denied. + */ + CHIP_ERROR CheckACL(const SubjectDescriptor & subjectDescriptor, const RequestPath & requestPath, Privilege requestPrivilege); + + /** + * Check CommissioningARL or ARL (as appropriate) for whether access (by a + * subject descriptor, to a request path, requiring a privilege) should + * be allowed or denied. + */ + CHIP_ERROR CheckARL(const SubjectDescriptor & subjectDescriptor, const RequestPath & requestPath, Privilege requestPrivilege); + private: Delegate * mDelegate = nullptr; DeviceTypeResolver * mDeviceTypeResolver = nullptr; EntryListener * mEntryListener = nullptr; + +#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS + AccessRestrictionProvider * mAccessRestrictionProvider; +#endif }; /** diff --git a/src/access/AccessRestrictionProvider.cpp b/src/access/AccessRestrictionProvider.cpp new file mode 100644 index 00000000000000..95e5f2b15799da --- /dev/null +++ b/src/access/AccessRestrictionProvider.cpp @@ -0,0 +1,235 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "AccessRestrictionProvider.h" + +#include +#include + +using namespace chip::Platform; + +namespace chip { +namespace Access { + +void AccessRestrictionProvider::AddListener(Listener & listener) +{ + if (mListeners == nullptr) + { + mListeners = &listener; + listener.mNext = nullptr; + return; + } + + for (Listener * l = mListeners; /**/; l = l->mNext) + { + if (l == &listener) + { + return; + } + + if (l->mNext == nullptr) + { + l->mNext = &listener; + listener.mNext = nullptr; + return; + } + } +} + +void AccessRestrictionProvider::RemoveListener(Listener & listener) +{ + if (mListeners == &listener) + { + mListeners = listener.mNext; + listener.mNext = nullptr; + return; + } + + for (Listener * l = mListeners; l != nullptr; l = l->mNext) + { + if (l->mNext == &listener) + { + l->mNext = listener.mNext; + listener.mNext = nullptr; + return; + } + } +} + +CHIP_ERROR AccessRestrictionProvider::SetCommissioningEntries(const std::vector & entries) +{ + for (auto & entry : entries) + { + if (!mExceptionChecker.AreRestrictionsAllowed(entry.endpointNumber, entry.clusterId)) + { + ChipLogError(DataManagement, "AccessRestrictionProvider: invalid entry"); + return CHIP_ERROR_INVALID_ARGUMENT; + } + } + + mCommissioningEntries = entries; + + for (Listener * listener = mListeners; listener != nullptr; listener = listener->mNext) + { + listener->MarkCommissioningRestrictionListChanged(); + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR AccessRestrictionProvider::SetEntries(const FabricIndex fabricIndex, const std::vector & entries) +{ + std::vector updatedEntries; + + for (auto & entry : entries) + { + if (!mExceptionChecker.AreRestrictionsAllowed(entry.endpointNumber, entry.clusterId)) + { + ChipLogError(DataManagement, "AccessRestrictionProvider: invalid entry"); + return CHIP_ERROR_INVALID_ARGUMENT; + } + + Entry updatedEntry = entry; + updatedEntry.fabricIndex = fabricIndex; + updatedEntries.push_back(updatedEntry); + } + + mFabricEntries[fabricIndex] = std::move(updatedEntries); + + for (Listener * listener = mListeners; listener != nullptr; listener = listener->mNext) + { + listener->MarkRestrictionListChanged(fabricIndex); + } + + return CHIP_NO_ERROR; +} + +bool AccessRestrictionProvider::StandardAccessRestrictionExceptionChecker::AreRestrictionsAllowed(EndpointId endpoint, + ClusterId cluster) +{ + if (endpoint != kRootEndpointId && + (cluster == app::Clusters::WiFiNetworkManagement::Id || cluster == app::Clusters::ThreadBorderRouterManagement::Id || + cluster == app::Clusters::ThreadNetworkDirectory::Id)) + { + return true; + } + + return false; +} + +CHIP_ERROR AccessRestrictionProvider::CheckForCommissioning(const SubjectDescriptor & subjectDescriptor, + const RequestPath & requestPath) +{ + return DoCheck(mCommissioningEntries, subjectDescriptor, requestPath); +} + +CHIP_ERROR AccessRestrictionProvider::Check(const SubjectDescriptor & subjectDescriptor, const RequestPath & requestPath) +{ + return DoCheck(mFabricEntries[subjectDescriptor.fabricIndex], subjectDescriptor, requestPath); +} + +CHIP_ERROR AccessRestrictionProvider::DoCheck(const std::vector & entries, const SubjectDescriptor & subjectDescriptor, + const RequestPath & requestPath) +{ + if (!mExceptionChecker.AreRestrictionsAllowed(requestPath.endpoint, requestPath.cluster)) + { + ChipLogProgress(DataManagement, "AccessRestrictionProvider: skipping checks for unrestrictable request path"); + return CHIP_NO_ERROR; + } + + ChipLogProgress(DataManagement, "AccessRestrictionProvider: action %d", to_underlying(requestPath.requestType)); + + if (requestPath.requestType == RequestType::kRequestTypeUnknown) + { + ChipLogError(DataManagement, "AccessRestrictionProvider: RequestPath type is unknown"); + return CHIP_ERROR_INVALID_ARGUMENT; + } + + // wildcard event subscriptions are allowed since wildcard is only used when setting up the subscription and + // we want that request to succeed (when generating the report, this method will be called with the specific + // event id). All other requests require an entity id + if (!requestPath.entityId.has_value()) + { + if (requestPath.requestType == RequestType::kEventReadRequest) + { + return CHIP_NO_ERROR; + } + else + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + } + + for (auto & entry : entries) + { + if (entry.endpointNumber != requestPath.endpoint || entry.clusterId != requestPath.cluster) + { + continue; + } + + for (auto & restriction : entry.restrictions) + { + // A missing id is a wildcard + bool idMatch = !restriction.id.HasValue() || restriction.id.Value() == requestPath.entityId.value(); + if (!idMatch) + { + continue; + } + + switch (restriction.restrictionType) + { + case Type::kAttributeAccessForbidden: + if (requestPath.requestType == RequestType::kAttributeReadRequest || + requestPath.requestType == RequestType::kAttributeWriteRequest) + { + if (!IsGlobalAttribute(requestPath.entityId.value())) + { + return CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL; + } + } + break; + case Type::kAttributeWriteForbidden: + if (requestPath.requestType == RequestType::kAttributeWriteRequest) + { + if (!IsGlobalAttribute(requestPath.entityId.value())) + { + return CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL; + } + } + break; + case Type::kCommandForbidden: + if (requestPath.requestType == RequestType::kCommandInvokeRequest) + { + return CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL; + } + break; + case Type::kEventForbidden: + if (requestPath.requestType == RequestType::kEventReadRequest) + { + return CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL; + } + break; + } + } + } + + return CHIP_NO_ERROR; +} + +} // namespace Access +} // namespace chip diff --git a/src/access/AccessRestrictionProvider.h b/src/access/AccessRestrictionProvider.h new file mode 100644 index 00000000000000..705d9c365f8f1f --- /dev/null +++ b/src/access/AccessRestrictionProvider.h @@ -0,0 +1,275 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "Privilege.h" +#include "RequestPath.h" +#include "SubjectDescriptor.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +namespace chip { +namespace Access { + +class AccessRestrictionProvider +{ +public: + static constexpr size_t kNumberOfFabrics = CHIP_CONFIG_MAX_FABRICS; + static constexpr size_t kEntriesPerFabric = CHIP_CONFIG_ACCESS_RESTRICTION_MAX_ENTRIES_PER_FABRIC; + static constexpr size_t kRestrictionsPerEntry = CHIP_CONFIG_ACCESS_RESTRICTION_MAX_RESTRICTIONS_PER_ENTRY; + + /** + * Defines the type of access restriction, which is used to determine the meaning of the restriction's id. + */ + enum class Type : uint8_t + { + kAttributeAccessForbidden = 0, + kAttributeWriteForbidden = 1, + kCommandForbidden = 2, + kEventForbidden = 3 + }; + + /** + * Defines a single restriction on an attribute, command, or event. + * + * If id is not set, the restriction applies to all attributes, commands, or events of the given type (wildcard). + */ + struct Restriction + { + Type restrictionType; + Optional id; + }; + + /** + * Defines a single entry in the access restriction list, which contains a list of restrictions + * for a cluster on an endpoint. + */ + struct Entry + { + FabricIndex fabricIndex; + EndpointId endpointNumber; + ClusterId clusterId; + std::vector restrictions; + }; + + /** + * Defines the interface for a checker for access restriction exceptions. + */ + class AccessRestrictionExceptionChecker + { + public: + virtual ~AccessRestrictionExceptionChecker() = default; + + /** + * Check if any restrictions are allowed to be applied on the given endpoint and cluster + * because of constraints against their use in ARLs. + * + * @retval true if ARL checks are allowed to be applied to the cluster on the endpoint, false otherwise + */ + virtual bool AreRestrictionsAllowed(EndpointId endpoint, ClusterId cluster) = 0; + }; + + /** + * Define a standard implementation of the AccessRestrictionExceptionChecker interface + * which is the default implementation used by AccessResrictionProvider. + */ + class StandardAccessRestrictionExceptionChecker : public AccessRestrictionExceptionChecker + { + public: + StandardAccessRestrictionExceptionChecker() = default; + ~StandardAccessRestrictionExceptionChecker() = default; + + bool AreRestrictionsAllowed(EndpointId endpoint, ClusterId cluster) override; + }; + + /** + * Used to notify of changes in the access restriction list and active reviews. + */ + class Listener + { + public: + virtual ~Listener() = default; + + /** + * Notifies of a change in the commissioning access restriction list. + */ + virtual void MarkCommissioningRestrictionListChanged() = 0; + + /** + * Notifies of a change in the access restriction list. + * + * @param [in] fabricIndex The index of the fabric in which the list has changed. + */ + virtual void MarkRestrictionListChanged(FabricIndex fabricIndex) = 0; + + /** + * Notifies of an update to an active review with instructions and an optional redirect URL. + * + * @param [in] fabricIndex The index of the fabric in which the entry has changed. + * @param [in] token The token of the review being updated (obtained from ReviewFabricRestrictionsResponse) + * @param [in] instruction Optional instructions to be displayed to the user. + * @param [in] redirectUrl An optional URL to redirect the user to for more information. + */ + virtual void OnFabricRestrictionReviewUpdate(FabricIndex fabricIndex, uint64_t token, Optional instruction, + Optional redirectUrl) = 0; + + private: + Listener * mNext = nullptr; + + friend class AccessRestrictionProvider; + }; + + AccessRestrictionProvider() = default; + virtual ~AccessRestrictionProvider() = default; + + AccessRestrictionProvider(const AccessRestrictionProvider &) = delete; + AccessRestrictionProvider & operator=(const AccessRestrictionProvider &) = delete; + + /** + * Set the restriction entries that are to be used during commissioning when there is no accessing fabric. + * + * @param [in] entries The entries to set. + */ + CHIP_ERROR SetCommissioningEntries(const std::vector & entries); + + /** + * Set the restriction entries for a fabric. + * + * @param [in] fabricIndex The index of the fabric for which to create entries. + * @param [in] entries The entries to set for the fabric. + */ + CHIP_ERROR SetEntries(const FabricIndex, const std::vector & entries); + + /** + * Add a listener to be notified of changes in the access restriction list and active reviews. + * + * @param [in] listener The listener to add. + */ + void AddListener(Listener & listener); + + /** + * Remove a listener from being notified of changes in the access restriction list and active reviews. + * + * @param [in] listener The listener to remove. + */ + void RemoveListener(Listener & listener); + + /** + * Check whether access by a subject descriptor to a request path should be restricted (denied) for the given action + * during commissioning by using the CommissioningEntries. + * + * These restrictions are are only a part of overall access evaluation. + * + * If access is not restricted, CHIP_NO_ERROR will be returned. + * + * @retval CHIP_ERROR_ACCESS_DENIED if access is denied. + * @retval other errors should also be treated as restricted/denied. + * @retval CHIP_NO_ERROR if access is not restricted/denied. + */ + CHIP_ERROR CheckForCommissioning(const SubjectDescriptor & subjectDescriptor, const RequestPath & requestPath); + + /** + * Check whether access by a subject descriptor to a request path should be restricted (denied) for the given action. + * These restrictions are are only a part of overall access evaluation. + * + * If access is not restricted, CHIP_NO_ERROR will be returned. + * + * @retval CHIP_ERROR_ACCESS_DENIED if access is denied. + * @retval other errors should also be treated as restricted/denied. + * @retval CHIP_NO_ERROR if access is not restricted/denied. + */ + CHIP_ERROR Check(const SubjectDescriptor & subjectDescriptor, const RequestPath & requestPath); + + /** + * Request a review of the access restrictions for a fabric. + * + * @param [in] fabricIndex The index of the fabric requesting a review. + * @param [in] arl An optinal list of access restriction entries to review. If null, all entries will be reviewed. + * @param [out] token The unique token for the review, which can be matched to a review update event. + */ + CHIP_ERROR RequestFabricRestrictionReview(FabricIndex fabricIndex, const std::vector & arl, uint64_t & token) + { + token = mNextToken++; + return DoRequestFabricRestrictionReview(fabricIndex, token, arl); + } + + /** + * Get the commissioning restriction entries. + * + * @retval the commissioning restriction entries. + */ + const std::vector & GetCommissioningEntries() const { return mCommissioningEntries; } + + /** + * Get the restriction entries for a fabric. + * + * @param [in] fabricIndex the index of the fabric for which to get entries. + * @param [out] entries vector to hold the entries. + */ + CHIP_ERROR GetEntries(const FabricIndex fabricIndex, std::vector & entries) const + { + auto it = mFabricEntries.find(fabricIndex); + if (it == mFabricEntries.end()) + { + return CHIP_ERROR_NOT_FOUND; + } + + entries = (it->second); + + return CHIP_NO_ERROR; + } + +protected: + /** + * Initiate a review of the access restrictions for a fabric. This method should be implemented by the platform and be + * non-blocking. + * + * @param [in] fabricIndex The index of the fabric requesting a review. + * @param [in] token The unique token for the review, which can be matched to a review update event. + * @param [in] arl An optinal list of access restriction entries to review. If null, all entries will be reviewed. + * @return CHIP_NO_ERROR if the review was successfully requested, or an error code if the request failed. + */ + virtual CHIP_ERROR DoRequestFabricRestrictionReview(const FabricIndex fabricIndex, uint64_t token, + const std::vector & arl) = 0; + +private: + /** + * Perform the access restriction check using the given entries. + */ + CHIP_ERROR DoCheck(const std::vector & entries, const SubjectDescriptor & subjectDescriptor, + const RequestPath & requestPath); + + uint64_t mNextToken = 1; + Listener * mListeners = nullptr; + StandardAccessRestrictionExceptionChecker mExceptionChecker; + std::vector mCommissioningEntries; + std::map> mFabricEntries; +}; + +} // namespace Access +} // namespace chip diff --git a/src/access/BUILD.gn b/src/access/BUILD.gn index 8d2c4b504975ee..3f3aaafe8a6a9b 100644 --- a/src/access/BUILD.gn +++ b/src/access/BUILD.gn @@ -13,6 +13,25 @@ # limitations under the License. import("//build_overrides/chip.gni") +import("${chip_root}/build/chip/buildconfig_header.gni") +import("${chip_root}/src/access/access.gni") + +buildconfig_header("access_buildconfig") { + header = "AccessBuildConfig.h" + header_dir = "access" + + defines = [ + "CHIP_CONFIG_USE_ACCESS_RESTRICTIONS=${chip_enable_access_restrictions}", + ] + + visibility = [ ":access_config" ] +} + +source_set("access_config") { + sources = [ "AccessConfig.h" ] + + deps = [ ":access_buildconfig" ] +} source_set("types") { sources = [ @@ -23,6 +42,7 @@ source_set("types") { ] public_deps = [ + ":access_config", "${chip_root}/src/lib/core", "${chip_root}/src/lib/core:types", ] @@ -43,10 +63,18 @@ static_library("access") { cflags = [ "-Wconversion" ] public_deps = [ + ":access_config", ":types", "${chip_root}/src/lib/core", "${chip_root}/src/lib/core:types", "${chip_root}/src/lib/support", "${chip_root}/src/platform", ] + + if (chip_enable_access_restrictions) { + sources += [ + "AccessRestrictionProvider.cpp", + "AccessRestrictionProvider.h", + ] + } } diff --git a/src/access/RequestPath.h b/src/access/RequestPath.h index af791d73eb151d..920d5fed372eb1 100644 --- a/src/access/RequestPath.h +++ b/src/access/RequestPath.h @@ -30,7 +30,7 @@ enum class RequestType : uint8_t kAttributeReadRequest, kAttributeWriteRequest, kCommandInvokeRequest, - kEventReadOrSubscribeRequest + kEventReadRequest }; struct RequestPath diff --git a/src/access/SubjectDescriptor.h b/src/access/SubjectDescriptor.h index ec6abec0b38a30..9cde4102750d25 100644 --- a/src/access/SubjectDescriptor.h +++ b/src/access/SubjectDescriptor.h @@ -42,6 +42,10 @@ struct SubjectDescriptor // CASE Authenticated Tags (CATs) only valid if auth mode is CASE. CATValues cats; + + // Whether the subject is currently a pending commissionee. See `IsCommissioning` + // definition in Core Specification's ACL Architecture pseudocode. + bool isCommissioning = false; }; } // namespace Access diff --git a/src/access/access.gni b/src/access/access.gni new file mode 100644 index 00000000000000..bd18f1387b66b9 --- /dev/null +++ b/src/access/access.gni @@ -0,0 +1,18 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +declare_args() { + # Enable ARL features of Access Control + chip_enable_access_restrictions = false +} diff --git a/src/access/tests/BUILD.gn b/src/access/tests/BUILD.gn index d8b43e6a17a01d..64226adfacc260 100644 --- a/src/access/tests/BUILD.gn +++ b/src/access/tests/BUILD.gn @@ -15,6 +15,7 @@ import("//build_overrides/build.gni") import("//build_overrides/chip.gni") import("//build_overrides/pigweed.gni") +import("${chip_root}/src/access/access.gni") import("${chip_root}/build/chip/chip_test_suite.gni") @@ -29,4 +30,8 @@ chip_test_suite("tests") { "${chip_root}/src/lib/support:test_utils", "${dir_pw_unit_test}", ] + + if (chip_enable_access_restrictions) { + test_sources += [ "TestAccessRestrictionProvider.cpp" ] + } } diff --git a/src/access/tests/TestAccessControl.cpp b/src/access/tests/TestAccessControl.cpp index 400ea04b76e535..00b95baf39164b 100644 --- a/src/access/tests/TestAccessControl.cpp +++ b/src/access/tests/TestAccessControl.cpp @@ -1752,7 +1752,11 @@ TEST_F(TestAccessControl, TestCheck) for (const auto & checkData : checkData1) { CHIP_ERROR expectedResult = checkData.allow ? CHIP_NO_ERROR : CHIP_ERROR_ACCESS_DENIED; - EXPECT_EQ(accessControl.Check(checkData.subjectDescriptor, checkData.requestPath, checkData.privilege), expectedResult); + auto requestPath = checkData.requestPath; +#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS + requestPath.requestType = Access::RequestType::kAttributeReadRequest; +#endif + EXPECT_EQ(accessControl.Check(checkData.subjectDescriptor, requestPath, checkData.privilege), expectedResult); } } diff --git a/src/access/tests/TestAccessRestrictionProvider.cpp b/src/access/tests/TestAccessRestrictionProvider.cpp new file mode 100644 index 00000000000000..723d023e48b2ff --- /dev/null +++ b/src/access/tests/TestAccessRestrictionProvider.cpp @@ -0,0 +1,722 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "access/AccessControl.h" +#include "access/AccessRestrictionProvider.h" +#include "access/examples/ExampleAccessControlDelegate.h" + +#include + +#include +#include +#include +namespace chip { +namespace Access { + +class TestAccessRestrictionProvider : public AccessRestrictionProvider +{ + CHIP_ERROR DoRequestFabricRestrictionReview(const FabricIndex fabricIndex, uint64_t token, const std::vector & arl) + { + return CHIP_NO_ERROR; + } +}; + +AccessControl accessControl; +TestAccessRestrictionProvider accessRestrictionProvider; + +constexpr ClusterId kNetworkCommissioningCluster = app::Clusters::NetworkCommissioning::Id; +constexpr ClusterId kDescriptorCluster = app::Clusters::Descriptor::Id; +constexpr ClusterId kOnOffCluster = app::Clusters::OnOff::Id; + +// Clusters allowed to have restrictions +constexpr ClusterId kWiFiNetworkManagementCluster = app::Clusters::WiFiNetworkManagement::Id; +constexpr ClusterId kThreadBorderRouterMgmtCluster = app::Clusters::ThreadBorderRouterManagement::Id; +constexpr ClusterId kThreadNetworkDirectoryCluster = app::Clusters::ThreadNetworkDirectory::Id; + +constexpr NodeId kOperationalNodeId1 = 0x1111111111111111; +constexpr NodeId kOperationalNodeId2 = 0x2222222222222222; +constexpr NodeId kOperationalNodeId3 = 0x3333333333333333; + +bool operator==(const AccessRestrictionProvider::Restriction & lhs, const AccessRestrictionProvider::Restriction & rhs) +{ + return lhs.restrictionType == rhs.restrictionType && lhs.id == rhs.id; +} + +bool operator==(const AccessRestrictionProvider::Entry & lhs, const AccessRestrictionProvider::Entry & rhs) +{ + return lhs.fabricIndex == rhs.fabricIndex && lhs.endpointNumber == rhs.endpointNumber && lhs.clusterId == rhs.clusterId && + lhs.restrictions == rhs.restrictions; +} + +struct AclEntryData +{ + FabricIndex fabricIndex = kUndefinedFabricIndex; + Privilege privilege = Privilege::kView; + AuthMode authMode = AuthMode::kNone; + NodeId subject; +}; + +constexpr AclEntryData aclEntryData[] = { + { + .fabricIndex = 1, + .privilege = Privilege::kAdminister, + .authMode = AuthMode::kCase, + .subject = kOperationalNodeId1, + }, + { + .fabricIndex = 2, + .privilege = Privilege::kAdminister, + .authMode = AuthMode::kCase, + .subject = kOperationalNodeId2, + }, +}; +constexpr size_t aclEntryDataCount = ArraySize(aclEntryData); + +struct CheckData +{ + SubjectDescriptor subjectDescriptor; + RequestPath requestPath; + Privilege privilege; + bool allow; +}; + +constexpr CheckData checkDataNoRestrictions[] = { + // Checks for implicit PASE + { .subjectDescriptor = { .fabricIndex = 0, .authMode = AuthMode::kPase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = 1, .endpoint = 1, .requestType = RequestType::kAttributeReadRequest, .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 0, .authMode = AuthMode::kPase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = 1, .endpoint = 1, .requestType = RequestType::kAttributeWriteRequest, .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kPase, .subject = kOperationalNodeId2 }, + .requestPath = { .cluster = 1, .endpoint = 1, .requestType = RequestType::kCommandInvokeRequest, .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 2, .authMode = AuthMode::kPase, .subject = kOperationalNodeId3 }, + .requestPath = { .cluster = 1, .endpoint = 1, .requestType = RequestType::kEventReadRequest, .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, + // Checks for entry 0 + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = 1, .endpoint = 1, .requestType = RequestType::kAttributeReadRequest, .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = 1, .endpoint = 1, .requestType = RequestType::kAttributeWriteRequest, .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = 1, .endpoint = 1, .requestType = RequestType::kCommandInvokeRequest, .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = 1, .endpoint = 1, .requestType = RequestType::kEventReadRequest, .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, + // Checks for entry 1 + { .subjectDescriptor = { .fabricIndex = 2, .authMode = AuthMode::kCase, .subject = kOperationalNodeId2 }, + .requestPath = { .cluster = 1, .endpoint = 1, .requestType = RequestType::kAttributeReadRequest, .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 2, .authMode = AuthMode::kCase, .subject = kOperationalNodeId2 }, + .requestPath = { .cluster = 1, .endpoint = 1, .requestType = RequestType::kAttributeWriteRequest, .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 2, .authMode = AuthMode::kCase, .subject = kOperationalNodeId2 }, + .requestPath = { .cluster = 1, .endpoint = 1, .requestType = RequestType::kCommandInvokeRequest, .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 2, .authMode = AuthMode::kCase, .subject = kOperationalNodeId2 }, + .requestPath = { .cluster = 1, .endpoint = 1, .requestType = RequestType::kEventReadRequest, .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, +}; + +CHIP_ERROR LoadEntry(AccessControl::Entry & entry, const AclEntryData & entryData) +{ + ReturnErrorOnFailure(entry.SetAuthMode(entryData.authMode)); + ReturnErrorOnFailure(entry.SetFabricIndex(entryData.fabricIndex)); + ReturnErrorOnFailure(entry.SetPrivilege(entryData.privilege)); + ReturnErrorOnFailure(entry.AddSubject(nullptr, entryData.subject)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR LoadAccessControl(AccessControl & ac, const AclEntryData * entryData, size_t count) +{ + AccessControl::Entry entry; + for (size_t i = 0; i < count; ++i, ++entryData) + { + ReturnErrorOnFailure(ac.PrepareEntry(entry)); + ReturnErrorOnFailure(LoadEntry(entry, *entryData)); + ReturnErrorOnFailure(ac.CreateEntry(nullptr, entry)); + } + return CHIP_NO_ERROR; +} + +void RunChecks(const CheckData * checkData, size_t count) +{ + for (size_t i = 0; i < count; i++) + { + CHIP_ERROR expectedResult = checkData[i].allow ? CHIP_NO_ERROR : CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL; + EXPECT_EQ(accessControl.Check(checkData[i].subjectDescriptor, checkData[i].requestPath, checkData[i].privilege), + expectedResult); + } +} + +class DeviceTypeResolver : public AccessControl::DeviceTypeResolver +{ +public: + bool IsDeviceTypeOnEndpoint(DeviceTypeId deviceType, EndpointId endpoint) override { return false; } +} testDeviceTypeResolver; + +class TestAccessRestriction : public ::testing::Test +{ +public: // protected + void SetUp() override + { + accessRestrictionProvider.SetCommissioningEntries(std::vector()); + accessRestrictionProvider.SetEntries(0, std::vector()); + accessRestrictionProvider.SetEntries(1, std::vector()); + accessRestrictionProvider.SetEntries(2, std::vector()); + } + + static void SetUpTestSuite() + { + ASSERT_EQ(chip::Platform::MemoryInit(), CHIP_NO_ERROR); + AccessControl::Delegate * delegate = Examples::GetAccessControlDelegate(); + SetAccessControl(accessControl); + GetAccessControl().SetAccessRestrictionProvider(&accessRestrictionProvider); + VerifyOrDie(GetAccessControl().Init(delegate, testDeviceTypeResolver) == CHIP_NO_ERROR); + EXPECT_EQ(LoadAccessControl(accessControl, aclEntryData, aclEntryDataCount), CHIP_NO_ERROR); + } + static void TearDownTestSuite() + { + GetAccessControl().Finish(); + ResetAccessControlToDefault(); + } +}; + +// basic data check without restrictions +TEST_F(TestAccessRestriction, MetaTest) +{ + for (const auto & checkData : checkDataNoRestrictions) + { + CHIP_ERROR expectedResult = checkData.allow ? CHIP_NO_ERROR : CHIP_ERROR_ACCESS_DENIED; + EXPECT_EQ(accessControl.Check(checkData.subjectDescriptor, checkData.requestPath, checkData.privilege), expectedResult); + } +} + +// ensure failure when adding restrictons on endpoint 0 (any cluster, including those allowed on other endpoints) +TEST_F(TestAccessRestriction, InvalidRestrictionsOnEndpointZeroTest) +{ + std::vector entries; + AccessRestrictionProvider::Entry entry; + entry.endpointNumber = 0; + entry.fabricIndex = 1; + entry.restrictions.push_back({ .restrictionType = AccessRestrictionProvider::Type::kAttributeAccessForbidden }); + + entry.clusterId = kDescriptorCluster; + entries.push_back(entry); + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries), CHIP_ERROR_INVALID_ARGUMENT); + + entries.clear(); + entry.clusterId = kNetworkCommissioningCluster; + entries.push_back(entry); + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries), CHIP_ERROR_INVALID_ARGUMENT); + + entries.clear(); + entry.clusterId = kWiFiNetworkManagementCluster; + entries.push_back(entry); + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries), CHIP_ERROR_INVALID_ARGUMENT); + + entries.clear(); + entry.clusterId = kThreadBorderRouterMgmtCluster; + entries.push_back(entry); + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries), CHIP_ERROR_INVALID_ARGUMENT); + + entries.clear(); + entry.clusterId = kThreadNetworkDirectoryCluster; + entries.push_back(entry); + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries), CHIP_ERROR_INVALID_ARGUMENT); + + // also test a cluster on endpoint 0 that isnt in the special allowed list + entries.clear(); + entry.clusterId = kOnOffCluster; + entries.push_back(entry); + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries), CHIP_ERROR_INVALID_ARGUMENT); +} + +// ensure no failure adding restrictions on endpoint 1 for allowed clusters only: +// wifi network management, thread border router, thread network directory +TEST_F(TestAccessRestriction, ValidRestrictionsOnEndpointOneTest) +{ + std::vector entries; + AccessRestrictionProvider::Entry entry; + entry.endpointNumber = 1; + entry.fabricIndex = 1; + entry.restrictions.push_back({ .restrictionType = AccessRestrictionProvider::Type::kAttributeAccessForbidden }); + + entry.clusterId = kWiFiNetworkManagementCluster; + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries), CHIP_NO_ERROR); + + entries.clear(); + entry.clusterId = kThreadBorderRouterMgmtCluster; + entries.push_back(entry); + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries), CHIP_NO_ERROR); + + entries.clear(); + entry.clusterId = kThreadNetworkDirectoryCluster; + entries.push_back(entry); + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries), CHIP_NO_ERROR); + + // also test a cluster on endpoint 1 that isnt in the special allowed list + entries.clear(); + entry.clusterId = kOnOffCluster; + entries.push_back(entry); + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries), CHIP_ERROR_INVALID_ARGUMENT); +} + +TEST_F(TestAccessRestriction, InvalidRestrictionsOnEndpointOneTest) +{ + std::vector entries; + AccessRestrictionProvider::Entry entry; + entry.endpointNumber = 1; + entry.fabricIndex = 1; + entry.restrictions.push_back({ .restrictionType = AccessRestrictionProvider::Type::kAttributeAccessForbidden }); + entry.clusterId = kOnOffCluster; + entries.push_back(entry); + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries), CHIP_ERROR_INVALID_ARGUMENT); +} + +constexpr CheckData accessAttributeRestrictionTestData[] = { + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kAttributeWriteRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = false }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kAttributeReadRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = false }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kCommandInvokeRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kEventReadRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, +}; + +TEST_F(TestAccessRestriction, AccessAttributeRestrictionTest) +{ + std::vector entries; + AccessRestrictionProvider::Entry entry; + entry.fabricIndex = 1; + entry.endpointNumber = 1; + entry.clusterId = kWiFiNetworkManagementCluster; + entry.restrictions.push_back({ .restrictionType = AccessRestrictionProvider::Type::kAttributeAccessForbidden }); + + // test wildcarded entity id + entries.push_back(entry); + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries), CHIP_NO_ERROR); + RunChecks(accessAttributeRestrictionTestData, ArraySize(accessAttributeRestrictionTestData)); + + // test specific entity id + entries.clear(); + entry.restrictions[0].id.SetValue(1); + entries.push_back(entry); + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries), CHIP_NO_ERROR); + RunChecks(accessAttributeRestrictionTestData, ArraySize(accessAttributeRestrictionTestData)); +} + +constexpr CheckData writeAttributeRestrictionTestData[] = { + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kAttributeWriteRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = false }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kAttributeReadRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kCommandInvokeRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kEventReadRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, +}; + +TEST_F(TestAccessRestriction, WriteAttributeRestrictionTest) +{ + std::vector entries; + AccessRestrictionProvider::Entry entry; + entry.fabricIndex = 1; + entry.endpointNumber = 1; + entry.clusterId = kWiFiNetworkManagementCluster; + entry.restrictions.push_back({ .restrictionType = AccessRestrictionProvider::Type::kAttributeWriteForbidden }); + + // test wildcarded entity id + entries.push_back(entry); + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries), CHIP_NO_ERROR); + RunChecks(writeAttributeRestrictionTestData, ArraySize(writeAttributeRestrictionTestData)); + + // test specific entity id + entries.clear(); + entry.restrictions[0].id.SetValue(1); + entries.push_back(entry); + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries), CHIP_NO_ERROR); + RunChecks(writeAttributeRestrictionTestData, ArraySize(writeAttributeRestrictionTestData)); +} + +constexpr CheckData commandAttributeRestrictionTestData[] = { + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kAttributeWriteRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kAttributeReadRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kCommandInvokeRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = false }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kEventReadRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, +}; + +TEST_F(TestAccessRestriction, CommandRestrictionTest) +{ + std::vector entries; + AccessRestrictionProvider::Entry entry; + entry.fabricIndex = 1; + entry.endpointNumber = 1; + entry.clusterId = kWiFiNetworkManagementCluster; + entry.restrictions.push_back({ .restrictionType = AccessRestrictionProvider::Type::kCommandForbidden }); + + // test wildcarded entity id + entries.push_back(entry); + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries), CHIP_NO_ERROR); + RunChecks(commandAttributeRestrictionTestData, ArraySize(commandAttributeRestrictionTestData)); + + // test specific entity id + entries.clear(); + entry.restrictions[0].id.SetValue(1); + entries.push_back(entry); + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries), CHIP_NO_ERROR); + RunChecks(commandAttributeRestrictionTestData, ArraySize(commandAttributeRestrictionTestData)); +} + +constexpr CheckData eventAttributeRestrictionTestData[] = { + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kAttributeWriteRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kAttributeReadRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kCommandInvokeRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kEventReadRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = false }, +}; + +TEST_F(TestAccessRestriction, EventRestrictionTest) +{ + std::vector entries; + AccessRestrictionProvider::Entry entry; + entry.fabricIndex = 1; + entry.endpointNumber = 1; + entry.clusterId = kWiFiNetworkManagementCluster; + entry.restrictions.push_back({ .restrictionType = AccessRestrictionProvider::Type::kEventForbidden }); + + // test wildcarded entity id + entries.push_back(entry); + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries), CHIP_NO_ERROR); + RunChecks(eventAttributeRestrictionTestData, ArraySize(eventAttributeRestrictionTestData)); + + // test specific entity id + entries.clear(); + entry.restrictions[0].id.SetValue(1); + entries.push_back(entry); + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries), CHIP_NO_ERROR); + RunChecks(eventAttributeRestrictionTestData, ArraySize(eventAttributeRestrictionTestData)); +} + +constexpr CheckData combinedRestrictionTestData[] = { + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kAttributeWriteRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = false }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kAttributeReadRequest, + .entityId = 2 }, + .privilege = Privilege::kAdminister, + .allow = false }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kAttributeWriteRequest, + .entityId = 3 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kAttributeReadRequest, + .entityId = 4 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kAttributeReadRequest, + .entityId = 3 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kCommandInvokeRequest, + .entityId = 4 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 1, .authMode = AuthMode::kCase, .subject = kOperationalNodeId1 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kEventReadRequest, + .entityId = 5 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 2, .authMode = AuthMode::kCase, .subject = kOperationalNodeId2 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kCommandInvokeRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = false }, + { .subjectDescriptor = { .fabricIndex = 2, .authMode = AuthMode::kCase, .subject = kOperationalNodeId2 }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kAttributeWriteRequest, + .entityId = 2 }, + .privilege = Privilege::kAdminister, + .allow = true }, +}; + +TEST_F(TestAccessRestriction, CombinedRestrictionTest) +{ + // a restriction for all access to attribute 1 and 2, attributes 3 and 4 are allowed + std::vector entries1; + AccessRestrictionProvider::Entry entry1; + entry1.fabricIndex = 1; + entry1.endpointNumber = 1; + entry1.clusterId = kWiFiNetworkManagementCluster; + entry1.restrictions.push_back({ .restrictionType = AccessRestrictionProvider::Type::kAttributeWriteForbidden }); + entry1.restrictions[0].id.SetValue(1); + entry1.restrictions.push_back({ .restrictionType = AccessRestrictionProvider::Type::kAttributeAccessForbidden }); + entry1.restrictions[1].id.SetValue(2); + entries1.push_back(entry1); + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries1), CHIP_NO_ERROR); + + // a restriction for fabric 2 that forbids command 1 and 2. Check that command 1 is blocked on invoke, but attribute 2 write is + // allowed + std::vector entries2; + AccessRestrictionProvider::Entry entry2; + entry2.fabricIndex = 2; + entry2.endpointNumber = 1; + entry2.clusterId = kWiFiNetworkManagementCluster; + entry2.restrictions.push_back({ .restrictionType = AccessRestrictionProvider::Type::kCommandForbidden }); + entry2.restrictions[0].id.SetValue(1); + entry2.restrictions.push_back({ .restrictionType = AccessRestrictionProvider::Type::kCommandForbidden }); + entry2.restrictions[1].id.SetValue(2); + entries2.push_back(entry2); + EXPECT_EQ(accessRestrictionProvider.SetEntries(2, entries2), CHIP_NO_ERROR); + + RunChecks(combinedRestrictionTestData, ArraySize(combinedRestrictionTestData)); +} + +TEST_F(TestAccessRestriction, AttributeStorageSeperationTest) +{ + std::vector commissioningEntries; + AccessRestrictionProvider::Entry entry1; + entry1.fabricIndex = 1; + entry1.endpointNumber = 1; + entry1.clusterId = kWiFiNetworkManagementCluster; + entry1.restrictions.push_back({ .restrictionType = AccessRestrictionProvider::Type::kAttributeWriteForbidden }); + entry1.restrictions[0].id.SetValue(1); + commissioningEntries.push_back(entry1); + EXPECT_EQ(accessRestrictionProvider.SetCommissioningEntries(commissioningEntries), CHIP_NO_ERROR); + + std::vector entries; + AccessRestrictionProvider::Entry entry2; + entry2.fabricIndex = 2; + entry2.endpointNumber = 2; + entry2.clusterId = kThreadBorderRouterMgmtCluster; + entry2.restrictions.push_back({ .restrictionType = AccessRestrictionProvider::Type::kCommandForbidden }); + entry2.restrictions[0].id.SetValue(2); + entries.push_back(entry2); + EXPECT_EQ(accessRestrictionProvider.SetEntries(2, entries), CHIP_NO_ERROR); + + auto commissioningEntriesFetched = accessRestrictionProvider.GetCommissioningEntries(); + std::vector arlEntriesFetched; + EXPECT_EQ(accessRestrictionProvider.GetEntries(2, arlEntriesFetched), CHIP_NO_ERROR); + EXPECT_EQ(commissioningEntriesFetched[0], entry1); + EXPECT_EQ(commissioningEntriesFetched.size(), static_cast(1)); + EXPECT_EQ(arlEntriesFetched[0], entry2); + EXPECT_EQ(arlEntriesFetched.size(), static_cast(1)); + EXPECT_FALSE(commissioningEntriesFetched[0] == arlEntriesFetched[0]); +} + +constexpr CheckData listSelectionDuringCommissioningData[] = { + { .subjectDescriptor = { .fabricIndex = 1, + .authMode = AuthMode::kCase, + .subject = kOperationalNodeId1, + .isCommissioning = true }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kAttributeReadRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, + { .subjectDescriptor = { .fabricIndex = 1, + .authMode = AuthMode::kCase, + .subject = kOperationalNodeId1, + .isCommissioning = true }, + .requestPath = { .cluster = kThreadBorderRouterMgmtCluster, + .endpoint = 1, + .requestType = RequestType::kAttributeReadRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = false }, + { .subjectDescriptor = { .fabricIndex = 1, + .authMode = AuthMode::kCase, + .subject = kOperationalNodeId1, + .isCommissioning = false }, + .requestPath = { .cluster = kWiFiNetworkManagementCluster, + .endpoint = 1, + .requestType = RequestType::kAttributeReadRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = false }, + { .subjectDescriptor = { .fabricIndex = 1, + .authMode = AuthMode::kCase, + .subject = kOperationalNodeId1, + .isCommissioning = false }, + .requestPath = { .cluster = kThreadBorderRouterMgmtCluster, + .endpoint = 1, + .requestType = RequestType::kAttributeReadRequest, + .entityId = 1 }, + .privilege = Privilege::kAdminister, + .allow = true }, +}; + +TEST_F(TestAccessRestriction, ListSelectiondDuringCommissioningTest) +{ + // during commissioning, read is allowed on WifiNetworkManagement and disallowed on ThreadBorderRouterMgmt + // after commissioning, read is disallowed on WifiNetworkManagement and allowed on ThreadBorderRouterMgmt + + std::vector entries; + AccessRestrictionProvider::Entry entry1; + entry1.fabricIndex = 1; + entry1.endpointNumber = 1; + entry1.clusterId = kThreadBorderRouterMgmtCluster; + entry1.restrictions.push_back({ .restrictionType = AccessRestrictionProvider::Type::kAttributeAccessForbidden }); + entry1.restrictions[0].id.SetValue(1); + entries.push_back(entry1); + EXPECT_EQ(accessRestrictionProvider.SetCommissioningEntries(entries), CHIP_NO_ERROR); + + entries.clear(); + AccessRestrictionProvider::Entry entry2; + entry2.fabricIndex = 1; + entry2.endpointNumber = 1; + entry2.clusterId = kWiFiNetworkManagementCluster; + entry2.restrictions.push_back({ .restrictionType = AccessRestrictionProvider::Type::kAttributeAccessForbidden }); + entry2.restrictions[0].id.SetValue(1); + entries.push_back(entry2); + EXPECT_EQ(accessRestrictionProvider.SetEntries(1, entries), CHIP_NO_ERROR); + + RunChecks(listSelectionDuringCommissioningData, ArraySize(listSelectionDuringCommissioningData)); +} + +} // namespace Access +} // namespace chip diff --git a/src/app/AttributePathParams.h b/src/app/AttributePathParams.h index ff1de58cbe91b0..dc3b71236d25c1 100644 --- a/src/app/AttributePathParams.h +++ b/src/app/AttributePathParams.h @@ -30,6 +30,12 @@ class ReadClient; #endif // CHIP_CONFIG_ENABLE_READ_CLIENT struct AttributePathParams { + AttributePathParams() = default; + + explicit AttributePathParams(EndpointId aEndpointId) : + AttributePathParams(aEndpointId, kInvalidClusterId, kInvalidAttributeId, kInvalidListIndex) + {} + // // TODO: (Issue #10596) Need to ensure that we do not encode the NodeId over the wire // if it is either not 'set', or is set to a value that matches accessing fabric @@ -50,9 +56,10 @@ struct AttributePathParams mClusterId(aClusterId), mAttributeId(aAttributeId), mEndpointId(aEndpointId), mListIndex(aListIndex) {} - AttributePathParams() {} - - bool IsWildcardPath() const { return HasWildcardEndpointId() || HasWildcardClusterId() || HasWildcardAttributeId(); } + [[nodiscard]] bool IsWildcardPath() const + { + return HasWildcardEndpointId() || HasWildcardClusterId() || HasWildcardAttributeId(); + } bool operator==(const AttributePathParams & aOther) const { @@ -66,12 +73,12 @@ struct AttributePathParams * be wildcard. This does not verify that the attribute being targeted is actually of list type when the list index is not * wildcard. */ - bool IsValidAttributePath() const { return HasWildcardListIndex() || !HasWildcardAttributeId(); } + [[nodiscard]] bool IsValidAttributePath() const { return HasWildcardListIndex() || !HasWildcardAttributeId(); } - inline bool HasWildcardEndpointId() const { return mEndpointId == kInvalidEndpointId; } - inline bool HasWildcardClusterId() const { return mClusterId == kInvalidClusterId; } - inline bool HasWildcardAttributeId() const { return mAttributeId == kInvalidAttributeId; } - inline bool HasWildcardListIndex() const { return mListIndex == kInvalidListIndex; } + [[nodiscard]] inline bool HasWildcardEndpointId() const { return mEndpointId == kInvalidEndpointId; } + [[nodiscard]] inline bool HasWildcardClusterId() const { return mClusterId == kInvalidClusterId; } + [[nodiscard]] inline bool HasWildcardAttributeId() const { return mAttributeId == kInvalidAttributeId; } + [[nodiscard]] inline bool HasWildcardListIndex() const { return mListIndex == kInvalidListIndex; } inline void SetWildcardEndpointId() { mEndpointId = kInvalidEndpointId; } inline void SetWildcardClusterId() { mClusterId = kInvalidClusterId; } inline void SetWildcardAttributeId() @@ -80,7 +87,7 @@ struct AttributePathParams mListIndex = kInvalidListIndex; } - bool IsAttributePathSupersetOf(const AttributePathParams & other) const + [[nodiscard]] bool IsAttributePathSupersetOf(const AttributePathParams & other) const { VerifyOrReturnError(HasWildcardEndpointId() || mEndpointId == other.mEndpointId, false); VerifyOrReturnError(HasWildcardClusterId() || mClusterId == other.mClusterId, false); @@ -90,7 +97,7 @@ struct AttributePathParams return true; } - bool IsAttributePathSupersetOf(const ConcreteAttributePath & other) const + [[nodiscard]] bool IsAttributePathSupersetOf(const ConcreteAttributePath & other) const { VerifyOrReturnError(HasWildcardEndpointId() || mEndpointId == other.mEndpointId, false); VerifyOrReturnError(HasWildcardClusterId() || mClusterId == other.mClusterId, false); diff --git a/src/app/BUILD.gn b/src/app/BUILD.gn index 53dd3876c12410..8327bef57008aa 100644 --- a/src/app/BUILD.gn +++ b/src/app/BUILD.gn @@ -78,6 +78,7 @@ buildconfig_header("app_buildconfig") { "NON_SPEC_COMPLIANT_OTA_ACTION_DELAY_FLOOR=${non_spec_compliant_ota_action_delay_floor}", "CHIP_DEVICE_CONFIG_DYNAMIC_SERVER=${chip_build_controller_dynamic_server}", "CHIP_CONFIG_ENABLE_BUSY_HANDLING_FOR_OPERATIONAL_SESSION_SETUP=${chip_enable_busy_handling_for_operational_session_setup}", + "CHIP_CONFIG_DATA_MODEL_CHECK_DIE_ON_FAILURE=${chip_data_model_check_die_on_failure}", ] if (chip_use_data_model_interface == "disabled") { diff --git a/src/app/CommandHandlerImpl.cpp b/src/app/CommandHandlerImpl.cpp index 1945e7e5e69dc3..366199a3b9f1d4 100644 --- a/src/app/CommandHandlerImpl.cpp +++ b/src/app/CommandHandlerImpl.cpp @@ -410,12 +410,13 @@ Status CommandHandlerImpl::ProcessCommandDataIB(CommandDataIB::Parser & aCommand err = Access::GetAccessControl().Check(subjectDescriptor, requestPath, requestPrivilege); if (err != CHIP_NO_ERROR) { - if (err != CHIP_ERROR_ACCESS_DENIED) + if ((err != CHIP_ERROR_ACCESS_DENIED) && (err != CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL)) { return FallibleAddStatus(concretePath, Status::Failure) != CHIP_NO_ERROR ? Status::Failure : Status::Success; } // TODO: when wildcard invokes are supported, handle them to discard rather than fail with status - return FallibleAddStatus(concretePath, Status::UnsupportedAccess) != CHIP_NO_ERROR ? Status::Failure : Status::Success; + Status status = err == CHIP_ERROR_ACCESS_DENIED ? Status::UnsupportedAccess : Status::AccessRestricted; + return FallibleAddStatus(concretePath, status) != CHIP_NO_ERROR ? Status::Failure : Status::Success; } } diff --git a/src/app/CommandHandlerImpl.h b/src/app/CommandHandlerImpl.h index 55e356bcceb35a..ddd499658e15d9 100644 --- a/src/app/CommandHandlerImpl.h +++ b/src/app/CommandHandlerImpl.h @@ -294,7 +294,12 @@ class CommandHandlerImpl : public CommandHandler { return CHIP_NO_ERROR; } - ReturnErrorOnFailure(RollbackResponse()); + // The error value of RollbackResponse is not important if it fails, we prioritize + // conveying the error generated by addResponseFunction to the caller. + if (RollbackResponse() != CHIP_NO_ERROR) + { + return err; + } // If we failed to add a command due to lack of space in the // packet, we will make another attempt to add the response using // an additional InvokeResponseMessage. diff --git a/src/app/EventManagement.cpp b/src/app/EventManagement.cpp index 4c5faab3cdcda4..7c0df844872b47 100644 --- a/src/app/EventManagement.cpp +++ b/src/app/EventManagement.cpp @@ -556,14 +556,16 @@ CHIP_ERROR EventManagement::CheckEventContext(EventLoadOutContext * eventLoadOut Access::RequestPath requestPath{ .cluster = event.mClusterId, .endpoint = event.mEndpointId, - .requestType = Access::RequestType::kEventReadOrSubscribeRequest, + .requestType = Access::RequestType::kEventReadRequest, .entityId = event.mEventId }; Access::Privilege requestPrivilege = RequiredPrivilege::ForReadEvent(path); CHIP_ERROR accessControlError = Access::GetAccessControl().Check(eventLoadOutContext->mSubjectDescriptor, requestPath, requestPrivilege); if (accessControlError != CHIP_NO_ERROR) { - ReturnErrorCodeIf(accessControlError != CHIP_ERROR_ACCESS_DENIED, accessControlError); + ReturnErrorCodeIf((accessControlError != CHIP_ERROR_ACCESS_DENIED) && + (accessControlError != CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL), + accessControlError); ret = CHIP_ERROR_UNEXPECTED_EVENT; } diff --git a/src/app/InteractionModelEngine.cpp b/src/app/InteractionModelEngine.cpp index 64d30bc6c0e42f..88c1777b6c8224 100644 --- a/src/app/InteractionModelEngine.cpp +++ b/src/app/InteractionModelEngine.cpp @@ -544,7 +544,7 @@ static bool CanAccessEvent(const Access::SubjectDescriptor & aSubjectDescriptor, { Access::RequestPath requestPath{ .cluster = aPath.mClusterId, .endpoint = aPath.mEndpointId, - .requestType = Access::RequestType::kEventReadOrSubscribeRequest }; + .requestType = Access::RequestType::kEventReadRequest }; // leave requestPath.entityId optional value unset to indicate wildcard CHIP_ERROR err = Access::GetAccessControl().Check(aSubjectDescriptor, requestPath, aNeededPrivilege); return (err == CHIP_NO_ERROR); @@ -555,7 +555,7 @@ static bool CanAccessEvent(const Access::SubjectDescriptor & aSubjectDescriptor, { Access::RequestPath requestPath{ .cluster = aPath.mClusterId, .endpoint = aPath.mEndpointId, - .requestType = Access::RequestType::kEventReadOrSubscribeRequest, + .requestType = Access::RequestType::kEventReadRequest, .entityId = aPath.mEventId }; CHIP_ERROR err = Access::GetAccessControl().Check(aSubjectDescriptor, requestPath, RequiredPrivilege::ForReadEvent(aPath)); return (err == CHIP_NO_ERROR); diff --git a/src/app/chip_data_model.gni b/src/app/chip_data_model.gni index 01d47a47cb7184..c8907ac98b3d79 100644 --- a/src/app/chip_data_model.gni +++ b/src/app/chip_data_model.gni @@ -403,8 +403,9 @@ template("chip_data_model") { "${_app_root}/clusters/${cluster}/${cluster}.cpp", "${_app_root}/clusters/${cluster}/${cluster}.h", "${_app_root}/clusters/${cluster}/service-area-cluster-objects.h", - "${_app_root}/clusters/${cluster}/service-area-delegate.cpp", "${_app_root}/clusters/${cluster}/service-area-delegate.h", + "${_app_root}/clusters/${cluster}/service-area-storage-delegate.cpp", + "${_app_root}/clusters/${cluster}/service-area-storage-delegate.h", ] } else if (cluster == "thread-border-router-management-server") { sources += [ @@ -436,6 +437,12 @@ template("chip_data_model") { "${_app_root}/clusters/${cluster}/PresetStructWithOwnedMembers.h", "${_app_root}/clusters/${cluster}/thermostat-delegate.h", ] + } else if (cluster == "access-control-server") { + sources += [ + "${_app_root}/clusters/${cluster}/${cluster}.cpp", + "${_app_root}/clusters/${cluster}/ArlEncoder.cpp", + "${_app_root}/clusters/${cluster}/ArlEncoder.h", + ] } else { sources += [ "${_app_root}/clusters/${cluster}/${cluster}.cpp" ] } diff --git a/src/app/clusters/access-control-server/ArlEncoder.cpp b/src/app/clusters/access-control-server/ArlEncoder.cpp new file mode 100644 index 00000000000000..810c7345a13c7e --- /dev/null +++ b/src/app/clusters/access-control-server/ArlEncoder.cpp @@ -0,0 +1,145 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "ArlEncoder.h" + +using namespace chip; +using namespace chip::app; +using namespace chip::Access; + +using Entry = AccessRestrictionProvider::Entry; +using EntryListener = AccessRestrictionProvider::Listener; +using StagingRestrictionType = Clusters::AccessControl::AccessRestrictionTypeEnum; +using StagingRestriction = Clusters::AccessControl::Structs::AccessRestrictionStruct::Type; + +namespace { + +CHIP_ERROR StageEntryRestrictions(const std::vector & source, + StagingRestriction destination[], size_t destinationCount) +{ + size_t count = source.size(); + if (count > 0 && count <= destinationCount) + { + for (size_t i = 0; i < count; i++) + { + const auto & restriction = source[i]; + ReturnErrorOnFailure(ArlEncoder::Convert(restriction.restrictionType, destination[i].type)); + + if (restriction.id.HasValue()) + { + destination[i].id.SetNonNull(restriction.id.Value()); + } + } + } + else + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + return CHIP_NO_ERROR; +} + +} // namespace + +namespace chip { +namespace app { + +CHIP_ERROR ArlEncoder::Convert(Clusters::AccessControl::AccessRestrictionTypeEnum from, + Access::AccessRestrictionProvider::Type & to) +{ + switch (from) + { + case StagingRestrictionType::kAttributeAccessForbidden: + to = AccessRestrictionProvider::Type::kAttributeAccessForbidden; + break; + case StagingRestrictionType::kAttributeWriteForbidden: + to = AccessRestrictionProvider::Type::kAttributeWriteForbidden; + break; + case StagingRestrictionType::kCommandForbidden: + to = AccessRestrictionProvider::Type::kCommandForbidden; + break; + case StagingRestrictionType::kEventForbidden: + to = AccessRestrictionProvider::Type::kEventForbidden; + break; + default: + return CHIP_ERROR_INVALID_ARGUMENT; + } + return CHIP_NO_ERROR; +} + +CHIP_ERROR ArlEncoder::Convert(Access::AccessRestrictionProvider::Type from, + Clusters::AccessControl::AccessRestrictionTypeEnum & to) +{ + switch (from) + { + case AccessRestrictionProvider::Type::kAttributeAccessForbidden: + to = StagingRestrictionType::kAttributeAccessForbidden; + break; + case AccessRestrictionProvider::Type::kAttributeWriteForbidden: + to = StagingRestrictionType::kAttributeWriteForbidden; + break; + case AccessRestrictionProvider::Type::kCommandForbidden: + to = StagingRestrictionType::kCommandForbidden; + break; + case AccessRestrictionProvider::Type::kEventForbidden: + to = StagingRestrictionType::kEventForbidden; + break; + default: + return CHIP_ERROR_INVALID_ARGUMENT; + } + return CHIP_NO_ERROR; +} + +CHIP_ERROR ArlEncoder::CommissioningEncodableEntry::Encode(TLV::TLVWriter & writer, TLV::Tag tag) const +{ + ReturnErrorOnFailure(Stage()); + ReturnErrorOnFailure(mStagingEntry.Encode(writer, tag)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR ArlEncoder::EncodableEntry::EncodeForRead(TLV::TLVWriter & writer, TLV::Tag tag, FabricIndex fabric) const +{ + ReturnErrorOnFailure(Stage()); + ReturnErrorOnFailure(mStagingEntry.EncodeForRead(writer, tag, fabric)); + return CHIP_NO_ERROR; +} + +CHIP_ERROR ArlEncoder::CommissioningEncodableEntry::Stage() const +{ + mStagingEntry.endpoint = mEntry.endpointNumber; + mStagingEntry.cluster = mEntry.clusterId; + ReturnErrorOnFailure(StageEntryRestrictions(mEntry.restrictions, mStagingRestrictions, + sizeof(mStagingRestrictions) / sizeof(mStagingRestrictions[0]))); + mStagingEntry.restrictions = Span(mStagingRestrictions, mEntry.restrictions.size()); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR ArlEncoder::EncodableEntry::Stage() const +{ + mStagingEntry.fabricIndex = mEntry.fabricIndex; + mStagingEntry.endpoint = mEntry.endpointNumber; + mStagingEntry.cluster = mEntry.clusterId; + ReturnErrorOnFailure(StageEntryRestrictions(mEntry.restrictions, mStagingRestrictions, + sizeof(mStagingRestrictions) / sizeof(mStagingRestrictions[0]))); + mStagingEntry.restrictions = Span(mStagingRestrictions, mEntry.restrictions.size()); + + return CHIP_NO_ERROR; +} + +} // namespace app +} // namespace chip diff --git a/src/app/clusters/access-control-server/ArlEncoder.h b/src/app/clusters/access-control-server/ArlEncoder.h new file mode 100644 index 00000000000000..8050bf4d739db6 --- /dev/null +++ b/src/app/clusters/access-control-server/ArlEncoder.h @@ -0,0 +1,113 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include + +namespace chip { +namespace app { + +/** + * This class provides facilities for converting between access restriction + * entries (as used by the system module) and access restriction entries (as used + * by the generated cluster code). + */ +class ArlEncoder +{ +public: + ArlEncoder() = default; + ~ArlEncoder() = default; + + static CHIP_ERROR Convert(Clusters::AccessControl::AccessRestrictionTypeEnum from, + Access::AccessRestrictionProvider::Type & to); + + static CHIP_ERROR Convert(Access::AccessRestrictionProvider::Type from, + Clusters::AccessControl::AccessRestrictionTypeEnum & to); + + /** + * Used for encoding commissionable access restriction entries. + * + * Typically used temporarily on the stack to encode: + * - source: system level access restriction entry + * - staging: generated cluster level code + */ + class CommissioningEncodableEntry + { + using Entry = Access::AccessRestrictionProvider::Entry; + using StagingEntry = Clusters::AccessControl::Structs::CommissioningAccessRestrictionEntryStruct::Type; + using StagingRestriction = Clusters::AccessControl::Structs::AccessRestrictionStruct::Type; + + public: + CommissioningEncodableEntry(const Entry & entry) : mEntry(entry) {} + + /** + * Encode the constructor-provided entry into the TLV writer. + */ + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; + + static constexpr bool kIsFabricScoped = false; + + private: + CHIP_ERROR Stage() const; + + Entry mEntry; + mutable StagingEntry mStagingEntry; + mutable StagingRestriction mStagingRestrictions[CHIP_CONFIG_ACCESS_RESTRICTION_MAX_RESTRICTIONS_PER_ENTRY]; + }; + + /** + * Used for encoding access restriction entries. + * + * Typically used temporarily on the stack to encode: + * - source: system level access restriction entry + * - staging: generated cluster level code + */ + class EncodableEntry + { + using Entry = Access::AccessRestrictionProvider::Entry; + using StagingEntry = Clusters::AccessControl::Structs::AccessRestrictionEntryStruct::Type; + using StagingRestriction = Clusters::AccessControl::Structs::AccessRestrictionStruct::Type; + + public: + EncodableEntry(const Entry & entry) : mEntry(entry) {} + + /** + * Encode the constructor-provided entry into the TLV writer. + */ + CHIP_ERROR EncodeForRead(TLV::TLVWriter & writer, TLV::Tag tag, FabricIndex fabric) const; + + FabricIndex GetFabricIndex() const { return mEntry.fabricIndex; } + + static constexpr bool kIsFabricScoped = true; + + private: + /** + * Constructor-provided entry is staged into a staging entry. + */ + CHIP_ERROR Stage() const; + + Entry mEntry; + mutable StagingEntry mStagingEntry; + mutable StagingRestriction mStagingRestrictions[CHIP_CONFIG_ACCESS_RESTRICTION_MAX_RESTRICTIONS_PER_ENTRY]; + }; +}; + +} // namespace app +} // namespace chip diff --git a/src/app/clusters/access-control-server/access-control-server.cpp b/src/app/clusters/access-control-server/access-control-server.cpp index 321f7aa92a483a..d525e555f282e6 100644 --- a/src/app/clusters/access-control-server/access-control-server.cpp +++ b/src/app/clusters/access-control-server/access-control-server.cpp @@ -17,6 +17,11 @@ #include +#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS +#include "ArlEncoder.h" +#include +#endif + #include #include @@ -25,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -41,6 +47,10 @@ using Entry = AccessControl::Entry; using EntryListener = AccessControl::EntryListener; using ExtensionEvent = Clusters::AccessControl::Events::AccessControlExtensionChanged::Type; +#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS +using ArlReviewEvent = Clusters::AccessControl::Events::FabricRestrictionReviewUpdate::Type; +#endif + // TODO(#13590): generated code doesn't automatically handle max length so do it manually constexpr int kExtensionDataMaxLength = 128; @@ -48,7 +58,12 @@ constexpr uint16_t kClusterRevision = 1; namespace { -class AccessControlAttribute : public AttributeAccessInterface, public EntryListener +class AccessControlAttribute : public AttributeAccessInterface, + public AccessControl::EntryListener +#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS + , + public AccessRestrictionProvider::Listener +#endif { public: AccessControlAttribute() : AttributeAccessInterface(Optional(0), AccessControlCluster::Id) {} @@ -64,8 +79,17 @@ class AccessControlAttribute : public AttributeAccessInterface, public EntryList CHIP_ERROR Write(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder) override; public: - void OnEntryChanged(const SubjectDescriptor * subjectDescriptor, FabricIndex fabric, size_t index, const Entry * entry, - ChangeType changeType) override; + void OnEntryChanged(const SubjectDescriptor * subjectDescriptor, FabricIndex fabric, size_t index, + const AccessControl::Entry * entry, AccessControl::EntryListener::ChangeType changeType) override; + +#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS + void MarkCommissioningRestrictionListChanged() override; + + void MarkRestrictionListChanged(FabricIndex fabricIndex) override; + + void OnFabricRestrictionReviewUpdate(FabricIndex fabricIndex, uint64_t token, Optional instruction, + Optional arlRequestFlowUrl) override; +#endif private: /// Business logic implementation of write, returns generic CHIP_ERROR. @@ -78,6 +102,10 @@ class AccessControlAttribute : public AttributeAccessInterface, public EntryList CHIP_ERROR ReadExtension(AttributeValueEncoder & aEncoder); CHIP_ERROR WriteAcl(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder); CHIP_ERROR WriteExtension(const ConcreteDataAttributePath & aPath, AttributeValueDecoder & aDecoder); +#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS + CHIP_ERROR ReadCommissioningArl(AttributeValueEncoder & aEncoder); + CHIP_ERROR ReadArl(AttributeValueEncoder & aEncoder); +#endif } sAttribute; CHIP_ERROR LogExtensionChangedEvent(const AccessControlCluster::Structs::AccessControlExtensionStruct::Type & item, @@ -114,8 +142,8 @@ CHIP_ERROR CheckExtensionEntryDataFormat(const ByteSpan & data) TLV::TLVReader reader; reader.Init(data); - auto containerType = chip::TLV::kTLVType_List; - err = reader.Next(containerType, chip::TLV::AnonymousTag()); + auto containerType = TLV::kTLVType_List; + err = reader.Next(containerType, TLV::AnonymousTag()); VerifyOrReturnError(err == CHIP_NO_ERROR, CHIP_IM_GLOBAL_STATUS(ConstraintError)); err = reader.EnterContainer(containerType); @@ -123,7 +151,7 @@ CHIP_ERROR CheckExtensionEntryDataFormat(const ByteSpan & data) while ((err = reader.Next()) == CHIP_NO_ERROR) { - VerifyOrReturnError(chip::TLV::IsProfileTag(reader.GetTag()), CHIP_IM_GLOBAL_STATUS(ConstraintError)); + VerifyOrReturnError(TLV::IsProfileTag(reader.GetTag()), CHIP_IM_GLOBAL_STATUS(ConstraintError)); } VerifyOrReturnError(err == CHIP_END_OF_TLV, CHIP_IM_GLOBAL_STATUS(ConstraintError)); @@ -159,6 +187,12 @@ CHIP_ERROR AccessControlAttribute::ReadImpl(const ConcreteReadAttributePath & aP ReturnErrorOnFailure(GetAccessControl().GetMaxEntriesPerFabric(value)); return aEncoder.Encode(static_cast(value)); } +#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS + case AccessControlCluster::Attributes::CommissioningARL::Id: + return ReadCommissioningArl(aEncoder); + case AccessControlCluster::Attributes::Arl::Id: + return ReadArl(aEncoder); +#endif case AccessControlCluster::Attributes::ClusterRevision::Id: return aEncoder.Encode(kClusterRevision); } @@ -375,7 +409,7 @@ CHIP_ERROR AccessControlAttribute::WriteExtension(const ConcreteDataAttributePat } void AccessControlAttribute::OnEntryChanged(const SubjectDescriptor * subjectDescriptor, FabricIndex fabric, size_t index, - const Entry * entry, ChangeType changeType) + const AccessControl::Entry * entry, AccessControl::EntryListener::ChangeType changeType) { // NOTE: If the entry was changed internally by the system (e.g. creating // entries at startup from persistent storage, or deleting entries when a @@ -389,11 +423,11 @@ void AccessControlAttribute::OnEntryChanged(const SubjectDescriptor * subjectDes CHIP_ERROR err; AclEvent event{ .changeType = ChangeTypeEnum::kChanged, .fabricIndex = subjectDescriptor->fabricIndex }; - if (changeType == ChangeType::kAdded) + if (changeType == AccessControl::EntryListener::ChangeType::kAdded) { event.changeType = ChangeTypeEnum::kAdded; } - else if (changeType == ChangeType::kRemoved) + else if (changeType == AccessControl::EntryListener::ChangeType::kRemoved) { event.changeType = ChangeTypeEnum::kRemoved; } @@ -428,6 +462,79 @@ void AccessControlAttribute::OnEntryChanged(const SubjectDescriptor * subjectDes ChipLogError(DataManagement, "AccessControlCluster: event failed %" CHIP_ERROR_FORMAT, err.Format()); } +#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS +CHIP_ERROR AccessControlAttribute::ReadCommissioningArl(AttributeValueEncoder & aEncoder) +{ + auto accessRestrictionProvider = GetAccessControl().GetAccessRestrictionProvider(); + + return aEncoder.EncodeList([&](const auto & encoder) -> CHIP_ERROR { + if (accessRestrictionProvider != nullptr) + { + auto entries = accessRestrictionProvider->GetCommissioningEntries(); + + for (auto & entry : entries) + { + ArlEncoder::CommissioningEncodableEntry encodableEntry(entry); + ReturnErrorOnFailure(encoder.Encode(encodableEntry)); + } + } + return CHIP_NO_ERROR; + }); +} + +CHIP_ERROR AccessControlAttribute::ReadArl(AttributeValueEncoder & aEncoder) +{ + auto accessRestrictionProvider = GetAccessControl().GetAccessRestrictionProvider(); + + return aEncoder.EncodeList([&](const auto & encoder) -> CHIP_ERROR { + if (accessRestrictionProvider != nullptr) + { + for (const auto & info : Server::GetInstance().GetFabricTable()) + { + auto fabric = info.GetFabricIndex(); + // get entries for fabric + std::vector entries; + ReturnErrorOnFailure(accessRestrictionProvider->GetEntries(fabric, entries)); + for (const auto & entry : entries) + { + ArlEncoder::EncodableEntry encodableEntry(entry); + ReturnErrorOnFailure(encoder.Encode(encodableEntry)); + } + } + } + return CHIP_NO_ERROR; + }); +} +void AccessControlAttribute::MarkCommissioningRestrictionListChanged() +{ + MatterReportingAttributeChangeCallback(kRootEndpointId, AccessControlCluster::Id, + AccessControlCluster::Attributes::CommissioningARL::Id); +} + +void AccessControlAttribute::MarkRestrictionListChanged(FabricIndex fabricIndex) +{ + MatterReportingAttributeChangeCallback(kRootEndpointId, AccessControlCluster::Id, AccessControlCluster::Attributes::Arl::Id); +} + +void AccessControlAttribute::OnFabricRestrictionReviewUpdate(FabricIndex fabricIndex, uint64_t token, + Optional instruction, Optional arlRequestFlowUrl) +{ + CHIP_ERROR err; + ArlReviewEvent event{ .token = token, .fabricIndex = fabricIndex }; + + event.instruction = instruction; + event.ARLRequestFlowUrl = arlRequestFlowUrl; + + EventNumber eventNumber; + SuccessOrExit(err = LogEvent(event, kRootEndpointId, eventNumber)); + + return; + +exit: + ChipLogError(DataManagement, "AccessControlCluster: review event failed: %" CHIP_ERROR_FORMAT, err.Format()); +} +#endif + CHIP_ERROR ChipErrorToImErrorMap(CHIP_ERROR err) { // Map some common errors into an underlying IM error @@ -481,4 +588,88 @@ void MatterAccessControlPluginServerInitCallback() AttributeAccessInterfaceRegistry::Instance().Register(&sAttribute); GetAccessControl().AddEntryListener(sAttribute); + +#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS + auto accessRestrictionProvider = GetAccessControl().GetAccessRestrictionProvider(); + if (accessRestrictionProvider != nullptr) + { + accessRestrictionProvider->AddListener(sAttribute); + } +#endif +} + +#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS +bool emberAfAccessControlClusterReviewFabricRestrictionsCallback( + CommandHandler * commandObj, const ConcreteCommandPath & commandPath, + const Clusters::AccessControl::Commands::ReviewFabricRestrictions::DecodableType & commandData) +{ + if (commandPath.mEndpointId != kRootEndpointId) + { + ChipLogError(DataManagement, "AccessControlCluster: invalid endpoint in ReviewFabricRestrictions request"); + commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::InvalidCommand); + return true; + } + + uint64_t token; + std::vector entries; + auto entryIter = commandData.arl.begin(); + while (entryIter.Next()) + { + AccessRestrictionProvider::Entry entry; + entry.fabricIndex = commandObj->GetAccessingFabricIndex(); + entry.endpointNumber = entryIter.GetValue().endpoint; + entry.clusterId = entryIter.GetValue().cluster; + + auto restrictionIter = entryIter.GetValue().restrictions.begin(); + while (restrictionIter.Next()) + { + AccessRestrictionProvider::Restriction restriction; + if (ArlEncoder::Convert(restrictionIter.GetValue().type, restriction.restrictionType) != CHIP_NO_ERROR) + { + ChipLogError(DataManagement, "AccessControlCluster: invalid restriction type conversion"); + commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::InvalidCommand); + return true; + } + + if (!restrictionIter.GetValue().id.IsNull()) + { + restriction.id.SetValue(restrictionIter.GetValue().id.Value()); + } + entry.restrictions.push_back(restriction); + } + + if (restrictionIter.GetStatus() != CHIP_NO_ERROR) + { + ChipLogError(DataManagement, "AccessControlCluster: invalid ARL data"); + commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::InvalidCommand); + return true; + } + + entries.push_back(entry); + } + + if (entryIter.GetStatus() != CHIP_NO_ERROR) + { + ChipLogError(DataManagement, "AccessControlCluster: invalid ARL data"); + commandObj->AddStatus(commandPath, Protocols::InteractionModel::Status::InvalidCommand); + return true; + } + + CHIP_ERROR err = GetAccessControl().GetAccessRestrictionProvider()->RequestFabricRestrictionReview( + commandObj->GetAccessingFabricIndex(), entries, token); + + if (err == CHIP_NO_ERROR) + { + Clusters::AccessControl::Commands::ReviewFabricRestrictionsResponse::Type response; + response.token = token; + commandObj->AddResponse(commandPath, response); + } + else + { + ChipLogError(DataManagement, "AccessControlCluster: restriction review failed: %" CHIP_ERROR_FORMAT, err.Format()); + commandObj->AddStatus(commandPath, Protocols::InteractionModel::ClusterStatusCode(err)); + } + + return true; } +#endif diff --git a/src/app/clusters/color-control-server/color-control-server.cpp b/src/app/clusters/color-control-server/color-control-server.cpp index 406d06f4b1e794..2a858884220fc9 100644 --- a/src/app/clusters/color-control-server/color-control-server.cpp +++ b/src/app/clusters/color-control-server/color-control-server.cpp @@ -15,6 +15,8 @@ * limitations under the License. */ +#include + #include "color-control-server.h" #include #include @@ -1038,7 +1040,7 @@ void ColorControlServer::startColorLoop(EndpointId endpoint, uint8_t startFromSt colorHueTransitionState->transitionTime = MAX_INT16U_VALUE; colorHueTransitionState->endpoint = endpoint; - SetQuietReportRemainingTime(endpoint, MAX_INT16U_VALUE); + SetQuietReportRemainingTime(endpoint, MAX_INT16U_VALUE, true /* isNewTransition */); scheduleTimerCallbackMs(configureHSVEventControl(endpoint), TRANSITION_UPDATE_TIME_MS.count()); } @@ -1089,7 +1091,10 @@ void ColorControlServer::SetHSVRemainingTime(chip::EndpointId endpoint) // When the hue transition is loop, RemainingTime stays at MAX_INT16 if (hueTransitionState->repeat == false) { - SetQuietReportRemainingTime(endpoint, max(hueTransitionState->timeRemaining, saturationTransitionState->timeRemaining)); + bool hsvTransitionStart = (hueTransitionState->stepsRemaining == hueTransitionState->stepsTotal) || + (saturationTransitionState->stepsRemaining == saturationTransitionState->stepsTotal); + SetQuietReportRemainingTime(endpoint, max(hueTransitionState->timeRemaining, saturationTransitionState->timeRemaining), + hsvTransitionStart); } } @@ -1482,7 +1487,7 @@ bool ColorControlServer::moveHueCommand(app::CommandHandler * commandObj, const colorHueTransitionState->repeat = true; // hue movement can last forever. Indicate this with a remaining time of maxint - SetQuietReportRemainingTime(endpoint, MAX_INT16U_VALUE); + SetQuietReportRemainingTime(endpoint, MAX_INT16U_VALUE, true /* isNewTransition */); // kick off the state machine: scheduleTimerCallbackMs(configureHSVEventControl(endpoint), TRANSITION_UPDATE_TIME_MS.count()); @@ -2050,7 +2055,7 @@ bool ColorControlServer::colorLoopCommand(app::CommandHandler * commandObj, cons uint16_t storedEnhancedHue = 0; Attributes::ColorLoopStoredEnhancedHue::Get(endpoint, &storedEnhancedHue); MarkAttributeDirty markDirty = - SetQuietReportAttribute(quietEnhancedHue[epIndex], storedEnhancedHue, true /*isStartOrEndOfTransition*/, 0); + SetQuietReportAttribute(quietEnhancedHue[epIndex], storedEnhancedHue, true /*isEndOfTransition*/, 0); Attributes::EnhancedCurrentHue::Set(endpoint, quietEnhancedHue[epIndex].value().Value(), markDirty); } else @@ -2092,10 +2097,6 @@ void ColorControlServer::updateHueSatCommand(EndpointId endpoint) uint16_t previousSaturation = colorSaturationTransitionState->currentValue; uint16_t previousEnhancedhue = colorHueTransitionState->currentEnhancedHue; - bool isHueTansitionStart = (colorHueTransitionState->stepsRemaining == colorHueTransitionState->stepsTotal); - bool isSaturationTransitionStart = - (colorSaturationTransitionState->stepsRemaining == colorSaturationTransitionState->stepsTotal); - bool isHueTansitionDone = computeNewHueValue(colorHueTransitionState); bool isSaturationTransitionDone = computeNewColor16uValue(colorSaturationTransitionState); @@ -2115,7 +2116,7 @@ void ColorControlServer::updateHueSatCommand(EndpointId endpoint) if (colorHueTransitionState->isEnhancedHue) { markDirty = SetQuietReportAttribute(quietEnhancedHue[epIndex], colorHueTransitionState->currentEnhancedHue, - (isHueTansitionStart || isHueTansitionDone), colorHueTransitionState->transitionTime); + isHueTansitionDone, colorHueTransitionState->transitionTime); Attributes::EnhancedCurrentHue::Set(endpoint, quietEnhancedHue[epIndex].value().Value(), markDirty); currentHue = static_cast(colorHueTransitionState->currentEnhancedHue >> 8); @@ -2133,8 +2134,7 @@ void ColorControlServer::updateHueSatCommand(EndpointId endpoint) } } - markDirty = SetQuietReportAttribute(quietHue[epIndex], currentHue, (isHueTansitionStart || isHueTansitionDone), - colorHueTransitionState->transitionTime); + markDirty = SetQuietReportAttribute(quietHue[epIndex], currentHue, isHueTansitionDone, colorHueTransitionState->transitionTime); Attributes::CurrentHue::Set(endpoint, quietHue[epIndex].value().Value(), markDirty); if (previousSaturation != colorSaturationTransitionState->currentValue) @@ -2143,8 +2143,7 @@ void ColorControlServer::updateHueSatCommand(EndpointId endpoint) } markDirty = SetQuietReportAttribute(quietSaturation[epIndex], colorSaturationTransitionState->currentValue, - (isSaturationTransitionStart || isSaturationTransitionDone), - colorSaturationTransitionState->transitionTime); + isSaturationTransitionDone, colorSaturationTransitionState->transitionTime); Attributes::CurrentSaturation::Set(endpoint, quietSaturation[epIndex].value().Value(), markDirty); computePwmFromHsv(endpoint); @@ -2296,7 +2295,7 @@ Status ColorControlServer::moveToColor(uint16_t colorX, uint16_t colorY, uint16_ colorYTransitionState->lowLimit = MIN_CIE_XY_VALUE; colorYTransitionState->highLimit = MAX_CIE_XY_VALUE; - SetQuietReportRemainingTime(endpoint, transitionTime); + SetQuietReportRemainingTime(endpoint, transitionTime, true /* isNewTransition */); // kick off the state machine: scheduleTimerCallbackMs(configureXYEventControl(endpoint), transitionTime ? TRANSITION_UPDATE_TIME_MS.count() : 0); @@ -2403,7 +2402,7 @@ bool ColorControlServer::moveColorCommand(app::CommandHandler * commandObj, cons colorYTransitionState->lowLimit = MIN_CIE_XY_VALUE; colorYTransitionState->highLimit = MAX_CIE_XY_VALUE; - SetQuietReportRemainingTime(endpoint, max(transitionTimeX, transitionTimeY)); + SetQuietReportRemainingTime(endpoint, max(transitionTimeX, transitionTimeY), true /* isNewTransition */); // kick off the state machine: scheduleTimerCallbackMs(configureXYEventControl(endpoint), TRANSITION_UPDATE_TIME_MS.count()); @@ -2483,7 +2482,7 @@ bool ColorControlServer::stepColorCommand(app::CommandHandler * commandObj, cons colorYTransitionState->lowLimit = MIN_CIE_XY_VALUE; colorYTransitionState->highLimit = MAX_CIE_XY_VALUE; - SetQuietReportRemainingTime(endpoint, transitionTime); + SetQuietReportRemainingTime(endpoint, transitionTime, true /* isNewTransition */); // kick off the state machine: scheduleTimerCallbackMs(configureXYEventControl(endpoint), transitionTime ? TRANSITION_UPDATE_TIME_MS.count() : 0); @@ -2519,15 +2518,10 @@ void ColorControlServer::updateXYCommand(EndpointId endpoint) scheduleTimerCallbackMs(configureXYEventControl(endpoint), TRANSITION_UPDATE_TIME_MS.count()); } - bool isXTransitionStart = (colorXTransitionState->stepsRemaining == colorXTransitionState->stepsTotal); - bool isYTransitionStart = (colorYTransitionState->stepsRemaining == colorYTransitionState->stepsTotal); - - MarkAttributeDirty markXDirty = - SetQuietReportAttribute(quietColorX[epIndex], colorXTransitionState->currentValue, - (isXTransitionStart || isXTransitionDone), colorXTransitionState->transitionTime); - MarkAttributeDirty markYDirty = - SetQuietReportAttribute(quietColorY[epIndex], colorYTransitionState->currentValue, - (isYTransitionStart || isYTransitionDone), colorYTransitionState->transitionTime); + MarkAttributeDirty markXDirty = SetQuietReportAttribute(quietColorX[epIndex], colorXTransitionState->currentValue, + isXTransitionDone, colorXTransitionState->transitionTime); + MarkAttributeDirty markYDirty = SetQuietReportAttribute(quietColorY[epIndex], colorYTransitionState->currentValue, + isYTransitionDone, colorYTransitionState->transitionTime); Attributes::CurrentX::Set(endpoint, quietColorX[epIndex].value().Value(), markXDirty); Attributes::CurrentY::Set(endpoint, quietColorY[epIndex].value().Value(), markYDirty); @@ -2586,6 +2580,9 @@ Status ColorControlServer::moveToColorTemp(EndpointId aEndpoint, uint16_t colorT uint16_t temperatureMin = MIN_TEMPERATURE_VALUE; Attributes::ColorTempPhysicalMinMireds::Get(endpoint, &temperatureMin); + // Avoid potential divide-by-zero in future Kelvin conversions. + temperatureMin = std::max(static_cast(1u), temperatureMin); + uint16_t temperatureMax = MAX_TEMPERATURE_VALUE; Attributes::ColorTempPhysicalMaxMireds::Get(endpoint, &temperatureMax); @@ -2618,6 +2615,8 @@ Status ColorControlServer::moveToColorTemp(EndpointId aEndpoint, uint16_t colorT colorTempTransitionState->lowLimit = temperatureMin; colorTempTransitionState->highLimit = temperatureMax; + SetQuietReportRemainingTime(endpoint, transitionTime, true /* isNewTransition */); + // kick off the state machine scheduleTimerCallbackMs(configureTempEventControl(endpoint), transitionTime ? TRANSITION_UPDATE_TIME_MS.count() : 0); return Status::Success; @@ -2640,6 +2639,9 @@ uint16_t ColorControlServer::getTemperatureCoupleToLevelMin(EndpointId endpoint) { // Not less than the physical min. Attributes::ColorTempPhysicalMinMireds::Get(endpoint, &colorTemperatureCoupleToLevelMin); + + // Avoid potential divide-by-zero in future Kelvin conversions. + colorTemperatureCoupleToLevelMin = std::max(static_cast(1u), colorTemperatureCoupleToLevelMin); } return colorTemperatureCoupleToLevelMin; @@ -2670,43 +2672,41 @@ void ColorControlServer::startUpColorTempCommand(EndpointId endpoint) // EnhancedColorMode attributes SHALL be set to 0x02 (color temperature). The values of // the StartUpColorTemperatureMireds attribute are listed in the table below. // Value Action on power up - // 0x0000-0xffef Set the ColorTemperatureMireds attribute to this value. + // 0x0001-0xffef Set the ColorTemperatureMireds attribute to this value. // null Set the ColorTemperatureMireds attribute to its previous value. // Initialize startUpColorTempMireds to "maintain previous value" value null - app::DataModel::Nullable startUpColorTemp; + app::DataModel::Nullable startUpColorTemp = DataModel::NullNullable; Status status = Attributes::StartUpColorTemperatureMireds::Get(endpoint, startUpColorTemp); if (status == Status::Success && !startUpColorTemp.IsNull()) { - uint16_t updatedColorTemp = MAX_TEMPERATURE_VALUE; - status = Attributes::ColorTemperatureMireds::Get(endpoint, &updatedColorTemp); + uint16_t tempPhysicalMin = MIN_TEMPERATURE_VALUE; + Attributes::ColorTempPhysicalMinMireds::Get(endpoint, &tempPhysicalMin); + // Avoid potential divide-by-zero in future Kelvin conversions. + tempPhysicalMin = std::max(static_cast(1u), tempPhysicalMin); - if (status == Status::Success) - { - uint16_t tempPhysicalMin = MIN_TEMPERATURE_VALUE; - Attributes::ColorTempPhysicalMinMireds::Get(endpoint, &tempPhysicalMin); + uint16_t tempPhysicalMax = MAX_TEMPERATURE_VALUE; + Attributes::ColorTempPhysicalMaxMireds::Get(endpoint, &tempPhysicalMax); - uint16_t tempPhysicalMax = MAX_TEMPERATURE_VALUE; - Attributes::ColorTempPhysicalMaxMireds::Get(endpoint, &tempPhysicalMax); + if (tempPhysicalMin <= startUpColorTemp.Value() && startUpColorTemp.Value() <= tempPhysicalMax) + { + // Apply valid startup color temp value that is within physical limits of device. + // Otherwise, the startup value is outside the device's supported range, and the + // existing setting of ColorTemp attribute will be left unchanged (i.e., treated as + // if startup color temp was set to null). + uint16_t epIndex = getEndpointIndex(endpoint); + MarkAttributeDirty markDirty = SetQuietReportAttribute(quietTemperatureMireds[epIndex], startUpColorTemp.Value(), + false /* isEndOfTransition */, 0); + status = Attributes::ColorTemperatureMireds::Set(endpoint, quietTemperatureMireds[epIndex].value().Value(), markDirty); - if (tempPhysicalMin <= startUpColorTemp.Value() && startUpColorTemp.Value() <= tempPhysicalMax) + if (status == Status::Success) { - // Apply valid startup color temp value that is within physical limits of device. - // Otherwise, the startup value is outside the device's supported range, and the - // existing setting of ColorTemp attribute will be left unchanged (i.e., treated as - // if startup color temp was set to null). - updatedColorTemp = startUpColorTemp.Value(); - status = Attributes::ColorTemperatureMireds::Set(endpoint, updatedColorTemp); - - if (status == Status::Success) - { - // Set ColorMode attributes to reflect ColorTemperature. - auto updateColorMode = ColorModeEnum::kColorTemperatureMireds; - Attributes::ColorMode::Set(endpoint, updateColorMode); + // Set ColorMode attributes to reflect ColorTemperature. + auto updateColorMode = ColorModeEnum::kColorTemperatureMireds; + Attributes::ColorMode::Set(endpoint, updateColorMode); - Attributes::EnhancedColorMode::Set(endpoint, static_cast(updateColorMode)); - } + Attributes::EnhancedColorMode::Set(endpoint, static_cast(updateColorMode)); } } } @@ -2719,7 +2719,8 @@ void ColorControlServer::startUpColorTempCommand(EndpointId endpoint) */ void ColorControlServer::updateTempCommand(EndpointId endpoint) { - Color16uTransitionState * colorTempTransitionState = getTempTransitionState(endpoint); + uint16_t epIndex = getEndpointIndex(endpoint); + Color16uTransitionState * colorTempTransitionState = getTempTransitionStateByIndex(epIndex); bool isColorTempTransitionDone; isColorTempTransitionDone = computeNewColor16uValue(colorTempTransitionState); @@ -2753,7 +2754,9 @@ void ColorControlServer::updateTempCommand(EndpointId endpoint) scheduleTimerCallbackMs(configureTempEventControl(endpoint), TRANSITION_UPDATE_TIME_MS.count()); } - Attributes::ColorTemperatureMireds::Set(endpoint, colorTempTransitionState->currentValue); + MarkAttributeDirty markDirty = SetQuietReportAttribute(quietTemperatureMireds[epIndex], colorTempTransitionState->currentValue, + isColorTempTransitionDone, colorTempTransitionState->timeRemaining); + Attributes::ColorTemperatureMireds::Set(endpoint, quietTemperatureMireds[epIndex].value().Value(), markDirty); ChipLogProgress(Zcl, "Color Temperature %d", colorTempTransitionState->currentValue); @@ -2807,6 +2810,9 @@ bool ColorControlServer::moveColorTempCommand(app::CommandHandler * commandObj, Attributes::ColorTempPhysicalMinMireds::Get(endpoint, &tempPhysicalMin); Attributes::ColorTempPhysicalMaxMireds::Get(endpoint, &tempPhysicalMax); + // Avoid potential divide-by-zero in future Kelvin conversions. + tempPhysicalMin = std::max(static_cast(1u), tempPhysicalMin); + // New command. Need to stop any active transitions. stopAllColorTransitions(endpoint); @@ -2817,7 +2823,7 @@ bool ColorControlServer::moveColorTempCommand(app::CommandHandler * commandObj, } // Per spec, colorTemperatureMinimumMireds field is limited to ColorTempPhysicalMinMireds and - // when colorTemperatureMinimumMireds field is 0, ColorTempPhysicalMinMireds shall be used (always >= to 0) + // when colorTemperatureMinimumMireds field is 0, ColorTempPhysicalMinMireds shall be used (always > 0) if (colorTemperatureMinimum < tempPhysicalMin) { colorTemperatureMinimum = tempPhysicalMin; @@ -2869,7 +2875,7 @@ bool ColorControlServer::moveColorTempCommand(app::CommandHandler * commandObj, colorTempTransitionState->lowLimit = colorTemperatureMinimum; colorTempTransitionState->highLimit = colorTemperatureMaximum; - SetQuietReportRemainingTime(endpoint, transitionTime); + SetQuietReportRemainingTime(endpoint, transitionTime, true /* isNewTransition */); // kick off the state machine: scheduleTimerCallbackMs(configureTempEventControl(endpoint), TRANSITION_UPDATE_TIME_MS.count()); @@ -2933,8 +2939,11 @@ bool ColorControlServer::stepColorTempCommand(app::CommandHandler * commandObj, Attributes::ColorTempPhysicalMinMireds::Get(endpoint, &tempPhysicalMin); Attributes::ColorTempPhysicalMaxMireds::Get(endpoint, &tempPhysicalMax); + // Avoid potential divide-by-zero in future Kelvin conversions. + tempPhysicalMin = std::max(static_cast(1u), tempPhysicalMin); + // Per spec, colorTemperatureMinimumMireds field is limited to ColorTempPhysicalMinMireds and - // when colorTemperatureMinimumMireds field is 0, ColorTempPhysicalMinMireds shall be used (always >= to 0) + // when colorTemperatureMinimumMireds field is 0, ColorTempPhysicalMinMireds shall be used (always > 0) if (colorTemperatureMinimum < tempPhysicalMin) { colorTemperatureMinimum = tempPhysicalMin; @@ -2953,6 +2962,8 @@ bool ColorControlServer::stepColorTempCommand(app::CommandHandler * commandObj, // now, kick off the state machine. colorTempTransitionState->initialValue = 0; Attributes::ColorTemperatureMireds::Get(endpoint, &colorTempTransitionState->initialValue); + colorTempTransitionState->initialValue = std::max(static_cast(1u), colorTempTransitionState->initialValue); + colorTempTransitionState->currentValue = colorTempTransitionState->initialValue; if (stepMode == HueStepMode::kUp) @@ -2987,7 +2998,7 @@ bool ColorControlServer::stepColorTempCommand(app::CommandHandler * commandObj, colorTempTransitionState->lowLimit = colorTemperatureMinimum; colorTempTransitionState->highLimit = colorTemperatureMaximum; - SetQuietReportRemainingTime(endpoint, transitionTime); + SetQuietReportRemainingTime(endpoint, transitionTime, true /* isNewTransition */); // kick off the state machine: scheduleTimerCallbackMs(configureTempEventControl(endpoint), transitionTime ? TRANSITION_UPDATE_TIME_MS.count() : 0); @@ -3085,7 +3096,6 @@ void ColorControlServer::levelControlColorTempChangeCommand(EndpointId endpoint) * Utility function used to update a color control attribute which has the quiet reporting quality. * matching the following report conditions: * - At most once per second, or - * - At the start of the movement/transition, or * - At the end of the movement/transition, or * - When it changes from null to any other value and vice versa. (Implicit to the QuieterReportingAttribute class) * @@ -3096,20 +3106,20 @@ void ColorControlServer::levelControlColorTempChangeCommand(EndpointId endpoint) * * @param quietReporter: The QuieterReportingAttribute object for the attribute to update. * @param newValue: Value to update the attribute with - * @param isStartOrEndOfTransition: Boolean that indicatse whether the update is occurring at the start or end of a level transition + * @param isEndOfTransition: Boolean that indicates whether the update is occurring at the end of a color transition * @return MarkAttributeDirty::kYes when the attribute must be marked dirty and be reported. MarkAttributeDirty::kNo when * no report is needed. */ template MarkAttributeDirty ColorControlServer::SetQuietReportAttribute(QuieterReportingAttribute & quietReporter, V newValue, - bool isStartOrEndOfTransition, uint16_t transitionTime) + bool isEndOfTransition, uint16_t transitionTime) { AttributeDirtyState dirtyState; auto now = System::SystemClock().GetMonotonicTimestamp(); - if (isStartOrEndOfTransition) + if (isEndOfTransition) { - // At the start or end of the movement/transition we must report if the value changed + // At the end of the movement/transition we must report if the value changed auto predicate = [](const typename QuieterReportingAttribute::SufficientChangePredicateCandidate &) -> bool { return true; }; @@ -3139,23 +3149,42 @@ MarkAttributeDirty ColorControlServer::SetQuietReportAttribute(QuieterReportingA * @brief * Function used to set the remaining time based on quiet reporting conditions. * It will update the attribute storage and report the attribute if it is determined dirty. - * The condition on which the attribute must be reported are defined by the set QuieterReportingPolicyFlags - * of the quietRemainingTime object and the implicit conditions of the QuieterReportingAttribute class + * The conditions on which the attribute must be reported are: + * - When it changes from 0 to any value higher than 10, or + * - When it changes, with a delta larger than 10, caused by the invoke of a command, or + * - When it changes to 0. * * @param endpoint: Endpoint of the RemainingTime attribute to set * @param newRemainingTime: Value to update the RemainingTime attribute with * @return Success in setting the attribute value or the IM error code for the failure. */ -Status ColorControlServer::SetQuietReportRemainingTime(EndpointId endpoint, uint16_t newRemainingTime) -{ - uint16_t epIndex = getEndpointIndex(endpoint); - auto markDirty = MarkAttributeDirty::kNo; - auto now = System::SystemClock().GetMonotonicTimestamp(); - // Establish the quiet report condition for the RemainingTime Attribute - // The quiet report is by the previously set policies : - // - kMarkDirtyOnChangeToFromZero : When the value changes from 0 to any other value and vice versa, or - // - kMarkDirtyOnIncrement : When the value increases. - if (quietRemainingTime[epIndex].SetValue(newRemainingTime, now) == AttributeDirtyState::kMustReport) +Status ColorControlServer::SetQuietReportRemainingTime(EndpointId endpoint, uint16_t newRemainingTime, bool isNewTransition) +{ + uint16_t epIndex = getEndpointIndex(endpoint); + uint16_t lastRemainingTime = quietRemainingTime[epIndex].value().ValueOr(0); + auto markDirty = MarkAttributeDirty::kNo; + auto now = System::SystemClock().GetMonotonicTimestamp(); + + auto predicate = + [isNewTransition, lastRemainingTime]( + const typename QuieterReportingAttribute::SufficientChangePredicateCandidate & candidate) -> bool { + constexpr uint16_t reportDelta = 10; + bool isDirty = false; + if (candidate.newValue.Value() == 0 || (candidate.lastDirtyValue.Value() == 0 && candidate.newValue.Value() > reportDelta)) + { + isDirty = true; + } + else if (isNewTransition && + (candidate.newValue.Value() > static_cast(lastRemainingTime + reportDelta) || + static_cast(candidate.newValue.Value() + reportDelta) < lastRemainingTime || + candidate.newValue.Value() > static_cast(candidate.lastDirtyValue.Value() + reportDelta))) + { + isDirty = true; + } + return isDirty; + }; + + if (quietRemainingTime[epIndex].SetValue(newRemainingTime, now, predicate) == AttributeDirtyState::kMustReport) { markDirty = MarkAttributeDirty::kYes; } diff --git a/src/app/clusters/color-control-server/color-control-server.h b/src/app/clusters/color-control-server/color-control-server.h index 1ed9e33c403538..422c7f592f8b33 100644 --- a/src/app/clusters/color-control-server/color-control-server.h +++ b/src/app/clusters/color-control-server/color-control-server.h @@ -43,8 +43,10 @@ static constexpr uint16_t TRANSITION_STEPS_PER_1S = static constexpr uint16_t MIN_CIE_XY_VALUE = 0; static constexpr uint16_t MAX_CIE_XY_VALUE = 0xfeff; // this value comes directly from the ZCL specification table 5.3 -static constexpr uint16_t MIN_TEMPERATURE_VALUE = 0; -static constexpr uint16_t MAX_TEMPERATURE_VALUE = 0xfeff; +// Logically relevant color temperatures are between 1000K and 9000K at the very most (and this is still +// not frequent). Our implementation can default to those reasonable maxima to avoid issues related to range. +static constexpr uint16_t MIN_TEMPERATURE_VALUE = 111u; // 111 mireds == 9000K +static constexpr uint16_t MAX_TEMPERATURE_VALUE = 1000u; // 1000 mireds == 1000K static constexpr uint8_t MIN_HUE_VALUE = 0; static constexpr uint8_t MAX_HUE_VALUE = 254; @@ -201,27 +203,16 @@ class ColorControlServer template chip::app::MarkAttributeDirty SetQuietReportAttribute(chip::app::QuieterReportingAttribute & quietReporter, V newValue, - bool isStartOrEndOfTransition, uint16_t transitionTime); - chip::Protocols::InteractionModel::Status SetQuietReportRemainingTime(chip::EndpointId endpoint, uint16_t newRemainingTime); + bool isEndOfTransition, uint16_t transitionTime); + chip::Protocols::InteractionModel::Status SetQuietReportRemainingTime(chip::EndpointId endpoint, uint16_t newRemainingTime, + bool isNewTransition = false); private: /********************************************************** * Functions Definitions *********************************************************/ - ColorControlServer() - { - for (size_t i = 0; i < kColorControlClusterServerMaxEndpointCount; i++) - { - // Set the quiet report policies for the RemaininTime Attribute on all endpoint - // - kMarkDirtyOnChangeToFromZero : When the value changes from 0 to any other value and vice versa, or - // - kMarkDirtyOnIncrement : When the value increases. - quietRemainingTime[i] - .policy() - .Set(chip::app::QuieterReportingPolicyEnum::kMarkDirtyOnIncrement) - .Set(chip::app::QuieterReportingPolicyEnum::kMarkDirtyOnChangeToFromZero); - } - } + ColorControlServer() {} bool shouldExecuteIfOff(chip::EndpointId endpoint, chip::BitMask optionMask, chip::BitMask optionOverride); @@ -310,6 +301,7 @@ class ColorControlServer #ifdef MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_TEMP Color16uTransitionState colorTempTransitionStates[kColorControlClusterServerMaxEndpointCount]; + chip::app::QuieterReportingAttribute quietTemperatureMireds[kColorControlClusterServerMaxEndpointCount]; #endif // MATTER_DM_PLUGIN_COLOR_CONTROL_SERVER_TEMP EmberEventControl eventControls[kColorControlClusterServerMaxEndpointCount]; diff --git a/src/app/clusters/commissioner-control-server/commissioner-control-server.cpp b/src/app/clusters/commissioner-control-server/commissioner-control-server.cpp index 4df397326894ed..d6282f287a1181 100644 --- a/src/app/clusters/commissioner-control-server/commissioner-control-server.cpp +++ b/src/app/clusters/commissioner-control-server/commissioner-control-server.cpp @@ -64,14 +64,14 @@ void AddReverseOpenCommissioningWindowResponse(CommandHandler * commandObj, cons void RunDeferredCommissionNode(intptr_t commandArg) { - auto * info = reinterpret_cast(commandArg); + auto * params = reinterpret_cast(commandArg); Clusters::CommissionerControl::Delegate * delegate = Clusters::CommissionerControl::CommissionerControlServer::Instance().GetDelegate(); if (delegate != nullptr) { - CHIP_ERROR err = delegate->HandleCommissionNode(info->params, info->ipAddress.GetIPAddress(), info->port); + CHIP_ERROR err = delegate->HandleCommissionNode(*params); if (err != CHIP_NO_ERROR) { ChipLogError(Zcl, "HandleCommissionNode error: %" CHIP_ERROR_FORMAT, err.Format()); @@ -82,7 +82,7 @@ void RunDeferredCommissionNode(intptr_t commandArg) ChipLogError(Zcl, "No delegate available for HandleCommissionNode"); } - delete info; + delete params; } } // namespace @@ -170,9 +170,9 @@ bool emberAfCommissionerControlClusterRequestCommissioningApprovalCallback( } auto fabricIndex = commandObj->GetAccessingFabricIndex(); - auto requestId = commandData.requestId; - auto vendorId = commandData.vendorId; - auto productId = commandData.productId; + auto requestId = commandData.requestID; + auto vendorId = commandData.vendorID; + auto productId = commandData.productID; // The label assigned from commandData need to be stored in CommissionerControl::Delegate which ensure that the backing buffer // of it has a valid lifespan during fabric sync setup process. @@ -232,33 +232,29 @@ bool emberAfCommissionerControlClusterCommissionNodeCallback( return true; } - auto requestId = commandData.requestId; + auto requestId = commandData.requestID; - auto commissionNodeInfo = std::make_unique(); + auto commissioningWindowParams = std::make_unique(); Clusters::CommissionerControl::Delegate * delegate = Clusters::CommissionerControl::CommissionerControlServer::Instance().GetDelegate(); VerifyOrExit(delegate != nullptr, err = CHIP_ERROR_INCORRECT_STATE); - // Set IP address and port in the CommissionNodeInfo struct - commissionNodeInfo->port = commandData.port; - err = commissionNodeInfo->ipAddress.SetIPAddress(commandData.ipAddress); - SuccessOrExit(err); - // Validate the commission node command. err = delegate->ValidateCommissionNodeCommand(sourceNodeId, requestId); SuccessOrExit(err); // Populate the parameters for the commissioning window - err = delegate->GetCommissioningWindowParams(commissionNodeInfo->params); + err = delegate->GetCommissioningWindowParams(*commissioningWindowParams); SuccessOrExit(err); // Add the response for the commissioning window. - AddReverseOpenCommissioningWindowResponse(commandObj, commandPath, commissionNodeInfo->params); + AddReverseOpenCommissioningWindowResponse(commandObj, commandPath, *commissioningWindowParams); // Schedule the deferred reverse commission node task - DeviceLayer::PlatformMgr().ScheduleWork(RunDeferredCommissionNode, reinterpret_cast(commissionNodeInfo.release())); + DeviceLayer::PlatformMgr().ScheduleWork(RunDeferredCommissionNode, + reinterpret_cast(commissioningWindowParams.release())); exit: if (err != CHIP_NO_ERROR) diff --git a/src/app/clusters/commissioner-control-server/commissioner-control-server.h b/src/app/clusters/commissioner-control-server/commissioner-control-server.h index 60a4e81a93c3af..e63769de1d0a3e 100644 --- a/src/app/clusters/commissioner-control-server/commissioner-control-server.h +++ b/src/app/clusters/commissioner-control-server/commissioner-control-server.h @@ -46,43 +46,6 @@ struct CommissioningWindowParams ByteSpan salt; }; -class ProtectedIPAddress -{ -public: - const Optional GetIPAddress() { return ipAddress; } - - CHIP_ERROR SetIPAddress(const Optional & address) - { - if (!address.HasValue()) - { - ipAddress.ClearValue(); - return CHIP_NO_ERROR; - } - - const ByteSpan & addressSpan = address.Value(); - size_t addressLength = addressSpan.size(); - if (addressLength != 4 && addressLength != 16) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - - memcpy(ipAddressBuffer, addressSpan.data(), addressLength); - ipAddress.SetValue(ByteSpan(ipAddressBuffer, addressLength)); - return CHIP_NO_ERROR; - } - -private: - Optional ipAddress; - uint8_t ipAddressBuffer[kIpAddressBufferSize]; -}; - -struct CommissionNodeInfo -{ - CommissioningWindowParams params; - ProtectedIPAddress ipAddress; - Optional port; -}; - class Delegate { public: @@ -130,12 +93,9 @@ class Delegate * Commission a node specified by the previously approved request. * * @param params The parameters for the commissioning window. - * @param ipAddress Optional IP address for the commissioning window. - * @param port Optional port for the commissioning window. * @return CHIP_ERROR indicating the success or failure of the operation. */ - virtual CHIP_ERROR HandleCommissionNode(const CommissioningWindowParams & params, const Optional & ipAddress, - const Optional & port) = 0; + virtual CHIP_ERROR HandleCommissionNode(const CommissioningWindowParams & params) = 0; virtual ~Delegate() = default; }; diff --git a/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp b/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp index 438e2d7bd5f7d3..0b7205dd83a33a 100644 --- a/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp +++ b/src/app/clusters/device-energy-management-server/device-energy-management-server.cpp @@ -676,7 +676,7 @@ void Instance::HandleModifyForecastRequest(HandlerContext & ctx, const Commands: const Structs::SlotAdjustmentStruct::Type & slotAdjustment = iterator.GetValue(); // Check for an invalid slotIndex - if (slotAdjustment.slotIndex > forecast.Value().slots.size()) + if (slotAdjustment.slotIndex >= forecast.Value().slots.size()) { ChipLogError(Zcl, "DEM: Bad slot index %d", slotAdjustment.slotIndex); ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Status::Failure); @@ -696,8 +696,8 @@ void Instance::HandleModifyForecastRequest(HandlerContext & ctx, const Commands: // NominalPower is only relevant if PFR is supported if (HasFeature(Feature::kPowerForecastReporting)) { - if (!slot.minPowerAdjustment.HasValue() || !slot.maxPowerAdjustment.HasValue() || - slotAdjustment.nominalPower.Value() < slot.minPowerAdjustment.Value() || + if (!slotAdjustment.nominalPower.HasValue() || !slot.minPowerAdjustment.HasValue() || + !slot.maxPowerAdjustment.HasValue() || slotAdjustment.nominalPower.Value() < slot.minPowerAdjustment.Value() || slotAdjustment.nominalPower.Value() > slot.maxPowerAdjustment.Value()) { ChipLogError(Zcl, "DEM: Bad nominalPower"); diff --git a/src/app/clusters/ecosystem-information-server/ecosystem-information-server.cpp b/src/app/clusters/ecosystem-information-server/ecosystem-information-server.cpp index 2ce82394a57464..4880c1058dc7f9 100644 --- a/src/app/clusters/ecosystem-information-server/ecosystem-information-server.cpp +++ b/src/app/clusters/ecosystem-information-server/ecosystem-information-server.cpp @@ -34,9 +34,6 @@ constexpr size_t kUniqueLocationIdMaxSize = 64; constexpr size_t kUniqueLocationIdsListMaxSize = 64; constexpr size_t kLocationDescriptorNameMaxSize = 128; -constexpr size_t kDeviceDirectoryMaxSize = 256; -constexpr size_t kLocationDirectoryMaxSize = 64; - class AttrAccess : public AttributeAccessInterface { public: @@ -264,7 +261,6 @@ CHIP_ERROR EcosystemInformationServer::AddDeviceInfo(EndpointId aEndpoint, std:: VerifyOrReturnError((aEndpoint != kRootEndpointId && aEndpoint != kInvalidEndpointId), CHIP_ERROR_INVALID_ARGUMENT); auto & deviceInfo = mDevicesMap[aEndpoint]; - VerifyOrReturnError((deviceInfo.mDeviceDirectory.size() < kDeviceDirectoryMaxSize), CHIP_ERROR_NO_MEMORY); deviceInfo.mDeviceDirectory.push_back(std::move(aDevice)); return CHIP_NO_ERROR; } @@ -282,26 +278,14 @@ CHIP_ERROR EcosystemInformationServer::AddLocationInfo(EndpointId aEndpoint, con EcosystemLocationKey key = { .mUniqueLocationId = aLocationId, .mFabricIndex = aFabricIndex }; VerifyOrReturnError((deviceInfo.mLocationDirectory.find(key) == deviceInfo.mLocationDirectory.end()), CHIP_ERROR_INVALID_ARGUMENT); - VerifyOrReturnError((deviceInfo.mLocationDirectory.size() < kLocationDirectoryMaxSize), CHIP_ERROR_NO_MEMORY); deviceInfo.mLocationDirectory[key] = std::move(aLocation); return CHIP_NO_ERROR; } -CHIP_ERROR EcosystemInformationServer::RemoveDevice(EndpointId aEndpoint, uint64_t aEpochUs) -{ - auto it = mDevicesMap.find(aEndpoint); - VerifyOrReturnError((it != mDevicesMap.end()), CHIP_ERROR_INVALID_ARGUMENT); - auto & deviceInfo = it->second; - deviceInfo.mRemovedOn.SetValue(aEpochUs); - return CHIP_NO_ERROR; -} - CHIP_ERROR EcosystemInformationServer::ReadAttribute(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder) { switch (aPath.mAttributeId) { - case Attributes::RemovedOn::Id: - return EncodeRemovedOnAttribute(aPath.mEndpointId, aEncoder); case Attributes::DeviceDirectory::Id: return EncodeDeviceDirectoryAttribute(aPath.mEndpointId, aEncoder); case Attributes::LocationDirectory::Id: @@ -320,28 +304,6 @@ CHIP_ERROR EcosystemInformationServer::ReadAttribute(const ConcreteReadAttribute return CHIP_NO_ERROR; } -CHIP_ERROR EcosystemInformationServer::EncodeRemovedOnAttribute(EndpointId aEndpoint, AttributeValueEncoder & aEncoder) -{ - auto it = mDevicesMap.find(aEndpoint); - if (it == mDevicesMap.end()) - { - // We are always going to be given a valid endpoint. If the endpoint - // doesn't exist in our map that indicate that the cluster was not - // added on this endpoint, hence UnsupportedCluster. - return CHIP_IM_GLOBAL_STATUS(UnsupportedCluster); - } - - auto & deviceInfo = it->second; - if (!deviceInfo.mRemovedOn.HasValue()) - { - aEncoder.EncodeNull(); - return CHIP_NO_ERROR; - } - - aEncoder.Encode(deviceInfo.mRemovedOn.Value()); - return CHIP_NO_ERROR; -} - CHIP_ERROR EcosystemInformationServer::EncodeDeviceDirectoryAttribute(EndpointId aEndpoint, AttributeValueEncoder & aEncoder) { @@ -355,7 +317,7 @@ CHIP_ERROR EcosystemInformationServer::EncodeDeviceDirectoryAttribute(EndpointId } auto & deviceInfo = it->second; - if (deviceInfo.mDeviceDirectory.empty() || deviceInfo.mRemovedOn.HasValue()) + if (deviceInfo.mDeviceDirectory.empty()) { return aEncoder.EncodeEmptyList(); } @@ -381,7 +343,7 @@ CHIP_ERROR EcosystemInformationServer::EncodeLocationStructAttribute(EndpointId } auto & deviceInfo = it->second; - if (deviceInfo.mLocationDirectory.empty() || deviceInfo.mRemovedOn.HasValue()) + if (deviceInfo.mLocationDirectory.empty()) { return aEncoder.EncodeEmptyList(); } diff --git a/src/app/clusters/ecosystem-information-server/ecosystem-information-server.h b/src/app/clusters/ecosystem-information-server/ecosystem-information-server.h index d4f4d7dc3a6fc1..3fe162181391d4 100644 --- a/src/app/clusters/ecosystem-information-server/ecosystem-information-server.h +++ b/src/app/clusters/ecosystem-information-server/ecosystem-information-server.h @@ -186,16 +186,6 @@ class EcosystemInformationServer */ CHIP_ERROR AddLocationInfo(EndpointId aEndpoint, const std::string & aLocationId, FabricIndex aFabricIndex, std::unique_ptr aLocation); - - /** - * @brief Removes device at the provided endpoint. - * - * @param aEndpoint Endpoint of the associated device that has been removed. - * @param aEpochUs Epoch time in micro seconds assoicated with when device was removed. - * @return #CHIP_NO_ERROR on success. - * @return Other CHIP_ERROR associated with issue. - */ - CHIP_ERROR RemoveDevice(EndpointId aEndpoint, uint64_t aEpochUs); // TODO(#33223) Add removal and update counterparts to AddDeviceInfo and AddLocationInfo. CHIP_ERROR ReadAttribute(const ConcreteReadAttributePath & aPath, AttributeValueEncoder & aEncoder); @@ -214,12 +204,10 @@ class EcosystemInformationServer struct DeviceInfo { - Optional mRemovedOn = NullOptional; std::vector> mDeviceDirectory; std::map> mLocationDirectory; }; - CHIP_ERROR EncodeRemovedOnAttribute(EndpointId aEndpoint, AttributeValueEncoder & aEncoder); CHIP_ERROR EncodeDeviceDirectoryAttribute(EndpointId aEndpoint, AttributeValueEncoder & aEncoder); CHIP_ERROR EncodeLocationStructAttribute(EndpointId aEndpoint, AttributeValueEncoder & aEncoder); diff --git a/src/app/clusters/level-control/level-control.cpp b/src/app/clusters/level-control/level-control.cpp index 231a542c2ef1b4..c176d6f6b17bbb 100644 --- a/src/app/clusters/level-control/level-control.cpp +++ b/src/app/clusters/level-control/level-control.cpp @@ -121,12 +121,12 @@ static void stopHandler(CommandHandler * commandObj, const ConcreteCommandPath & chip::Optional> optionsMask, chip::Optional> optionsOverride); static void setOnOffValue(EndpointId endpoint, bool onOff); -static void writeRemainingTime(EndpointId endpoint, uint16_t remainingTimeMs); +static void writeRemainingTime(EndpointId endpoint, uint16_t remainingTimeMs, bool isNewTransition = false); static bool shouldExecuteIfOff(EndpointId endpoint, CommandId commandId, chip::Optional> optionsMask, chip::Optional> optionsOverride); static Status SetCurrentLevelQuietReport(EndpointId endpoint, EmberAfLevelControlState * state, - DataModel::Nullable newValue, bool isStartOrEndOfTransition); + DataModel::Nullable newValue, bool isEndOfTransition); #if defined(MATTER_DM_PLUGIN_SCENES_MANAGEMENT) && CHIP_CONFIG_SCENES_USE_DEFAULT_HANDLERS class DefaultLevelControlSceneHandler : public scenes::DefaultSceneHandlerImpl @@ -372,23 +372,22 @@ static void reallyUpdateCoupledColorTemp(EndpointId endpoint) * while respecting its defined quiet reporting quality: * The attribute will be reported: * - At most once per second, or - * - At the start of the movement/transition, or * - At the end of the movement/transition, or * - When it changes from null to any other value and vice versa. * * @param endpoint: endpoint on which the currentLevel attribute must be updated. * @param state: LevelControlState struct of this given endpoint. * @param newValue: Value to update the attribute with - * @param isStartOrEndOfTransition: Boolean that indicate whether the update is occuring at the start or end of a level transition + * @param isEndOfTransition: Boolean that indicate whether the update is occuring at the end of a level transition * @return Success in setting the attribute value or the IM error code for the failure. */ static Status SetCurrentLevelQuietReport(EndpointId endpoint, EmberAfLevelControlState * state, - DataModel::Nullable newValue, bool isStartOrEndOfTransition) + DataModel::Nullable newValue, bool isEndOfTransition) { AttributeDirtyState dirtyState; auto now = System::SystemClock().GetMonotonicTimestamp(); - if (isStartOrEndOfTransition) + if (isEndOfTransition) { // At the start or end of the movement/transition we must report auto predicate = [](const decltype(state->quietCurrentLevel)::SufficientChangePredicateCandidate &) -> bool { @@ -467,7 +466,7 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) // Are we at the requested level? isTransitionEnd = (currentLevel.Value() == state->moveToLevel); - status = SetCurrentLevelQuietReport(endpoint, state, currentLevel, (isTransitionStart || isTransitionEnd)); + status = SetCurrentLevelQuietReport(endpoint, state, currentLevel, isTransitionEnd); if (status != Status::Success) { ChipLogProgress(Zcl, "ERR: writing current level %x", to_underlying(status)); @@ -506,12 +505,12 @@ void emberAfLevelControlClusterServerTickCallback(EndpointId endpoint) else { state->callbackSchedule.runTime = System::SystemClock().GetMonotonicTimestamp() - callbackStartTimestamp; - writeRemainingTime(endpoint, static_cast(state->transitionTimeMs - state->elapsedTimeMs)); + writeRemainingTime(endpoint, static_cast(state->transitionTimeMs - state->elapsedTimeMs), isTransitionStart); scheduleTimerCallbackMs(endpoint, computeCallbackWaitTimeMs(state->callbackSchedule, state->eventDurationMs)); } } -static void writeRemainingTime(EndpointId endpoint, uint16_t remainingTimeMs) +static void writeRemainingTime(EndpointId endpoint, uint16_t remainingTimeMs, bool isNewTransition) { #ifndef IGNORE_LEVEL_CONTROL_CLUSTER_LEVEL_CONTROL_REMAINING_TIME if (emberAfContainsAttribute(endpoint, LevelControl::Id, LevelControl::Attributes::RemainingTime::Id)) @@ -531,16 +530,36 @@ static void writeRemainingTime(EndpointId endpoint, uint16_t remainingTimeMs) // // This is done to ensure that the attribute, in tenths of a second, only // goes to zero when the remaining time in milliseconds is actually zero. - uint16_t remainingTimeDs = static_cast((remainingTimeMs + 99) / 100); - auto markDirty = MarkAttributeDirty::kNo; - auto state = getState(endpoint); - auto now = System::SystemClock().GetMonotonicTimestamp(); - - // Establish the quiet report condition for the RemainingTime Attribute - // The quiet report is determined by the previously set policies: - // - kMarkDirtyOnChangeToFromZero : When the value changes from 0 to any other value and vice versa, or - // - kMarkDirtyOnIncrement : When the value increases. - if (state->quietRemainingTime.SetValue(remainingTimeDs, now) == AttributeDirtyState::kMustReport) + auto markDirty = MarkAttributeDirty::kNo; + auto state = getState(endpoint); + auto now = System::SystemClock().GetMonotonicTimestamp(); + uint16_t remainingTimeDs = static_cast((remainingTimeMs + 99) / 100); + uint16_t lastRemainingTime = state->quietRemainingTime.value().ValueOr(0); + + // RemainingTime Quiet report conditions: + // - When it changes to 0, or + // - When it changes from 0 to any value higher than 10, or + // - When it changes, with a delta larger than 10, caused by the invoke of a command. + auto predicate = [isNewTransition, lastRemainingTime]( + const decltype(state->quietRemainingTime)::SufficientChangePredicateCandidate & candidate) -> bool { + constexpr uint16_t reportDelta = 10; + bool isDirty = false; + if (candidate.newValue.Value() == 0 || + (candidate.lastDirtyValue.Value() == 0 && candidate.newValue.Value() > reportDelta)) + { + isDirty = true; + } + else if (isNewTransition && + (candidate.newValue.Value() > static_cast(lastRemainingTime + reportDelta) || + static_cast(candidate.newValue.Value() + reportDelta) < lastRemainingTime || + candidate.newValue.Value() > static_cast(candidate.lastDirtyValue.Value() + reportDelta))) + { + isDirty = true; + } + return isDirty; + }; + + if (state->quietRemainingTime.SetValue(remainingTimeDs, now, predicate) == AttributeDirtyState::kMustReport) { markDirty = MarkAttributeDirty::kYes; } @@ -1316,7 +1335,7 @@ static void stopHandler(CommandHandler * commandObj, const ConcreteCommandPath & // Cancel any currently active command. cancelEndpointTimerCallback(endpoint); - SetCurrentLevelQuietReport(endpoint, state, state->quietCurrentLevel.value(), true /*isStartOrEndOfTransition*/); + SetCurrentLevelQuietReport(endpoint, state, state->quietCurrentLevel.value(), true /*isEndOfTransition*/); writeRemainingTime(endpoint, 0); send_default_response: @@ -1410,7 +1429,7 @@ void emberAfOnOffClusterLevelControlEffectCallback(EndpointId endpoint, bool new { // If newValue is OnOff::Commands::On::Id... // "Set CurrentLevel to minimum level allowed for the device." - status = SetCurrentLevelQuietReport(endpoint, state, minimumLevelAllowedForTheDevice, true /*isStartOrEndOfTransition*/); + status = SetCurrentLevelQuietReport(endpoint, state, minimumLevelAllowedForTheDevice, false /*isEndOfTransition*/); if (status != Status::Success) { ChipLogProgress(Zcl, "ERR: reading current level %x", to_underlying(status)); @@ -1453,9 +1472,6 @@ void emberAfLevelControlClusterServerInitCallback(EndpointId endpoint) return; } - state->quietRemainingTime.policy() - .Set(QuieterReportingPolicyEnum::kMarkDirtyOnIncrement) - .Set(QuieterReportingPolicyEnum::kMarkDirtyOnChangeToFromZero); state->minLevel = MATTER_DM_PLUGIN_LEVEL_CONTROL_MINIMUM_LEVEL; state->maxLevel = MATTER_DM_PLUGIN_LEVEL_CONTROL_MAXIMUM_LEVEL; @@ -1528,18 +1544,18 @@ void emberAfLevelControlClusterServerInitCallback(EndpointId endpoint) } } // Otherwise Set the CurrentLevel attribute to its previous value which was already fetch above - SetCurrentLevelQuietReport(endpoint, state, currentLevel, true /*isStartOrEndOfTransition*/); + SetCurrentLevelQuietReport(endpoint, state, currentLevel, false /*isEndOfTransition*/); } } #endif // IGNORE_LEVEL_CONTROL_CLUSTER_START_UP_CURRENT_LEVEL // In any case, we make sure that the respects min/max if (currentLevel.IsNull() || currentLevel.Value() < state->minLevel) { - SetCurrentLevelQuietReport(endpoint, state, state->minLevel, true /*isStartOrEndOfTransition*/); + SetCurrentLevelQuietReport(endpoint, state, state->minLevel, false /*isEndOfTransition*/); } else if (currentLevel.Value() > state->maxLevel) { - SetCurrentLevelQuietReport(endpoint, state, state->maxLevel, true /*isStartOrEndOfTransition*/); + SetCurrentLevelQuietReport(endpoint, state, state->maxLevel, false /*isEndOfTransition*/); } } diff --git a/src/app/clusters/network-commissioning/network-commissioning.cpp b/src/app/clusters/network-commissioning/network-commissioning.cpp index 7bb8aa665c5585..6bb3356b8967cd 100644 --- a/src/app/clusters/network-commissioning/network-commissioning.cpp +++ b/src/app/clusters/network-commissioning/network-commissioning.cpp @@ -336,6 +336,10 @@ CHIP_ERROR ThreadScanResponseToTLV::EncodeTo(TLV::TLVWriter & writer, TLV::Tag t } // namespace +#if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION +Instance::NetworkInstanceList Instance::sInstances; +#endif + Instance::Instance(EndpointId aEndpointId, WiFiDriver * apDelegate) : CommandHandlerInterface(Optional(aEndpointId), Id), AttributeAccessInterface(Optional(aEndpointId), Id), mEndpointId(aEndpointId), mFeatureFlags(WiFiFeatures(apDelegate)), mpWirelessDriver(apDelegate), mpBaseDriver(apDelegate) @@ -365,11 +369,23 @@ CHIP_ERROR Instance::Init() mLastNetworkingStatusValue.SetNull(); mLastConnectErrorValue.SetNull(); mLastNetworkIDLen = 0; +#if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION + if (!sInstances.Contains(this)) + { + sInstances.PushBack(this); + } +#endif return CHIP_NO_ERROR; } void Instance::Shutdown() { +#if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION + if (sInstances.Contains(this)) + { + sInstances.Remove(this); + } +#endif mpBaseDriver->Shutdown(); } @@ -1031,6 +1047,16 @@ void Instance::HandleConnectNetwork(HandlerContext & ctx, const Commands::Connec mCurrentOperationBreadcrumb = req.breadcrumb; #if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION + // Per spec, lingering connections on any other interfaces need to be disconnected at this point. + for (auto & node : sInstances) + { + Instance * instance = static_cast(&node); + if (instance != this) + { + instance->DisconnectLingeringConnection(); + } + } + mpWirelessDriver->ConnectNetwork(req.networkID, this); #else // In Non-concurrent mode postpone the final execution of ConnectNetwork until the operational @@ -1150,6 +1176,29 @@ void Instance::HandleQueryIdentity(HandlerContext & ctx, const Commands::QueryId } #endif // CHIP_DEVICE_CONFIG_ENABLE_WIFI_PDC +#if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION +void Instance::DisconnectLingeringConnection() +{ + bool haveConnectedNetwork = false; + EnumerateAndRelease(mpBaseDriver->GetNetworks(), [&](const Network & network) { + if (network.connected) + { + haveConnectedNetwork = true; + return Loop::Break; + } + return Loop::Continue; + }); + + // If none of the configured networks is `connected`, we may have a + // lingering connection to a different network that we need to disconnect. + // Note: The driver may or may not be actually connected + if (!haveConnectedNetwork) + { + LogErrorOnFailure(mpWirelessDriver->DisconnectFromNetwork()); + } +} +#endif + void Instance::OnResult(Status commissioningError, CharSpan debugText, int32_t interfaceStatus) { auto commandHandleRef = std::move(mAsyncCommandHandle); diff --git a/src/app/clusters/network-commissioning/network-commissioning.h b/src/app/clusters/network-commissioning/network-commissioning.h index cd2d5909c566d1..d727c9b6c2beb9 100644 --- a/src/app/clusters/network-commissioning/network-commissioning.h +++ b/src/app/clusters/network-commissioning/network-commissioning.h @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include @@ -33,9 +34,17 @@ namespace app { namespace Clusters { namespace NetworkCommissioning { +// Instance inherits privately from this class to participate in Instance::sInstances +class InstanceListNode : public IntrusiveListNodeBase<> +{ +}; + // TODO: Use macro to disable some wifi or thread class Instance : public CommandHandlerInterface, public AttributeAccessInterface, +#if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION + private InstanceListNode, +#endif public DeviceLayer::NetworkCommissioning::Internal::BaseDriver::NetworkStatusChangeCallback, public DeviceLayer::NetworkCommissioning::Internal::WirelessDriver::ConnectCallback, public DeviceLayer::NetworkCommissioning::WiFiDriver::ScanCallback, @@ -81,6 +90,17 @@ class Instance : public CommandHandlerInterface, void SendNonConcurrentConnectNetworkResponse(); #endif +// TODO: This could be guarded by a separate multi-interface condition instead +#if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION + class NetworkInstanceList : public IntrusiveList + { + public: + ~NetworkInstanceList() { this->Clear(); } + }; + + static NetworkInstanceList sInstances; +#endif + EndpointId mEndpointId = kInvalidEndpointId; const BitFlags mFeatureFlags; @@ -111,6 +131,11 @@ class Instance : public CommandHandlerInterface, void SetLastNetworkId(ByteSpan lastNetworkId); void ReportNetworksListChanged() const; +#if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION + // Disconnect if the current connection is not in the Networks list + void DisconnectLingeringConnection(); +#endif + // Commits the breadcrumb value saved in mCurrentOperationBreadcrumb to the breadcrumb attribute in GeneralCommissioning // cluster. Will set mCurrentOperationBreadcrumb to NullOptional. void CommitSavedBreadcrumb(); @@ -133,7 +158,15 @@ class Instance : public CommandHandlerInterface, Instance(EndpointId aEndpointId, DeviceLayer::NetworkCommissioning::WiFiDriver * apDelegate); Instance(EndpointId aEndpointId, DeviceLayer::NetworkCommissioning::ThreadDriver * apDelegate); Instance(EndpointId aEndpointId, DeviceLayer::NetworkCommissioning::EthernetDriver * apDelegate); - virtual ~Instance() = default; + virtual ~Instance() + { +#if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION + if (IsInList()) + { + sInstances.Remove(this); + } +#endif + } }; // NetworkDriver for the devices that don't have / don't need a real network driver. diff --git a/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp b/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp index c60fdc5255c023..cd7ba5b8f659c2 100644 --- a/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp +++ b/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.cpp @@ -94,8 +94,10 @@ CHIP_ERROR Instance::Write(const ConcreteDataAttributePath & aPath, AttributeVal switch (aPath.mAttributeId) { - case Attributes::HoldTime::Id: { - + case Attributes::HoldTime::Id: + case Attributes::PIROccupiedToUnoccupiedDelay::Id: + case Attributes::UltrasonicOccupiedToUnoccupiedDelay::Id: + case Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Id: { uint16_t newHoldTime; ReturnErrorOnFailure(aDecoder.Decode(newHoldTime)); @@ -173,16 +175,26 @@ uint16_t * GetHoldTimeForEndpoint(EndpointId endpoint) return &sHoldTime[index]; } -CHIP_ERROR SetHoldTime(EndpointId endpointId, const uint16_t & holdTime) +CHIP_ERROR SetHoldTime(EndpointId endpointId, uint16_t newHoldTime) { VerifyOrReturnError(kInvalidEndpointId != endpointId, CHIP_ERROR_INVALID_ARGUMENT); uint16_t * holdTimeForEndpoint = GetHoldTimeForEndpoint(endpointId); VerifyOrReturnError(holdTimeForEndpoint != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - *holdTimeForEndpoint = holdTime; + uint16_t previousHoldTime = *holdTimeForEndpoint; + *holdTimeForEndpoint = newHoldTime; + + if (previousHoldTime != newHoldTime) + { + MatterReportingAttributeChangeCallback(endpointId, OccupancySensing::Id, Attributes::HoldTime::Id); + } - MatterReportingAttributeChangeCallback(endpointId, OccupancySensing::Id, Attributes::HoldTime::Id); + // Blindly try to write RAM-backed legacy attributes (will fail silently if absent) + // to keep them in sync. + (void) Attributes::PIROccupiedToUnoccupiedDelay::Set(endpointId, newHoldTime); + (void) Attributes::UltrasonicOccupiedToUnoccupiedDelay::Set(endpointId, newHoldTime); + (void) Attributes::PhysicalContactOccupiedToUnoccupiedDelay::Set(endpointId, newHoldTime); return CHIP_NO_ERROR; } diff --git a/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.h b/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.h index c4c7181b626f3a..512fd288fb73cd 100644 --- a/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.h +++ b/src/app/clusters/occupancy-sensor-server/occupancy-sensor-server.h @@ -54,7 +54,7 @@ class Instance : public AttributeAccessInterface CHIP_ERROR SetHoldTimeLimits(EndpointId endpointId, const Structs::HoldTimeLimitsStruct::Type & holdTimeLimits); -CHIP_ERROR SetHoldTime(EndpointId endpointId, const uint16_t & holdTime); +CHIP_ERROR SetHoldTime(EndpointId endpointId, uint16_t newHoldTime); Structs::HoldTimeLimitsStruct::Type * GetHoldTimeLimitsForEndpoint(EndpointId endpoint); diff --git a/src/app/clusters/scenes-server/SceneHandlerImpl.cpp b/src/app/clusters/scenes-server/SceneHandlerImpl.cpp index c29d1bbd5d27e8..fcaa3985734bb2 100644 --- a/src/app/clusters/scenes-server/SceneHandlerImpl.cpp +++ b/src/app/clusters/scenes-server/SceneHandlerImpl.cpp @@ -16,10 +16,211 @@ */ #include +#include +#include +#include namespace chip { namespace scenes { +namespace { + +template +using OddSizedInteger = app::OddSizedInteger; +using ConcreteAttributePath = app::ConcreteAttributePath; +using AttributeValuePairType = app::Clusters::ScenesManagement::Structs::AttributeValuePairStruct::Type; + +/// ConvertDefaultValueToWorkingValue +/// @brief Helper function to convert a byte array to a value of the given type. +/// @param EmberAfDefaultAttributeValue & defaultValue +/// @return Value converted to the given working type +template +typename app::NumericAttributeTraits::WorkingType +ConvertDefaultValueToWorkingValue(const EmberAfDefaultAttributeValue & defaultValue) +{ + if constexpr (sizeof(typename app::NumericAttributeTraits::WorkingType) <= 2) + { + return static_cast::WorkingType>(defaultValue.defaultValue); + } + + typename app::NumericAttributeTraits::StorageType sValue; + memcpy(&sValue, defaultValue.ptrToDefaultValue, sizeof(sValue)); + return app::NumericAttributeTraits::StorageToWorking(sValue); +} + +/// IsExactlyOneValuePopulated +/// @brief Helper function to verify that exactly one value is populated in a given AttributeValuePairType +/// @param AttributeValuePairType & type AttributeValuePairType to verify +/// @return bool true if only one value is populated, false otherwise +bool IsExactlyOneValuePopulated(const AttributeValuePairType & type) +{ + int count = 0; + if (type.valueUnsigned8.HasValue()) + count++; + if (type.valueSigned8.HasValue()) + count++; + if (type.valueUnsigned16.HasValue()) + count++; + if (type.valueSigned16.HasValue()) + count++; + if (type.valueUnsigned32.HasValue()) + count++; + if (type.valueSigned32.HasValue()) + count++; + if (type.valueUnsigned64.HasValue()) + count++; + if (type.valueSigned64.HasValue()) + count++; + return count == 1; +} + +/// CapAttributeValue +/// Cap the attribute value based on the attribute's min and max if they are defined, +/// or based on the attribute's size if they are not. +/// +/// The TypeForMinMax template parameter determines the type to use for the +/// min/max computation. The Type template parameter determines how the +/// resulting value is actually represented, because for booleans we +/// unfortunately end up using uint8, not an actual boolean. +/// +/// @param[in] value The value from the AttributeValuePairType that we were given. +/// @param[in] metadata The metadata for the attribute the value is for. +/// +/// +/// +template +void CapAttributeValue(typename app::NumericAttributeTraits::WorkingType & value, const EmberAfAttributeMetadata * metadata) +{ + using IntType = app::NumericAttributeTraits; + using WorkingType = std::remove_reference_t; + + WorkingType minValue = IntType::MinValue(metadata->IsNullable()); + WorkingType maxValue = IntType::MaxValue(metadata->IsNullable()); + + // Check metadata for min and max values + if (metadata->HasMinMax()) + { + const EmberAfAttributeMinMaxValue * minMaxValue = metadata->defaultValue.ptrToMinMaxValue; + minValue = ConvertDefaultValueToWorkingValue(minMaxValue->minValue); + maxValue = ConvertDefaultValueToWorkingValue(minMaxValue->maxValue); + } + + if (metadata->IsNullable() && (minValue > value || maxValue < value)) + { + // If the attribute is nullable, the value can be set to NULL + app::NumericAttributeTraits::SetNull(value); + return; + } + + if (minValue > value) + { + value = minValue; + } + else if (maxValue < value) + { + value = maxValue; + } +} + +/// @brief Validate the attribute exists for a given cluster +/// @param[in] endpoint Endpoint ID +/// @param[in] clusterID Cluster ID +/// @param[in] aVPair AttributeValuePairType, will be mutated to cap the value if it is out of range +/// @return CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute) if the attribute does not exist for a given cluster or is not scenable +/// @note This will allways fail for global list attributes. If we do want to make them scenable someday, we will need to +/// use a different validation method. +// TODO: Add check for "S" quality to determine if the attribute is scenable once suported : +// https://github.com/project-chip/connectedhomeip/issues/24177 +CHIP_ERROR ValidateAttributePath(EndpointId endpoint, ClusterId cluster, AttributeValuePairType & aVPair) +{ + const EmberAfAttributeMetadata * metadata = emberAfLocateAttributeMetadata(endpoint, cluster, aVPair.attributeID); + + if (nullptr == metadata) + { + return CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute); + } + + // There should never be more than one populated value in an ExtensionFieldSet + VerifyOrReturnError(IsExactlyOneValuePopulated(aVPair), CHIP_ERROR_INVALID_ARGUMENT); + + switch (app::Compatibility::Internal::AttributeBaseType(metadata->attributeType)) + { + case ZCL_BOOLEAN_ATTRIBUTE_TYPE: + VerifyOrReturnError(aVPair.valueUnsigned8.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + CapAttributeValue(aVPair.valueUnsigned8.Value(), metadata); + break; + case ZCL_INT8U_ATTRIBUTE_TYPE: + VerifyOrReturnError(aVPair.valueUnsigned8.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + CapAttributeValue(aVPair.valueUnsigned8.Value(), metadata); + break; + case ZCL_INT16U_ATTRIBUTE_TYPE: + VerifyOrReturnError(aVPair.valueUnsigned16.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + CapAttributeValue(aVPair.valueUnsigned16.Value(), metadata); + break; + case ZCL_INT24U_ATTRIBUTE_TYPE: + VerifyOrReturnError(aVPair.valueUnsigned32.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + CapAttributeValue>(aVPair.valueUnsigned32.Value(), metadata); + break; + case ZCL_INT32U_ATTRIBUTE_TYPE: + VerifyOrReturnError(aVPair.valueUnsigned32.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + CapAttributeValue(aVPair.valueUnsigned32.Value(), metadata); + break; + case ZCL_INT40U_ATTRIBUTE_TYPE: + VerifyOrReturnError(aVPair.valueUnsigned64.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + CapAttributeValue>(aVPair.valueUnsigned64.Value(), metadata); + break; + case ZCL_INT48U_ATTRIBUTE_TYPE: + VerifyOrReturnError(aVPair.valueUnsigned64.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + CapAttributeValue>(aVPair.valueUnsigned64.Value(), metadata); + break; + case ZCL_INT56U_ATTRIBUTE_TYPE: + VerifyOrReturnError(aVPair.valueUnsigned64.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + CapAttributeValue>(aVPair.valueUnsigned64.Value(), metadata); + break; + case ZCL_INT64U_ATTRIBUTE_TYPE: + VerifyOrReturnError(aVPair.valueUnsigned64.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + CapAttributeValue(aVPair.valueUnsigned64.Value(), metadata); + break; + case ZCL_INT8S_ATTRIBUTE_TYPE: + VerifyOrReturnError(aVPair.valueSigned8.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + CapAttributeValue(aVPair.valueSigned8.Value(), metadata); + break; + case ZCL_INT16S_ATTRIBUTE_TYPE: + VerifyOrReturnError(aVPair.valueSigned16.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + CapAttributeValue(aVPair.valueSigned16.Value(), metadata); + break; + case ZCL_INT24S_ATTRIBUTE_TYPE: + VerifyOrReturnError(aVPair.valueSigned32.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + CapAttributeValue>(aVPair.valueSigned32.Value(), metadata); + break; + case ZCL_INT32S_ATTRIBUTE_TYPE: + VerifyOrReturnError(aVPair.valueSigned32.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + CapAttributeValue(aVPair.valueSigned32.Value(), metadata); + break; + case ZCL_INT40S_ATTRIBUTE_TYPE: + VerifyOrReturnError(aVPair.valueSigned64.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + CapAttributeValue>(aVPair.valueSigned64.Value(), metadata); + break; + case ZCL_INT48S_ATTRIBUTE_TYPE: + VerifyOrReturnError(aVPair.valueSigned64.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + CapAttributeValue>(aVPair.valueSigned64.Value(), metadata); + break; + case ZCL_INT56S_ATTRIBUTE_TYPE: + VerifyOrReturnError(aVPair.valueSigned64.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + CapAttributeValue>(aVPair.valueSigned64.Value(), metadata); + break; + case ZCL_INT64S_ATTRIBUTE_TYPE: + VerifyOrReturnError(aVPair.valueSigned64.HasValue(), CHIP_ERROR_INVALID_ARGUMENT); + CapAttributeValue(aVPair.valueSigned64.Value(), metadata); + break; + default: + return CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute); + } + + return CHIP_NO_ERROR; +} +} // namespace + CHIP_ERROR DefaultSceneHandlerImpl::EncodeAttributeValueList(const List & aVlist, MutableByteSpan & serializedBytes) { @@ -58,7 +259,9 @@ DefaultSceneHandlerImpl::SerializeAdd(EndpointId endpoint, const ExtensionFieldS auto pair_iterator = extensionFieldSet.attributeValueList.begin(); while (pair_iterator.Next()) { - aVPairs[pairCount] = pair_iterator.GetValue(); + AttributeValuePairType currentPair = pair_iterator.GetValue(); + ReturnErrorOnFailure(ValidateAttributePath(endpoint, extensionFieldSet.clusterID, currentPair)); + aVPairs[pairCount] = currentPair; pairCount++; } ReturnErrorOnFailure(pair_iterator.GetStatus()); diff --git a/src/app/clusters/scenes-server/SceneTableImpl.h b/src/app/clusters/scenes-server/SceneTableImpl.h index d77e957f5c32d2..a4259911c37b01 100644 --- a/src/app/clusters/scenes-server/SceneTableImpl.h +++ b/src/app/clusters/scenes-server/SceneTableImpl.h @@ -29,7 +29,7 @@ namespace chip { namespace scenes { -#ifdef SCENES_MANAGEMENT_TABLE_SIZE +#if defined(SCENES_MANAGEMENT_TABLE_SIZE) && SCENES_MANAGEMENT_TABLE_SIZE static constexpr uint16_t kMaxScenesPerEndpoint = SCENES_MANAGEMENT_TABLE_SIZE; #else static constexpr uint16_t kMaxScenesPerEndpoint = CHIP_CONFIG_MAX_SCENES_TABLE_SIZE; diff --git a/src/app/clusters/scenes-server/scenes-server.cpp b/src/app/clusters/scenes-server/scenes-server.cpp index acc2cd3a7dff80..ae10a3dd7ce11d 100644 --- a/src/app/clusters/scenes-server/scenes-server.cpp +++ b/src/app/clusters/scenes-server/scenes-server.cpp @@ -74,6 +74,11 @@ CHIP_ERROR AddResponseOnError(CommandHandlerInterface::HandlerContext & ctx, Res { resp.status = to_underlying(Protocols::InteractionModel::Status::ResourceExhausted); } + else if (CHIP_IM_GLOBAL_STATUS(UnsupportedAttribute) == err) + { + // TODO: Confirm if we need to add UnsupportedAttribute status as a return for Scene Commands + resp.status = to_underlying(Protocols::InteractionModel::Status::InvalidCommand); + } else { resp.status = to_underlying(StatusIB(err).mStatus); diff --git a/src/app/clusters/service-area-server/README.md b/src/app/clusters/service-area-server/README.md new file mode 100644 index 00000000000000..7f0cf642947565 --- /dev/null +++ b/src/app/clusters/service-area-server/README.md @@ -0,0 +1,35 @@ +# The Service Area Cluster + +## Cluster design + +The service area cluster is designed around three core classes: `Instance`, +`StorageDelegate`, and a second `Delegate` class. + +The `Instance` class serves as the primary interface for safely accessing and +modifying cluster attributes, adhering to the constraints outlined in the +specification document. However, it does not handle the storage of list +attributes. + +Storage management is delegated to the `StorageDelegate` class, which provides a +list of virtual methods for the user to implement. These methods are +straightforward and do not require input validation, but they should not be used +directly. + +The business logic specific to the device is encapsulated in a second `Delegate` +class. This class can access the `Instance` through the `GetInstance()` method, +enabling it to utilize all the attribute access methods provided by the +`Instance` class. This design allows for a clear separation of concerns, with +each class handling a specific aspect of the cluster's functionality. + +## How to use + +- Create a class that inherits the `ServiceArea::StorageDelegate` class. +- For this class, implement the necessary virtual methods. +- Create a class that inherits the `ServiceArea::Delegate` class. +- For this class, implement the necessary virtual methods. +- In some translation unit (.c or .cpp file), instantiate the delegate + classes. +- Instantiate the `Instance` class using the delegate instances. +- Call the `Instance`'s `Init()` method after the root `Server::Init()`. +- Alternatively, the last two steps can be done in the + `emberAfServiceAreaClusterInitCallback` function. diff --git a/src/app/clusters/service-area-server/service-area-cluster-objects.h b/src/app/clusters/service-area-server/service-area-cluster-objects.h index 470cd09c02b67d..876d628060be6f 100644 --- a/src/app/clusters/service-area-server/service-area-cluster-objects.h +++ b/src/app/clusters/service-area-server/service-area-cluster-objects.h @@ -27,8 +27,13 @@ namespace Clusters { namespace ServiceArea { // These limits are defined in the spec. -inline constexpr size_t kAreaNameMaxSize = 128u; -inline constexpr size_t kMapNameMaxSize = 64u; +inline constexpr size_t kMaxNumSupportedAreas = 255; +inline constexpr size_t kMaxNumSupportedMaps = 255; +inline constexpr size_t kMaxNumSelectedAreas = 255; +inline constexpr size_t kMaxNumProgressElements = 255; +inline constexpr size_t kMaxSizeStatusText = 256; +inline constexpr size_t kAreaNameMaxSize = 128u; +inline constexpr size_t kMapNameMaxSize = 64u; /** * This class is used to wrap the AreaStruct object and provide a more user-friendly interface for the data. diff --git a/src/app/clusters/service-area-server/service-area-delegate.h b/src/app/clusters/service-area-server/service-area-delegate.h index 7fe40bb8fe16f4..3983e8d6ed7c25 100644 --- a/src/app/clusters/service-area-server/service-area-delegate.h +++ b/src/app/clusters/service-area-server/service-area-delegate.h @@ -28,16 +28,6 @@ namespace ServiceArea { class Instance; -// ***************************************************************************** -// cluster constraints - -constexpr size_t kMaxNumSupportedAreas = 255; -constexpr size_t kMaxNumSupportedMaps = 255; -constexpr size_t kMaxNumSelectedAreas = 255; -constexpr size_t kMaxNumProgressElements = 255; - -constexpr size_t kMaxSizeStatusText = 256; - /** * ServiceArea::Delegate Defines methods for implementing application-specific * logic for the Service Area Cluster. @@ -61,12 +51,13 @@ class Delegate */ virtual CHIP_ERROR Init() { return CHIP_NO_ERROR; }; - //************************************************************************* - // Command handling support - /** * @brief Can the selected locations be set by the client in the current operating mode? - * @param[out] statusText text describing why selected locations cannot be set (if return is false). + * @param[out] statusText text describing why the selected locations cannot be set (if return is false). + * Max size kMaxSizeStatusText. + * Note: If the return is false and statusText is not successfully set, for example due to a string that can be longer than + * kMaxSizeStatusText, the size of this value should be set to 0 with .reduce_size(0) to avoid callers using un-initialized + * memory. * @return true if the current device state allows selected locations to be set by user. * * @note The statusText field SHOULD indicate why the request is not allowed, given the current mode @@ -85,7 +76,10 @@ class Delegate * * @param[in] selectedAreas List of new selected locations. * @param[out] locationStatus Success if all checks pass, error code if failure. - * @param[out] statusText text describing failure (see description above), size kMaxSizeStatusText. + * @param[out] statusText text describing failure (see description above). Max size kMaxSizeStatusText. + * Note: If the return is false and statusText is not successfully set, for example due to a string that can be longer than + * kMaxSizeStatusText, the size of this value should be set to 0 with .reduce_size(0) to avoid callers using un-initialized + * memory. * @return true if success. * * @note If the SelectAreas command is allowed when the device is operating and the selected locations change to none, the @@ -98,7 +92,10 @@ class Delegate * @brief The server instance ensures that the SelectedAreas and CurrentArea attributes are not null before * calling this method. * @param[in] skippedArea the area ID to skip. - * @param[out] skipStatusText text describing why current location cannot be skipped. + * @param[out] skipStatusText text describing why the current location cannot be skipped. Max size kMaxSizeStatusText. + * Note: If the return is false and skipStatusText is not successfully set, for example due to a string that can be longer than + * kMaxSizeStatusText, the size of this value should be set to 0 with .reduce_size(0) to avoid callers using un-initialized + * memory. * @return true if command is successful, false if the received skip request cannot be handled due to the current mode of the * device. * @@ -127,9 +124,6 @@ class Delegate return false; } - //************************************************************************* - // Supported Areas accessors - /** * @return true if the current device state allows the SupportedAreas attribute to be updated. * @@ -144,74 +138,6 @@ class Delegate */ virtual bool IsSupportedAreasChangeAllowed() = 0; - virtual uint32_t GetNumberOfSupportedAreas() = 0; - - /** - * @brief Get a supported area using the position in the list. - * @param[in] listIndex the position in the list. - * @param[out] aSupportedArea a copy of the area contents, if found. - * @return true if an area is found, false otherwise. - */ - virtual bool GetSupportedAreaByIndex(uint32_t listIndex, AreaStructureWrapper & aSupportedArea) = 0; - - /** - * @brief Get a supported area that matches a areaID. - * @param[in] aAreaId the areaID to search for. - * @param[out] listIndex the area's index in the list, if found. - * @param[out] aSupportedArea a copy of the area contents, if found. - * @return true if an area is found, false otherwise. - * - * @note may be overloaded in device implementation for optimization, if desired. - */ - virtual bool GetSupportedAreaById(uint32_t aAreaId, uint32_t & listIndex, AreaStructureWrapper & aSupportedArea); - - /** - * This method is called by the server instance to add a new area to the list. - * The server instance will ensure that the newArea is a valid, unique area. - * @param [in] newArea new area to add. - * @param [out] listIndex filled with the list index for the new area, if successful. - * @return true if successful, false otherwise. - - * @note this method SHOULD double check that the added area won't exceed the maximum list size. - */ - virtual bool AddSupportedArea(const AreaStructureWrapper & newArea, uint32_t & listIndex) = 0; - - /** - * This method is called by the server instance to modify an existing area in the list. - * The server instance will ensure that the modifiedArea is a valid, unique area. - * @param[in] listIndex The index of the area being modified. - * @param[in] modifiedArea An area with the modified contents. - * @return true if successful, false otherwise. - * - * @note this function SHOULD double check that newArea's areaID matches the object at listIndex. - */ - virtual bool ModifySupportedArea(uint32_t listIndex, const AreaStructureWrapper & modifiedArea) = 0; - - /** - * @return true if supported locations was not already null, false otherwise. - */ - virtual bool ClearSupportedAreas() = 0; - - /** - * @brief Ensure that when the Supported locations is modified, the required restrictions for the SelectedAreas, - * CurrentArea, and Progress attributes are maintained. - * - * This method will be called by the SDK whenever the adherence to the restrictions for these attributes cannot be guaranteed. - * For example, if there are deletions in the SupportedMops or SupportedAreas attributes, or if there are changes to their - * IDs. This method will no be called if the changes made to the SupportedMops or SupportedAreas attributes, ensure that the - * restrictions are adhered. For example, if there are additions or the modifications do not involve changing IDs in the - * SupportedMops or SupportedAreas attributes. - * - * The default implementation will set the SelectedAreas, CurrentArea, and Progress attributes to null. - * - * The user is free the redefine this method as their device may have more information on what has changed and may be able to - * maintain the restrictions on these attributes by selectively editing them. - */ - virtual void HandleSupportedAreasUpdated(); - - //************************************************************************* - // Supported Maps accessors - /** * @return true if the current device state allows the SupportedMaps attribute to be updated. * @@ -226,149 +152,6 @@ class Delegate */ virtual bool IsSupportedMapChangeAllowed() = 0; - virtual uint32_t GetNumberOfSupportedMaps() = 0; - - /** - * @brief Get a supported map using the position in the list. - * @param[in] listIndex the position in the list. - * @param[out] aSupportedMap copy of the map contents, if found. - * @return true if a supported map is found, false otherwise. - */ - virtual bool GetSupportedMapByIndex(uint32_t listIndex, MapStructureWrapper & aSupportedMap) = 0; - - /** - * @brief Get a supported map that matches a mapID. - * @param[in] aMapId the mapID to search for. - * @param[out] listIndex the map's index in the list, if found. - * @param[out] aSupportedMap copy of the location contents, if found. - * @return true if a supported map is found, false otherwise. - * - * @note may be overloaded in device implementation for optimization, if desired. - */ - virtual bool GetSupportedMapById(uint32_t aMapId, uint32_t & listIndex, MapStructureWrapper & aSupportedMap); - - /** - * This method is called by the server instance to add a new map to the list. - * The server instance will ensure that the newMap is a valid, unique map. - * @param[in] newMap The new map to add. - * @param[out] listIndex filled with the list index of the new map, if successful. - * @return true if successful, false otherwise. - * - * @note this function SHOULD double check that the added map won't exceed the maximum list size - */ - virtual bool AddSupportedMap(const MapStructureWrapper & newMap, uint32_t & listIndex) = 0; - - /** - * This method is called by the server instance to modify an existing map in the list. - * The server instance will ensure that the modifiedMap is a valid, unique map. - * @param[in] listIndex The index of the map being modified. - * @param[in] modifiedMapA map with the modified contents. - * @return true if successful, false otherwise. - * - * @note this function SHOULD double check that modifiedMap's mapID matches the object at listIndex. - */ - virtual bool ModifySupportedMap(uint32_t listIndex, const MapStructureWrapper & modifiedMap) = 0; - - /** - * @return true if supported maps was not already null, false otherwise. - */ - virtual bool ClearSupportedMaps() = 0; - - //************************************************************************* - // Selected Areas accessors - - virtual uint32_t GetNumberOfSelectedAreas() = 0; - - /** - * @brief Get a selected area using the position in the list. - * @param[in] listIndex the position in the list. - * @param[out] selectedArea the selected area value, if found. - * @return true if a selected area is found, false otherwise. - */ - virtual bool GetSelectedAreaByIndex(uint32_t listIndex, uint32_t & selectedArea) = 0; - - /** - * @return true if the aAreaId areaID is found in the SelectedAreas list, false otherwise. - * - * @note may be overloaded in device implementation for optimization, if desired. - */ - virtual bool IsSelectedArea(uint32_t aAreaId); - - /** - * This method is called by the server instance to add a new selected area to the list. - * The server instance will ensure that the aAreaId references a SUPPORTED area, and is unique within selected - * areas. - * @param[in] aAreaId The new areaID to add. - * @param[out] listIndex filled with the list index of the new area, if successful. - * @return true if successful, false otherwise. - * - * @note this function SHOULD double check that the added area won't exceed the maximum list size. - */ - virtual bool AddSelectedArea(uint32_t aAreaId, uint32_t & listIndex) = 0; - - /** - * @return true if selected locations was not already null, false otherwise. - */ - virtual bool ClearSelectedAreas() = 0; - - //************************************************************************* - // Progress accessors - - virtual uint32_t GetNumberOfProgressElements() = 0; - - /** - * @brief Get a progress element using the position in the list. - * @param[in] listIndex the position in the list. - * @param[out] aProgressElement copy of the progress element contents, if found. - * @return true if a progress element is found, false otherwise. - */ - virtual bool GetProgressElementByIndex(uint32_t listIndex, Structs::ProgressStruct::Type & aProgressElement) = 0; - - /** - * @brief Get a progress element that matches a areaID. - * @param[in] aAreaId the areaID to search for. - * @param[out] listIndex the location's index in the list, if found. - * @param[out] aProgressElement copy of the progress element contents, if found. - * @return true if a progress element is found, false otherwise. - * - * @note may be overloaded in device implementation for optimization, if desired. - */ - virtual bool GetProgressElementById(uint32_t aAreaId, uint32_t & listIndex, Structs::ProgressStruct::Type & aProgressElement); - - /** - * @brief Is the progress element in the progress list? - * @param[in] aAreaId location id of the progress element. - * @return true if the progress element identified by Id is in the progress list. - */ - virtual bool IsProgressElement(uint32_t aAreaId); - - /** - * This method is called by the server instance to add a new progress element to the list. - * The server instance will ensure that the newProgressElement is a valid, unique progress element. - * @param[in] newProgressElement The new element to add. - * @param[out] listIndex is filled with the list index for the new element, if successful. - * @return true if successful, false otherwise. - * - * @note this function SHOULD double check that the added element won't exceed the maximum list size. - */ - virtual bool AddProgressElement(const Structs::ProgressStruct::Type & newProgressElement, uint32_t & listIndex) = 0; - - /** - * This method is called by the server instance to modify an existing progress element in the list. - * The server instance will ensure that the modifiedProgressElement is a valid and unique progress element. - * @param[in] listIndex The list index of the progress element being modified. - * @param[in] modifiedProgressElement modified element's contents. - * @return true if successful, false otherwise. - * - * @note this function SHOULD double check that modifiedProgressElement's areaID matches the object at listIndex - */ - virtual bool ModifyProgressElement(uint32_t listIndex, const Structs::ProgressStruct::Type & modifiedProgressElement) = 0; - - /** - * @return true if progress list was not already null, false otherwise. - */ - virtual bool ClearProgress() = 0; - Instance * GetInstance() { return mInstance; } void SetInstance(Instance * aInstance) { mInstance = aInstance; } diff --git a/src/app/clusters/service-area-server/service-area-server.cpp b/src/app/clusters/service-area-server/service-area-server.cpp index 4de8f942e0251d..55ee2ab27c9943 100644 --- a/src/app/clusters/service-area-server/service-area-server.cpp +++ b/src/app/clusters/service-area-server/service-area-server.cpp @@ -46,9 +46,9 @@ namespace ServiceArea { // **************************************************************************** // Service Area Server Instance -Instance::Instance(Delegate * aDelegate, EndpointId aEndpointId, BitMask aFeature) : +Instance::Instance(StorageDelegate * storageDelegate, Delegate * aDelegate, EndpointId aEndpointId, BitMask aFeature) : AttributeAccessInterface(MakeOptional(aEndpointId), Id), CommandHandlerInterface(MakeOptional(aEndpointId), Id), - mDelegate(aDelegate), mEndpointId(aEndpointId), mClusterId(Id), mFeature(aFeature) + mStorageDelegate(storageDelegate), mDelegate(aDelegate), mEndpointId(aEndpointId), mClusterId(Id), mFeature(aFeature) { ChipLogProgress(Zcl, "Service Area: Instance constructor"); mDelegate->SetInstance(this); @@ -72,6 +72,8 @@ CHIP_ERROR Instance::Init() VerifyOrReturnError(AttributeAccessInterfaceRegistry::Instance().Register(this), CHIP_ERROR_INCORRECT_STATE); + ReturnErrorOnFailure(mStorageDelegate->Init()); + return mDelegate->Init(); } @@ -132,7 +134,7 @@ void Instance::InvokeCommand(HandlerContext & handlerContext) CHIP_ERROR Instance::ReadSupportedAreas(AttributeValueEncoder & aEncoder) { - if (mDelegate->GetNumberOfSupportedAreas() == 0) + if (GetNumberOfSupportedAreas() == 0) { return aEncoder.EncodeEmptyList(); } @@ -141,7 +143,7 @@ CHIP_ERROR Instance::ReadSupportedAreas(AttributeValueEncoder & aEncoder) uint8_t locationIndex = 0; AreaStructureWrapper supportedArea; - while (mDelegate->GetSupportedAreaByIndex(locationIndex++, supportedArea)) + while (GetSupportedAreaByIndex(locationIndex++, supportedArea)) { ReturnErrorOnFailure(encoder.Encode(supportedArea)); } @@ -151,7 +153,7 @@ CHIP_ERROR Instance::ReadSupportedAreas(AttributeValueEncoder & aEncoder) CHIP_ERROR Instance::ReadSupportedMaps(AttributeValueEncoder & aEncoder) { - if (mDelegate->GetNumberOfSupportedMaps() == 0) + if (GetNumberOfSupportedMaps() == 0) { return aEncoder.EncodeEmptyList(); } @@ -160,7 +162,7 @@ CHIP_ERROR Instance::ReadSupportedMaps(AttributeValueEncoder & aEncoder) uint32_t mapIndex = 0; MapStructureWrapper supportedMap; - while (mDelegate->GetSupportedMapByIndex(mapIndex++, supportedMap)) + while (GetSupportedMapByIndex(mapIndex++, supportedMap)) { ReturnErrorOnFailure(encoder.Encode(supportedMap)); } @@ -170,7 +172,7 @@ CHIP_ERROR Instance::ReadSupportedMaps(AttributeValueEncoder & aEncoder) CHIP_ERROR Instance::ReadSelectedAreas(AttributeValueEncoder & aEncoder) { - if (mDelegate->GetNumberOfSelectedAreas() == 0) + if (GetNumberOfSelectedAreas() == 0) { return aEncoder.EncodeEmptyList(); } @@ -179,7 +181,7 @@ CHIP_ERROR Instance::ReadSelectedAreas(AttributeValueEncoder & aEncoder) uint32_t locationIndex = 0; uint32_t selectedArea; - while (mDelegate->GetSelectedAreaByIndex(locationIndex++, selectedArea)) + while (GetSelectedAreaByIndex(locationIndex++, selectedArea)) { ReturnErrorOnFailure(encoder.Encode(selectedArea)); } @@ -189,7 +191,7 @@ CHIP_ERROR Instance::ReadSelectedAreas(AttributeValueEncoder & aEncoder) CHIP_ERROR Instance::ReadProgress(AttributeValueEncoder & aEncoder) { - if (mDelegate->GetNumberOfProgressElements() == 0) + if (GetNumberOfProgressElements() == 0) { return aEncoder.EncodeEmptyList(); } @@ -198,7 +200,7 @@ CHIP_ERROR Instance::ReadProgress(AttributeValueEncoder & aEncoder) uint32_t locationIndex = 0; Structs::ProgressStruct::Type progressElement; - while (mDelegate->GetProgressElementByIndex(locationIndex++, progressElement)) + while (GetProgressElementByIndex(locationIndex++, progressElement)) { ReturnErrorOnFailure(encoder.Encode(progressElement)); } @@ -257,7 +259,7 @@ void Instance::HandleSelectAreasCmd(HandlerContext & ctx, const Commands::Select }; // if number of selected locations in parameter matches number in attribute - the locations *might* be the same - bool matchesCurrentSelectedAreas = (numberOfAreas == mDelegate->GetNumberOfSelectedAreas()); + bool matchesCurrentSelectedAreas = (numberOfAreas == GetNumberOfSelectedAreas()); // do as much parameter validation as we can if (numberOfAreas != 0) @@ -277,7 +279,7 @@ void Instance::HandleSelectAreasCmd(HandlerContext & ctx, const Commands::Select // each item in this list SHALL match the AreaID field of an entry on the SupportedAreas attribute's list // If the Status field is set to UnsupportedArea, the StatusText field SHALL be an empty string. - if (!IsSupportedArea(selectedArea)) + if (!mStorageDelegate->IsSupportedArea(selectedArea)) { exitResponse(SelectAreasStatus::kUnsupportedArea, ""_span); return; @@ -286,7 +288,7 @@ void Instance::HandleSelectAreasCmd(HandlerContext & ctx, const Commands::Select // check to see if parameter list and attribute still match if (matchesCurrentSelectedAreas) { - if (!mDelegate->GetSelectedAreaByIndex(ignoredIndex, oldSelectedArea) || (selectedArea != oldSelectedArea)) + if (!GetSelectedAreaByIndex(ignoredIndex, oldSelectedArea) || (selectedArea != oldSelectedArea)) { matchesCurrentSelectedAreas = false; } @@ -346,14 +348,14 @@ void Instance::HandleSelectAreasCmd(HandlerContext & ctx, const Commands::Select // indicated by the entries of the newArea field, when requested to operate, // the SelectAreasResponse command SHALL have the Status field set to Success, // and the SelectedAreas attribute SHALL be set to the value of the newAreas field. - mDelegate->ClearSelectedAreas(); + mStorageDelegate->ClearSelectedAreasRaw(); if (numberOfAreas != 0) { uint32_t ignored; for (uint32_t areaId : selectedAreasSpan) { - mDelegate->AddSelectedArea(areaId, ignored); + mStorageDelegate->AddSelectedAreaRaw(areaId, ignored); } } @@ -378,7 +380,7 @@ void Instance::HandleSkipAreaCmd(HandlerContext & ctx, const Commands::SkipArea: // The SkippedArea field SHALL match an entry in the SupportedAreas list. // If the Status field is set to InvalidAreaList, the StatusText field SHALL be an empty string. - if (!IsSupportedArea(req.skippedArea)) + if (!mStorageDelegate->IsSupportedArea(req.skippedArea)) { ChipLogError(Zcl, "SkippedArea (%" PRIu32 ") is not in the SupportedAreas attribute.", req.skippedArea); exitResponse(SkipAreaStatus::kInvalidAreaList, ""_span); @@ -437,14 +439,6 @@ void Instance::NotifyProgressChanged() // **************************************************************************** // Supported Areas manipulators -bool Instance::IsSupportedArea(uint32_t aAreaId) -{ - uint32_t ignoredIndex; - AreaStructureWrapper ignoredArea; - - return mDelegate->GetSupportedAreaById(aAreaId, ignoredIndex, ignoredArea); -} - bool Instance::IsValidSupportedArea(const AreaStructureWrapper & aArea) { // If the LocationInfo field is null, the LandmarkInfo field SHALL NOT be null. @@ -470,7 +464,7 @@ bool Instance::IsValidSupportedArea(const AreaStructureWrapper & aArea) } // The mapID field SHALL be null if SupportedMaps is not supported or SupportedMaps is an empty list. - if (mFeature.Has(Feature::kMaps) && (mDelegate->GetNumberOfSupportedMaps() > 0)) + if (mFeature.Has(Feature::kMaps) && (GetNumberOfSupportedMaps() > 0)) { if (aArea.mapID.IsNull()) { @@ -480,7 +474,7 @@ bool Instance::IsValidSupportedArea(const AreaStructureWrapper & aArea) } // If the SupportedMaps attribute is not null, mapID SHALL be the ID of an entry from the SupportedMaps attribute. - if (!IsSupportedMap(aArea.mapID.Value())) + if (!mStorageDelegate->IsSupportedMap(aArea.mapID.Value())) { ChipLogError(Zcl, "IsValidSupportedArea %" PRIu32 " - map Id %" PRIu32 " is not in supported map list", aArea.areaID, aArea.mapID.Value()); @@ -512,14 +506,14 @@ bool Instance::IsUniqueSupportedArea(const AreaStructureWrapper & aArea, bool ig // If the SupportedMaps attribute is not null, each entry in this list SHALL have a unique value for the combination of the // MapID and LocationInfo fields. If the SupportedMaps attribute is null, each entry in this list SHALL have a unique value for // the LocationInfo field. - if (mDelegate->GetNumberOfSupportedMaps() == 0) + if (GetNumberOfSupportedMaps() == 0) { config.Set(AreaStructureWrapper::IsEqualConfig::kIgnoreMapId); } uint8_t locationIndex = 0; AreaStructureWrapper entry; - while (mDelegate->GetSupportedAreaByIndex(locationIndex++, entry)) + while (GetSupportedAreaByIndex(locationIndex++, entry)) { if (aArea.IsEqual(entry, config)) { @@ -567,6 +561,99 @@ bool Instance::ReportEstimatedEndTimeChange(const DataModel::Nullable return (aEstimatedEndTime.Value() < mEstimatedEndTime.Value()); } +void Instance::HandleSupportedAreasUpdated() +{ + // If there are no more Supported Areas, clear all selected areas, current area, and progress. + if (GetNumberOfSupportedAreas() == 0) + { + ClearSelectedAreas(); + SetCurrentArea(DataModel::NullNullable); + ClearProgress(); + return; + } + + // Remove Selected Areas elements that do not exist is the Supported Areas attribute. + { + uint32_t i = 0; + uint32_t areaId = 0; + uint32_t areasToRemoveIndex = 0; + uint32_t areasToRemoveBuffer[kMaxNumSelectedAreas]; + Span areasToRemoveSpan(areasToRemoveBuffer); + + while (GetSelectedAreaByIndex(i, areaId)) + { + if (!mStorageDelegate->IsSupportedArea(areaId)) + { + areasToRemoveSpan[areasToRemoveIndex] = areaId; + areasToRemoveIndex++; + } + i++; + } + areasToRemoveSpan.reduce_size(areasToRemoveIndex); + + for (auto id : areasToRemoveSpan) + { + if (!RemoveSelectedAreas(id)) + { + ChipLogError(Zcl, "HandleSupportedAreasUpdated: Failed to remove area %" PRIu32 " from selected areas", id); + } + } + } + + // Set current Area to null if current area is not in the supported areas attribute. + { + auto currentAreaId = GetCurrentArea(); + if (!currentAreaId.IsNull() && !mStorageDelegate->IsSupportedArea(currentAreaId.Value())) + { + SetCurrentArea(DataModel::NullNullable); + } + } + + // Remove Progress elements associated with areas that do not exist is the Supported Areas attribute. + { + uint32_t i = 0; + Structs::ProgressStruct::Type tempProgressElement; + uint32_t progressToRemoveIndex = 0; + uint32_t progressToRemoveBuffer[kMaxNumProgressElements]; + Span progressToRemoveSpan(progressToRemoveBuffer); + + while (mStorageDelegate->GetProgressElementByIndex(i, tempProgressElement)) + { + if (mStorageDelegate->IsSupportedArea(tempProgressElement.areaID)) + { + progressToRemoveSpan[progressToRemoveIndex] = tempProgressElement.areaID; + progressToRemoveIndex++; + } + i++; + } + progressToRemoveSpan.reduce_size(progressToRemoveIndex); + + for (auto areaId : progressToRemoveSpan) + { + if (!mStorageDelegate->RemoveProgressElementRaw(areaId)) + { + ChipLogError(Zcl, "HandleSupportedAreasUpdated: Failed to remove progress element with area ID %" PRIu32 "", + areaId); + } + } + } +} + +uint32_t Instance::GetNumberOfSupportedAreas() +{ + return mStorageDelegate->GetNumberOfSupportedAreas(); +} + +bool Instance::GetSupportedAreaByIndex(uint32_t listIndex, AreaStructureWrapper & aSupportedArea) +{ + return mStorageDelegate->GetSupportedAreaByIndex(listIndex, aSupportedArea); +} + +bool Instance::GetSupportedAreaById(uint32_t aAreaId, uint32_t & listIndex, AreaStructureWrapper & aSupportedArea) +{ + return mStorageDelegate->GetSupportedAreaById(aAreaId, listIndex, aSupportedArea); +} + bool Instance::AddSupportedArea(AreaStructureWrapper & aNewArea) { // Does device mode allow this attribute to be updated? @@ -576,16 +663,16 @@ bool Instance::AddSupportedArea(AreaStructureWrapper & aNewArea) } // Check there is space for the entry. - if (mDelegate->GetNumberOfSupportedAreas() >= kMaxNumSupportedAreas) + if (GetNumberOfSupportedAreas() >= kMaxNumSupportedAreas) { - ChipLogError(Zcl, "AddSupportedArea %" PRIu32 " - too many entries", aNewArea.areaID); + ChipLogError(Zcl, "AddSupportedAreaRaw %" PRIu32 " - too many entries", aNewArea.areaID); return false; } // Verify cluster requirements concerning valid fields and field relationships. if (!IsValidSupportedArea(aNewArea)) { - ChipLogError(Zcl, "AddSupportedArea %" PRIu32 " - not a valid location object", aNewArea.areaID); + ChipLogError(Zcl, "AddSupportedAreaRaw %" PRIu32 " - not a valid location object", aNewArea.areaID); return false; } @@ -595,13 +682,13 @@ bool Instance::AddSupportedArea(AreaStructureWrapper & aNewArea) // the AreaInfo field. if (!IsUniqueSupportedArea(aNewArea, false)) { - ChipLogError(Zcl, "AddSupportedArea %" PRIu32 " - not a unique location object", aNewArea.areaID); + ChipLogError(Zcl, "AddSupportedAreaRaw %" PRIu32 " - not a unique location object", aNewArea.areaID); return false; } // Add the SupportedArea to the SupportedAreas attribute. uint32_t ignoredIndex; - if (!mDelegate->AddSupportedArea(aNewArea, ignoredIndex)) + if (!mStorageDelegate->AddSupportedAreaRaw(aNewArea, ignoredIndex)) { return false; } @@ -617,9 +704,9 @@ bool Instance::ModifySupportedArea(AreaStructureWrapper & aNewArea) // get existing supported location to modify AreaStructureWrapper supportedArea; - if (!mDelegate->GetSupportedAreaById(aNewArea.areaID, listIndex, supportedArea)) + if (!GetSupportedAreaById(aNewArea.areaID, listIndex, supportedArea)) { - ChipLogError(Zcl, "ModifySupportedArea %" PRIu32 " - not a supported areaID", aNewArea.areaID); + ChipLogError(Zcl, "ModifySupportedAreaRaw %" PRIu32 " - not a supported areaID", aNewArea.areaID); return false; } @@ -639,7 +726,7 @@ bool Instance::ModifySupportedArea(AreaStructureWrapper & aNewArea) // verify cluster requirements concerning valid fields and field relationships if (!IsValidSupportedArea(aNewArea)) { - ChipLogError(Zcl, "ModifySupportedArea %" PRIu32 " - not a valid location object", aNewArea.areaID); + ChipLogError(Zcl, "ModifySupportedAreaRaw %" PRIu32 " - not a valid location object", aNewArea.areaID); return false; } @@ -647,12 +734,12 @@ bool Instance::ModifySupportedArea(AreaStructureWrapper & aNewArea) // We ignore comparing the area ID as one of the locations will match this one. if (!IsUniqueSupportedArea(aNewArea, true)) { - ChipLogError(Zcl, "ModifySupportedArea %" PRIu32 " - not a unique location object", aNewArea.areaID); + ChipLogError(Zcl, "ModifySupportedAreaRaw %" PRIu32 " - not a unique location object", aNewArea.areaID); return false; } // Replace the supported location with the modified location. - if (!mDelegate->ModifySupportedArea(listIndex, aNewArea)) + if (!mStorageDelegate->ModifySupportedAreaRaw(listIndex, aNewArea)) { return false; } @@ -660,7 +747,7 @@ bool Instance::ModifySupportedArea(AreaStructureWrapper & aNewArea) if (mapIDChanged) { - mDelegate->HandleSupportedAreasUpdated(); + HandleSupportedAreasUpdated(); } NotifySupportedAreasChanged(); @@ -675,9 +762,9 @@ bool Instance::ClearSupportedAreas() return false; } - if (mDelegate->ClearSupportedAreas()) + if (mStorageDelegate->ClearSupportedAreasRaw()) { - mDelegate->HandleSupportedAreasUpdated(); + HandleSupportedAreasUpdated(); NotifySupportedAreasChanged(); return true; } @@ -685,30 +772,48 @@ bool Instance::ClearSupportedAreas() return false; } +bool Instance::RemoveSupportedArea(uint32_t areaId) +{ + if (mStorageDelegate->RemoveSupportedAreaRaw(areaId)) + { + HandleSupportedAreasUpdated(); + NotifySupportedAreasChanged(); + return true; + } + return false; +} + //************************************************************************* // Supported Maps manipulators -bool Instance::IsSupportedMap(uint32_t aMapId) +uint32_t Instance::GetNumberOfSupportedMaps() { - uint32_t ignoredIndex; - MapStructureWrapper ignoredMap; + return mStorageDelegate->GetNumberOfSupportedMaps(); +} + +bool Instance::GetSupportedMapByIndex(uint32_t listIndex, MapStructureWrapper & aSupportedMap) +{ + return mStorageDelegate->GetSupportedMapByIndex(listIndex, aSupportedMap); +} - return mDelegate->GetSupportedMapById(aMapId, ignoredIndex, ignoredMap); +bool Instance::GetSupportedMapById(uint32_t aMapId, uint32_t & listIndex, MapStructureWrapper & aSupportedMap) +{ + return mStorageDelegate->GetSupportedMapById(aMapId, listIndex, aSupportedMap); } bool Instance::AddSupportedMap(uint32_t aMapId, const CharSpan & aMapName) { // check max# of list entries - if (mDelegate->GetNumberOfSupportedMaps() >= kMaxNumSupportedMaps) + if (GetNumberOfSupportedMaps() >= kMaxNumSupportedMaps) { - ChipLogError(Zcl, "AddSupportedMap %" PRIu32 " - maximum number of entries", aMapId); + ChipLogError(Zcl, "AddSupportedMapRaw %" PRIu32 " - maximum number of entries", aMapId); return false; } // Map name SHALL include readable text that describes the map name (cannot be empty string). if (aMapName.empty()) { - ChipLogError(Zcl, "AddSupportedMap %" PRIu32 " - Name must not be empty string", aMapId); + ChipLogError(Zcl, "AddSupportedMapRaw %" PRIu32 " - Name must not be empty string", aMapId); return false; } @@ -716,12 +821,12 @@ bool Instance::AddSupportedMap(uint32_t aMapId, const CharSpan & aMapName) uint8_t mapIndex = 0; MapStructureWrapper entry; - while (mDelegate->GetSupportedMapByIndex(mapIndex++, entry)) + while (GetSupportedMapByIndex(mapIndex++, entry)) { // the name cannot be the same as an existing map if (entry.IsNameEqual(aMapName)) { - ChipLogError(Zcl, "AddSupportedMap %" PRIu32 " - A map already exists with same name '%.*s'", aMapId, + ChipLogError(Zcl, "AddSupportedMapRaw %" PRIu32 " - A map already exists with same name '%.*s'", aMapId, static_cast(entry.GetName().size()), entry.GetName().data()); return false; } @@ -729,7 +834,7 @@ bool Instance::AddSupportedMap(uint32_t aMapId, const CharSpan & aMapName) // Each entry in this list SHALL have a unique value for the MapID field. if (aMapId == entry.mapID) { - ChipLogError(Zcl, "AddSupportedMap - non-unique Id %" PRIu32 "", aMapId); + ChipLogError(Zcl, "AddSupportedMapRaw - non-unique Id %" PRIu32 "", aMapId); return false; } } @@ -738,7 +843,7 @@ bool Instance::AddSupportedMap(uint32_t aMapId, const CharSpan & aMapName) // add to supported maps attribute MapStructureWrapper newMap(aMapId, aMapName); uint32_t ignoredIndex; - if (!mDelegate->AddSupportedMap(newMap, ignoredIndex)) + if (!mStorageDelegate->AddSupportedMapRaw(newMap, ignoredIndex)) { return false; } @@ -755,7 +860,7 @@ bool Instance::RenameSupportedMap(uint32_t aMapId, const CharSpan & newMapName) MapStructureWrapper modifiedMap; // get existing entry - if (!mDelegate->GetSupportedMapById(aMapId, modifiedIndex, modifiedMap)) + if (!GetSupportedMapById(aMapId, modifiedIndex, modifiedMap)) { ChipLogError(Zcl, "RenameSupportedMap Id %" PRIu32 " - map does not exist", aMapId); return false; @@ -775,7 +880,7 @@ bool Instance::RenameSupportedMap(uint32_t aMapId, const CharSpan & newMapName) uint32_t loopIndex = 0; MapStructureWrapper entry; - while (mDelegate->GetSupportedMapByIndex(loopIndex, entry)) + while (GetSupportedMapByIndex(loopIndex, entry)) { if (modifiedIndex == loopIndex) { @@ -792,7 +897,7 @@ bool Instance::RenameSupportedMap(uint32_t aMapId, const CharSpan & newMapName) ++loopIndex; } - if (!mDelegate->ModifySupportedMap(modifiedIndex, modifiedMap)) + if (!mStorageDelegate->ModifySupportedMapRaw(modifiedIndex, modifiedMap)) { return false; } @@ -810,7 +915,7 @@ bool Instance::ClearSupportedMaps() return false; } - if (mDelegate->ClearSupportedMaps()) + if (mStorageDelegate->ClearSupportedMapsRaw()) { ClearSupportedAreas(); NotifySupportedMapsChanged(); @@ -820,29 +925,88 @@ bool Instance::ClearSupportedMaps() return false; } +bool Instance::RemoveSupportedMap(uint32_t mapId) +{ + if (!mStorageDelegate->RemoveSupportedMapRaw(mapId)) + { + return false; + } + + NotifySupportedMapsChanged(); + + // If there are no supported maps left, none of the supported areas are vaild and their MapID needs to be null. + if (GetNumberOfSupportedMaps() == 0) + { + ClearSupportedAreas(); + return true; + } + + // Get the supported area IDs where the map ID matches the removed map ID. + uint32_t supportedAreaIdsBuffer[kMaxNumSupportedAreas]; + Span supportedAreaIdsSpan(supportedAreaIdsBuffer); + { + uint32_t supportedAreaIdsSize = 0; + uint32_t supportedAreasIndex = 0; + AreaStructureWrapper tempSupportedArea; + while (mStorageDelegate->GetSupportedAreaByIndex(supportedAreasIndex, tempSupportedArea)) + { + if (tempSupportedArea.mapID == mapId) + { + supportedAreaIdsSpan[supportedAreasIndex] = tempSupportedArea.areaID; + supportedAreaIdsSize++; + } + supportedAreasIndex++; + } + + supportedAreaIdsSpan.reduce_size(supportedAreaIdsSize); + } + + if (!supportedAreaIdsSpan.empty()) + { + for (uint32_t supportedAreaId : supportedAreaIdsSpan) + { + mStorageDelegate->RemoveSupportedAreaRaw(supportedAreaId); + } + HandleSupportedAreasUpdated(); + NotifySupportedAreasChanged(); + } + + return true; +} + //************************************************************************* // Selected Areas manipulators +uint32_t Instance::GetNumberOfSelectedAreas() +{ + return mStorageDelegate->GetNumberOfSelectedAreas(); +} + +bool Instance::GetSelectedAreaByIndex(uint32_t listIndex, uint32_t & selectedArea) +{ + return mStorageDelegate->GetSelectedAreaByIndex(listIndex, selectedArea); +} + bool Instance::AddSelectedArea(uint32_t & aSelectedArea) { // check max# of list entries - if (mDelegate->GetNumberOfSelectedAreas() >= kMaxNumSelectedAreas) + if (GetNumberOfSelectedAreas() >= kMaxNumSelectedAreas) { - ChipLogError(Zcl, "AddSelectedArea %" PRIu32 " - maximum number of entries", aSelectedArea); + ChipLogError(Zcl, "AddSelectedAreaRaw %" PRIu32 " - maximum number of entries", aSelectedArea); return false; } // each item in this list SHALL match the AreaID field of an entry on the SupportedAreas attribute's list - if (!IsSupportedArea(aSelectedArea)) + if (!mStorageDelegate->IsSupportedArea(aSelectedArea)) { - ChipLogError(Zcl, "AddSelectedArea %" PRIu32 " - not a supported location", aSelectedArea); + ChipLogError(Zcl, "AddSelectedAreaRaw %" PRIu32 " - not a supported location", aSelectedArea); return false; } // each entry in this list SHALL have a unique value - if (mDelegate->IsSelectedArea(aSelectedArea)) + if (mStorageDelegate->IsSelectedArea(aSelectedArea)) { - ChipLogError(Zcl, "AddSelectedArea %" PRIu32 " - duplicated location", aSelectedArea); + ChipLogError(Zcl, "AddSelectedAreaRaw %" PRIu32 " - duplicated location", aSelectedArea); return false; } @@ -852,18 +1016,29 @@ bool Instance::AddSelectedArea(uint32_t & aSelectedArea) if (!mDelegate->IsSetSelectedAreasAllowed(locationStatusText)) { - ChipLogError(Zcl, "AddSelectedArea %" PRIu32 " - %.*s", aSelectedArea, static_cast(locationStatusText.size()), + ChipLogError(Zcl, "AddSelectedAreaRaw %" PRIu32 " - %.*s", aSelectedArea, static_cast(locationStatusText.size()), locationStatusText.data()); return false; } uint32_t ignoredIndex; - return mDelegate->AddSelectedArea(aSelectedArea, ignoredIndex); + return mStorageDelegate->AddSelectedAreaRaw(aSelectedArea, ignoredIndex); } bool Instance::ClearSelectedAreas() { - if (mDelegate->ClearSelectedAreas()) + if (mStorageDelegate->ClearSelectedAreasRaw()) + { + NotifySelectedAreasChanged(); + return true; + } + + return false; +} + +bool Instance::RemoveSelectedAreas(uint32_t areaId) +{ + if (mStorageDelegate->RemoveSelectedAreasRaw(areaId)) { NotifySelectedAreasChanged(); return true; @@ -884,7 +1059,7 @@ bool Instance::SetCurrentArea(const DataModel::Nullable & aCurrentArea { // If not null, the value of this attribute SHALL match the AreaID field of an entry on the SupportedAreas attribute's // list. - if ((!aCurrentArea.IsNull()) && (!IsSupportedArea(aCurrentArea.Value()))) + if ((!aCurrentArea.IsNull()) && (!mStorageDelegate->IsSupportedArea(aCurrentArea.Value()))) { ChipLogError(Zcl, "SetCurrentArea %" PRIu32 " - location is not supported", aCurrentArea.Value()); return false; @@ -940,27 +1115,42 @@ bool Instance::SetEstimatedEndTime(const DataModel::Nullable & aEstima //************************************************************************* // Progress list manipulators +uint32_t Instance::GetNumberOfProgressElements() +{ + return mStorageDelegate->GetNumberOfProgressElements(); +} + +bool Instance::GetProgressElementByIndex(uint32_t listIndex, Structs::ProgressStruct::Type & aProgressElement) +{ + return mStorageDelegate->GetProgressElementByIndex(listIndex, aProgressElement); +} + +bool Instance::GetProgressElementById(uint32_t aAreaId, uint32_t & listIndex, Structs::ProgressStruct::Type & aProgressElement) +{ + return mStorageDelegate->GetProgressElementById(aAreaId, listIndex, aProgressElement); +} + bool Instance::AddPendingProgressElement(uint32_t aAreaId) { // create progress element Structs::ProgressStruct::Type inactiveProgress = { aAreaId, OperationalStatusEnum::kPending }; // check max# of list entries - if (mDelegate->GetNumberOfProgressElements() >= kMaxNumProgressElements) + if (GetNumberOfProgressElements() >= kMaxNumProgressElements) { ChipLogError(Zcl, "AddPendingProgressElement - maximum number of entries"); return false; } // For each entry in this list, the AreaID field SHALL match an entry on the SupportedAreas attribute's list. - if (!IsSupportedArea(aAreaId)) + if (!mStorageDelegate->IsSupportedArea(aAreaId)) { ChipLogError(Zcl, "AddPendingProgressElement - not a supported location %" PRIu32 "", aAreaId); return false; } // Each entry in this list SHALL have a unique value for the AreaID field. - if (mDelegate->IsProgressElement(aAreaId)) + if (mStorageDelegate->IsProgressElement(aAreaId)) { ChipLogError(Zcl, "AddPendingProgressElement - progress element already exists for location %" PRIu32 "", aAreaId); return false; @@ -968,7 +1158,7 @@ bool Instance::AddPendingProgressElement(uint32_t aAreaId) uint32_t ignoredIndex; - if (!mDelegate->AddProgressElement(inactiveProgress, ignoredIndex)) + if (!mStorageDelegate->AddProgressElementRaw(inactiveProgress, ignoredIndex)) { return false; } @@ -982,7 +1172,7 @@ bool Instance::SetProgressStatus(uint32_t aAreaId, OperationalStatusEnum opStatu uint32_t listIndex; Structs::ProgressStruct::Type progressElement; - if (!mDelegate->GetProgressElementById(aAreaId, listIndex, progressElement)) + if (!GetProgressElementById(aAreaId, listIndex, progressElement)) { ChipLogError(Zcl, "SetProgressStatus - progress element does not exist for location %" PRIu32 "", aAreaId); return false; @@ -1004,7 +1194,7 @@ bool Instance::SetProgressStatus(uint32_t aAreaId, OperationalStatusEnum opStatu } // add the updated element to the progress attribute - if (!mDelegate->ModifyProgressElement(listIndex, progressElement)) + if (!mStorageDelegate->ModifyProgressElementRaw(listIndex, progressElement)) { return false; } @@ -1018,7 +1208,7 @@ bool Instance::SetProgressTotalOperationalTime(uint32_t aAreaId, const DataModel uint32_t listIndex; Structs::ProgressStruct::Type progressElement; - if (!mDelegate->GetProgressElementById(aAreaId, listIndex, progressElement)) + if (!GetProgressElementById(aAreaId, listIndex, progressElement)) { ChipLogError(Zcl, "SetProgressTotalOperationalTime - progress element does not exist for location %" PRIu32 "", aAreaId); return false; @@ -1047,7 +1237,7 @@ bool Instance::SetProgressTotalOperationalTime(uint32_t aAreaId, const DataModel progressElement.totalOperationalTime.Emplace(aTotalOperationalTime); // add the updated element to the progress attribute - if (!mDelegate->ModifyProgressElement(listIndex, progressElement)) + if (!mStorageDelegate->ModifyProgressElementRaw(listIndex, progressElement)) { return false; } @@ -1061,7 +1251,7 @@ bool Instance::SetProgressEstimatedTime(uint32_t aAreaId, const DataModel::Nulla uint32_t listIndex; Structs::ProgressStruct::Type progressElement; - if (!mDelegate->GetProgressElementById(aAreaId, listIndex, progressElement)) + if (!GetProgressElementById(aAreaId, listIndex, progressElement)) { ChipLogError(Zcl, "SetProgressEstimatedTime - progress element does not exist for location %" PRIu32 "", aAreaId); return false; @@ -1077,7 +1267,7 @@ bool Instance::SetProgressEstimatedTime(uint32_t aAreaId, const DataModel::Nulla progressElement.estimatedTime.Emplace(aEstimatedTime); // add the updated element to the progress attribute - if (!mDelegate->ModifyProgressElement(listIndex, progressElement)) + if (!mStorageDelegate->ModifyProgressElementRaw(listIndex, progressElement)) { return false; } @@ -1088,7 +1278,18 @@ bool Instance::SetProgressEstimatedTime(uint32_t aAreaId, const DataModel::Nulla bool Instance::ClearProgress() { - if (mDelegate->ClearProgress()) + if (mStorageDelegate->ClearProgressRaw()) + { + NotifyProgressChanged(); + return true; + } + + return false; +} + +bool Instance::RemoveProgressElement(uint32_t areaId) +{ + if (mStorageDelegate->RemoveProgressElementRaw(areaId)) { NotifyProgressChanged(); return true; diff --git a/src/app/clusters/service-area-server/service-area-server.h b/src/app/clusters/service-area-server/service-area-server.h index e023f24d129261..1b2f72730402b9 100644 --- a/src/app/clusters/service-area-server/service-area-server.h +++ b/src/app/clusters/service-area-server/service-area-server.h @@ -20,6 +20,7 @@ #include "service-area-cluster-objects.h" #include "service-area-delegate.h" +#include "service-area-storage-delegate.h" #include #include @@ -56,7 +57,8 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface * * @note the caller must ensure that the delegate lives throughout the instance's lifetime. */ - Instance(Delegate * aDelegate, EndpointId aEndpointId, BitMask aFeature); + Instance(StorageDelegate * storageDelegate, Delegate * aDelegate, EndpointId aEndpointId, + BitMask aFeature); ~Instance() override; @@ -68,12 +70,15 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface /** * @brief Initialise the Service Area server instance. - * @return an error if the given endpoint and cluster Id have not been enabled in zap or if the - * CommandHandler or AttributeHandler registration fails, else CHIP_NO_ERROR. + * @return CHIP_NO_ERROR if there are on errors. Returns an error if + * - the given endpoint and cluster ID have not been enabled in zap + * - if the CommandHandler or AttributeHandler registration fails + * - if the StorageDelegate or Delegate initialisation fails. */ CHIP_ERROR Init(); private: + StorageDelegate * mStorageDelegate; Delegate * mDelegate; EndpointId mEndpointId; ClusterId mClusterId; @@ -137,12 +142,7 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface void NotifyProgressChanged(); //************************************************************************* - // Supported Areas manipulators - - /** - * @return true if an area with the aAreaId ID exists in the supported areas attribute. False otherwise. - */ - bool IsSupportedArea(uint32_t aAreaId); + // Supported Areas helpers /** * @brief Check if the given area adheres to the restrictions required by the supported areas attribute. @@ -167,7 +167,38 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface */ bool ReportEstimatedEndTimeChange(const DataModel::Nullable & aEstimatedEndTime); + /** + * This method will ensure that the values in the Selected Areas, Current Area and Progress attributes correspond to areas in + * the Supported Areas attribute. + * Any invalid area IDs in the Selected Areas attribute will be removed. + * If the Current Area is not in the Selected Areas attribute, it will be set to null. + * Any progres elements with area IDs not in the Selected Areas attribute will be removed. + */ + virtual void HandleSupportedAreasUpdated(); + public: + //************************************************************************* + // Supported Areas accessors and manipulators + + uint32_t GetNumberOfSupportedAreas(); + + /** + * @brief Get a supported area using the position in the list. + * @param[in] listIndex the position in the list. + * @param[out] aSupportedArea a copy of the area contents, if found. + * @return true if an area is found, false otherwise. + */ + bool GetSupportedAreaByIndex(uint32_t listIndex, AreaStructureWrapper & aSupportedArea); + + /** + * @brief Get a supported area that matches a areaID. + * @param[in] aAreaId the areaID to search for. + * @param[out] listIndex the area's index in the list, if found. + * @param[out] aSupportedArea a copy of the area contents, if found. + * @return true if an area is found, false otherwise. + */ + bool GetSupportedAreaById(uint32_t aAreaId, uint32_t & listIndex, AreaStructureWrapper & aSupportedArea); + /** * @brief Add new location to the supported locations list. * @param[in] aNewArea The area to add. @@ -195,13 +226,36 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface */ bool ClearSupportedAreas(); + /** + * Removes the supported area with areaId. + * If a supported area is removed, the Delegate's HandleSupportedAreasUpdated method is called to ensure that the + * SelectedAreas, CurrentArea, and Progress attributes remain valid. + * @param areaId The ID of the area to be removed. + * @return true if an area with the areaId was removed. False otherwise. + */ + bool RemoveSupportedArea(uint32_t areaId); + //************************************************************************* - // Supported Maps manipulators + // Supported Maps accessors and manipulators + + uint32_t GetNumberOfSupportedMaps(); + + /** + * @brief Get a supported map using the position in the list. + * @param[in] listIndex the position in the list. + * @param[out] aSupportedMap copy of the map contents, if found. + * @return true if a supported map is found, false otherwise. + */ + bool GetSupportedMapByIndex(uint32_t listIndex, MapStructureWrapper & aSupportedMap); /** - * @return true if a map with the aMapId ID exists in the supported maps attribute. False otherwise. + * @brief Get a supported map that matches a mapID. + * @param[in] aMapId the mapID to search for. + * @param[out] listIndex the map's index in the list, if found. + * @param[out] aSupportedMap copy of the location contents, if found. + * @return true if a supported map is found, false otherwise. */ - bool IsSupportedMap(uint32_t aMapId); + bool GetSupportedMapById(uint32_t aMapId, uint32_t & listIndex, MapStructureWrapper & aSupportedMap); /** * @brief Add a new map to the supported maps list. @@ -228,8 +282,26 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface */ bool ClearSupportedMaps(); + /** + * Removes the supported map with mapId. + * If a supported map is removed, any supported areas that are no longer valid will also be removed. + * @param mapId the ID of the map to be removed. + * @return true if a map is removed. False otherwise. + */ + bool RemoveSupportedMap(uint32_t mapId); + //************************************************************************* - // Selected Areas manipulators + // Selected Areas accessors and manipulators + + uint32_t GetNumberOfSelectedAreas(); + + /** + * @brief Get a selected area using the position in the list. + * @param[in] listIndex the position in the list. + * @param[out] selectedArea the selected area value, if found. + * @return true if a selected area is found, false otherwise. + */ + bool GetSelectedAreaByIndex(uint32_t listIndex, uint32_t & selectedArea); /** * @brief Add a selected area. @@ -243,8 +315,14 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface */ bool ClearSelectedAreas(); + /** + * @param areaId the area ID to be removed from the SelectedAreas attribute. + * @return ture if this ID was removed, false otherwise. + */ + bool RemoveSelectedAreas(uint32_t areaId); + //************************************************************************* - // Current Area manipulators + // Current Area accessors and manipulators DataModel::Nullable GetCurrentArea(); @@ -258,7 +336,7 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface bool SetCurrentArea(const DataModel::Nullable & aCurrentArea); //************************************************************************* - // Estimated End Time manipulators + // Estimated End Time accessors and manipulators /** * @return The estimated epoch time in seconds when operation at the location indicated by the CurrentArea attribute will be @@ -274,7 +352,26 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface bool SetEstimatedEndTime(const DataModel::Nullable & aEstimatedEndTime); //************************************************************************* - // Progress list manipulators + // Progress list accessors and manipulators + + uint32_t GetNumberOfProgressElements(); + + /** + * @brief Get a progress element using the position in the list. + * @param[in] listIndex the position in the list. + * @param[out] aProgressElement copy of the progress element contents, if found. + * @return true if a progress element is found, false otherwise. + */ + bool GetProgressElementByIndex(uint32_t listIndex, Structs::ProgressStruct::Type & aProgressElement); + + /** + * @brief Get a progress element that matches a areaID. + * @param[in] aAreaId the areaID to search for. + * @param[out] listIndex the location's index in the list, if found. + * @param[out] aProgressElement copy of the progress element contents, if found. + * @return true if a progress element is found, false otherwise. + */ + bool GetProgressElementById(uint32_t aAreaId, uint32_t & listIndex, Structs::ProgressStruct::Type & aProgressElement); /** * @brief Add a progress element in a pending status to the progress list. @@ -314,6 +411,12 @@ class Instance : public AttributeAccessInterface, public CommandHandlerInterface */ bool ClearProgress(); + /** + * @param areaId the area ID of the progress element to be removed. + * @return ture if the progress element was removed, false otherwise. + */ + bool RemoveProgressElement(uint32_t areaId); + //************************************************************************* // Feature Map attribute diff --git a/src/app/clusters/service-area-server/service-area-delegate.cpp b/src/app/clusters/service-area-server/service-area-storage-delegate.cpp similarity index 56% rename from src/app/clusters/service-area-server/service-area-delegate.cpp rename to src/app/clusters/service-area-server/service-area-storage-delegate.cpp index 9b63eb5b9f2496..43330fccba7697 100644 --- a/src/app/clusters/service-area-server/service-area-delegate.cpp +++ b/src/app/clusters/service-area-server/service-area-storage-delegate.cpp @@ -1,9 +1,8 @@ -#include "service-area-delegate.h" -#include "service-area-server.h" +#include "service-area-storage-delegate.h" using namespace chip::app::Clusters::ServiceArea; -bool Delegate::GetSupportedAreaById(uint32_t aAreaId, uint32_t & listIndex, AreaStructureWrapper & aSupportedArea) +bool StorageDelegate::GetSupportedAreaById(uint32_t aAreaId, uint32_t & listIndex, AreaStructureWrapper & aSupportedArea) { listIndex = 0; @@ -21,14 +20,20 @@ bool Delegate::GetSupportedAreaById(uint32_t aAreaId, uint32_t & listIndex, Area return false; } -void Delegate::HandleSupportedAreasUpdated() +bool StorageDelegate::IsSupportedArea(uint32_t aAreaId) { - mInstance->ClearSelectedAreas(); - mInstance->SetCurrentArea(DataModel::NullNullable); - mInstance->ClearProgress(); + uint32_t ignoredIndex; + AreaStructureWrapper ignoredArea; + + return GetSupportedAreaById(aAreaId, ignoredIndex, ignoredArea); } -bool Delegate::GetSupportedMapById(uint32_t aMapId, uint32_t & listIndex, MapStructureWrapper & aSupportedMap) +bool StorageDelegate::RemoveSupportedAreaRaw(uint32_t areaId) +{ + return false; +} + +bool StorageDelegate::GetSupportedMapById(uint32_t aMapId, uint32_t & listIndex, MapStructureWrapper & aSupportedMap) { listIndex = 0; @@ -45,7 +50,20 @@ bool Delegate::GetSupportedMapById(uint32_t aMapId, uint32_t & listIndex, MapStr return false; } -bool Delegate::IsSelectedArea(uint32_t aAreaId) +bool StorageDelegate::IsSupportedMap(uint32_t aMapId) +{ + uint32_t ignoredIndex; + MapStructureWrapper ignoredMap; + + return GetSupportedMapById(aMapId, ignoredIndex, ignoredMap); +} + +bool StorageDelegate::RemoveSupportedMapRaw(uint32_t mapId) +{ + return false; +} + +bool StorageDelegate::IsSelectedArea(uint32_t aAreaId) { uint32_t listIndex = 0; uint32_t selectedArea; @@ -63,7 +81,8 @@ bool Delegate::IsSelectedArea(uint32_t aAreaId) return false; } -bool Delegate::GetProgressElementById(uint32_t aAreaId, uint32_t & listIndex, Structs::ProgressStruct::Type & aProgressElement) +bool StorageDelegate::GetProgressElementById(uint32_t aAreaId, uint32_t & listIndex, + Structs::ProgressStruct::Type & aProgressElement) { listIndex = 0; @@ -81,7 +100,7 @@ bool Delegate::GetProgressElementById(uint32_t aAreaId, uint32_t & listIndex, St return false; } -bool Delegate::IsProgressElement(uint32_t aAreaId) +bool StorageDelegate::IsProgressElement(uint32_t aAreaId) { uint32_t index; Structs::ProgressStruct::Type progressElement; @@ -89,5 +108,5 @@ bool Delegate::IsProgressElement(uint32_t aAreaId) return GetProgressElementById(aAreaId, index, progressElement); } -// todo: Should we add default implementations for the accessor methods of the non-mandatory attributes? +// todo: Should we add default implementations for the accessor methods of the optional attributes? // This is so that devices that do not support these attributes are not forced to provide an implementation. diff --git a/src/app/clusters/service-area-server/service-area-storage-delegate.h b/src/app/clusters/service-area-server/service-area-storage-delegate.h new file mode 100644 index 00000000000000..2ad0f0674d9d77 --- /dev/null +++ b/src/app/clusters/service-area-server/service-area-storage-delegate.h @@ -0,0 +1,280 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include "service-area-cluster-objects.h" + +namespace chip { +namespace app { +namespace Clusters { +namespace ServiceArea { + +/** + * ServiceArea::StorageDelegate Defines methods for implementing target/application-specific + * logic for managing the storage of some Service Area cluster attributes. + */ +class StorageDelegate +{ +public: + StorageDelegate() = default; + virtual ~StorageDelegate() = default; + + /** + * @brief This method will be called during the ServiceArea server initialization after the Instance information has been + * validated and the Instance has been registered. This can be used to initialise the memory required. + */ + virtual CHIP_ERROR Init() { return CHIP_NO_ERROR; }; + + //************************************************************************* + // Supported Areas accessors and manipulators + + virtual uint32_t GetNumberOfSupportedAreas() = 0; + + /** + * @brief Get a supported area using the position in the list. + * @param[in] listIndex the position in the list. + * @param[out] aSupportedArea a copy of the area contents, if found. + * @return true if an area is found, false otherwise. + */ + virtual bool GetSupportedAreaByIndex(uint32_t listIndex, AreaStructureWrapper & aSupportedArea) = 0; + + /** + * @brief Get a supported area that matches a areaID. + * @param[in] aAreaId the areaID to search for. + * @param[out] listIndex the area's index in the list, if found. + * @param[out] aSupportedArea a copy of the area contents, if found. + * @return true if an area is found, false otherwise. + * + * @note may be overloaded in device implementation for optimization, if desired. + */ + virtual bool GetSupportedAreaById(uint32_t aAreaId, uint32_t & listIndex, AreaStructureWrapper & aSupportedArea); + + /** + * @return true if an area with the aAreaId ID exists in the supported areas attribute. False otherwise. + */ + virtual bool IsSupportedArea(uint32_t aAreaId); + + /** + * This method is called by the server instance to add a new area to the list. + * The server instance will ensure that the newArea is a valid, unique area. + * @param [in] newArea new area to add. + * @param [out] listIndex filled with the list index for the new area, if successful. + * @return true if successful, false otherwise. + + * @note this method SHOULD double check that the added area won't exceed the maximum list size. + */ + virtual bool AddSupportedAreaRaw(const AreaStructureWrapper & newArea, uint32_t & listIndex) = 0; + + /** + * This method is called by the server instance to modify an existing area in the list. + * The server instance will ensure that the modifiedArea is a valid, unique area. + * @param[in] listIndex The index of the area being modified. + * @param[in] modifiedArea An area with the modified contents. + * @return true if successful, false otherwise. + * + * @note this function SHOULD double check that newArea's areaID matches the object at listIndex. + */ + virtual bool ModifySupportedAreaRaw(uint32_t listIndex, const AreaStructureWrapper & modifiedArea) = 0; + + /** + * @return true if supported locations was not already null, false otherwise. + */ + virtual bool ClearSupportedAreasRaw() = 0; + + /** + * @param areaId the ID af the area to be removed. + * @return true if the area was removed, false otherwise. + */ + virtual bool RemoveSupportedAreaRaw(uint32_t areaId); + + //************************************************************************* + // Supported Maps accessors and manipulators + + virtual uint32_t GetNumberOfSupportedMaps() = 0; + + /** + * @brief Get a supported map using the position in the list. + * @param[in] listIndex the position in the list. + * @param[out] aSupportedMap copy of the map contents, if found. + * @return true if a supported map is found, false otherwise. + */ + virtual bool GetSupportedMapByIndex(uint32_t listIndex, MapStructureWrapper & aSupportedMap) = 0; + + /** + * @brief Get a supported map that matches a mapID. + * @param[in] aMapId the mapID to search for. + * @param[out] listIndex the map's index in the list, if found. + * @param[out] aSupportedMap copy of the location contents, if found. + * @return true if a supported map is found, false otherwise. + * + * @note may be overloaded in device implementation for optimization, if desired. + */ + virtual bool GetSupportedMapById(uint32_t aMapId, uint32_t & listIndex, MapStructureWrapper & aSupportedMap); + + /** + * @return true if a map with the aMapId ID exists in the supported maps attribute. False otherwise. + */ + bool IsSupportedMap(uint32_t aMapId); + + /** + * This method is called by the server instance to add a new map to the list. + * The server instance will ensure that the newMap is a valid, unique map. + * @param[in] newMap The new map to add. + * @param[out] listIndex filled with the list index of the new map, if successful. + * @return true if successful, false otherwise. + * + * @note this function SHOULD double check that the added map won't exceed the maximum list size + */ + virtual bool AddSupportedMapRaw(const MapStructureWrapper & newMap, uint32_t & listIndex) = 0; + + /** + * This method is called by the server instance to modify an existing map in the list. + * The server instance will ensure that the modifiedMap is a valid, unique map. + * @param[in] listIndex The index of the map being modified. + * @param[in] modifiedMapA map with the modified contents. + * @return true if successful, false otherwise. + * + * @note this function SHOULD double check that modifiedMap's mapID matches the object at listIndex. + */ + virtual bool ModifySupportedMapRaw(uint32_t listIndex, const MapStructureWrapper & modifiedMap) = 0; + + /** + * @return true if supported maps was not already null, false otherwise. + */ + virtual bool ClearSupportedMapsRaw() = 0; + + /** + * @param mapId the ID of the map to be removed. + * @return true if a map is removed. False otherwise. + */ + virtual bool RemoveSupportedMapRaw(uint32_t mapId); + + //************************************************************************* + // Selected Areas accessors and manipulators + + virtual uint32_t GetNumberOfSelectedAreas() = 0; + + /** + * @brief Get a selected area using the position in the list. + * @param[in] listIndex the position in the list. + * @param[out] selectedArea the selected area value, if found. + * @return true if a selected area is found, false otherwise. + */ + virtual bool GetSelectedAreaByIndex(uint32_t listIndex, uint32_t & selectedArea) = 0; + + /** + * @return true if the aAreaId areaID is found in the SelectedAreas list, false otherwise. + * + * @note may be overloaded in device implementation for optimization, if desired. + */ + virtual bool IsSelectedArea(uint32_t aAreaId); + + /** + * This method is called by the server instance to add a new selected area to the list. + * The server instance will ensure that the aAreaId references a SUPPORTED area, and is unique within selected + * areas. + * @param[in] aAreaId The new areaID to add. + * @param[out] listIndex filled with the list index of the new area, if successful. + * @return true if successful, false otherwise. + * + * @note this function SHOULD double check that the added area won't exceed the maximum list size. + */ + virtual bool AddSelectedAreaRaw(uint32_t aAreaId, uint32_t & listIndex) = 0; + + /** + * @return true if selected locations was not already null, false otherwise. + */ + virtual bool ClearSelectedAreasRaw() = 0; + + /** + * @param areaId the area ID to be removed from the SelectedAreas attribute. + * @return ture if this ID was removed, false otherwise. + */ + virtual bool RemoveSelectedAreasRaw(uint32_t areaId) = 0; + + //************************************************************************* + // Progress accessors and manipulators + + virtual uint32_t GetNumberOfProgressElements() = 0; + + /** + * @brief Get a progress element using the position in the list. + * @param[in] listIndex the position in the list. + * @param[out] aProgressElement copy of the progress element contents, if found. + * @return true if a progress element is found, false otherwise. + */ + virtual bool GetProgressElementByIndex(uint32_t listIndex, Structs::ProgressStruct::Type & aProgressElement) = 0; + + /** + * @brief Get a progress element that matches a areaID. + * @param[in] aAreaId the areaID to search for. + * @param[out] listIndex the location's index in the list, if found. + * @param[out] aProgressElement copy of the progress element contents, if found. + * @return true if a progress element is found, false otherwise. + * + * @note may be overloaded in device implementation for optimization, if desired. + */ + virtual bool GetProgressElementById(uint32_t aAreaId, uint32_t & listIndex, Structs::ProgressStruct::Type & aProgressElement); + + /** + * @brief Is the progress element in the progress list? + * @param[in] aAreaId location id of the progress element. + * @return true if the progress element identified by Id is in the progress list. + */ + virtual bool IsProgressElement(uint32_t aAreaId); + + /** + * This method is called by the server instance to add a new progress element to the list. + * The server instance will ensure that the newProgressElement is a valid, unique progress element. + * @param[in] newProgressElement The new element to add. + * @param[out] listIndex is filled with the list index for the new element, if successful. + * @return true if successful, false otherwise. + * + * @note this function SHOULD double check that the added element won't exceed the maximum list size. + */ + virtual bool AddProgressElementRaw(const Structs::ProgressStruct::Type & newProgressElement, uint32_t & listIndex) = 0; + + /** + * This method is called by the server instance to modify an existing progress element in the list. + * The server instance will ensure that the modifiedProgressElement is a valid and unique progress element. + * @param[in] listIndex The list index of the progress element being modified. + * @param[in] modifiedProgressElement modified element's contents. + * @return true if successful, false otherwise. + * + * @note this function SHOULD double check that modifiedProgressElement's areaID matches the object at listIndex + */ + virtual bool ModifyProgressElementRaw(uint32_t listIndex, const Structs::ProgressStruct::Type & modifiedProgressElement) = 0; + + /** + * @return true if progress list was not already null, false otherwise. + */ + virtual bool ClearProgressRaw() = 0; + + /** + * @param areaId the area ID of the progress element to be removed. + * @return ture if the progress element was removed, false otherwise. + */ + virtual bool RemoveProgressElementRaw(uint32_t areaId) = 0; +}; + +} // namespace ServiceArea +} // namespace Clusters +} // namespace app +} // namespace chip diff --git a/src/app/clusters/thermostat-server/thermostat-delegate.h b/src/app/clusters/thermostat-server/thermostat-delegate.h index ccb690a34fba60..5f11ab59889430 100644 --- a/src/app/clusters/thermostat-server/thermostat-delegate.h +++ b/src/app/clusters/thermostat-server/thermostat-delegate.h @@ -103,7 +103,7 @@ class Delegate * @return CHIP_NO_ERROR if the preset was appended to the list successfully. * @return CHIP_ERROR if there was an error adding the preset to the list. */ - virtual CHIP_ERROR AppendToPendingPresetList(const Structs::PresetStruct::Type & preset) = 0; + virtual CHIP_ERROR AppendToPendingPresetList(const PresetStructWithOwnedMembers & preset) = 0; /** * @brief Get the Preset at a given index in the pending presets list. diff --git a/src/app/clusters/thermostat-server/thermostat-server-presets.cpp b/src/app/clusters/thermostat-server/thermostat-server-presets.cpp index e57c2f9c95f8fd..9413513fd0cedd 100644 --- a/src/app/clusters/thermostat-server/thermostat-server-presets.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server-presets.cpp @@ -38,16 +38,16 @@ namespace { * @return true If the preset is valid i.e the PresetHandle (if not null) fits within size constraints and the presetScenario enum * value is valid. Otherwise, return false. */ -bool IsValidPresetEntry(const PresetStruct::Type & preset) +bool IsValidPresetEntry(const PresetStructWithOwnedMembers & preset) { // Check that the preset handle is not too long. - if (!preset.presetHandle.IsNull() && preset.presetHandle.Value().size() > kPresetHandleSize) + if (!preset.GetPresetHandle().IsNull() && preset.GetPresetHandle().Value().size() > kPresetHandleSize) { return false; } // Ensure we have a valid PresetScenario. - return (preset.presetScenario != PresetScenarioEnum::kUnknownEnumValue); + return (preset.GetPresetScenario() != PresetScenarioEnum::kUnknownEnumValue); } /** @@ -123,7 +123,7 @@ bool MatchingPendingPresetExists(Delegate * delegate, const PresetStructWithOwne * * @return true if a matching entry was found in the presets attribute list, false otherwise. */ -bool GetMatchingPresetInPresets(Delegate * delegate, const PresetStruct::Type & presetToMatch, +bool GetMatchingPresetInPresets(Delegate * delegate, const DataModel::Nullable & presetHandle, PresetStructWithOwnedMembers & matchingPreset) { VerifyOrReturnValue(delegate != nullptr, false); @@ -143,7 +143,7 @@ bool GetMatchingPresetInPresets(Delegate * delegate, const PresetStruct::Type & } // Note: presets coming from our delegate always have a handle. - if (presetToMatch.presetHandle.Value().data_equal(matchingPreset.GetPresetHandle().Value())) + if (presetHandle.Value().data_equal(matchingPreset.GetPresetHandle().Value())) { return true; } @@ -351,57 +351,89 @@ Status ThermostatAttrAccess::SetActivePreset(EndpointId endpoint, DataModel::Nul return Status::Success; } -CHIP_ERROR ThermostatAttrAccess::AppendPendingPreset(Thermostat::Delegate * delegate, const PresetStruct::Type & preset) +CHIP_ERROR ThermostatAttrAccess::AppendPendingPreset(Thermostat::Delegate * delegate, const PresetStruct::Type & newPreset) { + PresetStructWithOwnedMembers preset = newPreset; if (!IsValidPresetEntry(preset)) { return CHIP_IM_GLOBAL_STATUS(ConstraintError); } - if (preset.presetHandle.IsNull()) + if (preset.GetPresetHandle().IsNull()) { if (IsBuiltIn(preset)) { return CHIP_IM_GLOBAL_STATUS(ConstraintError); } + // Force to be false, if passed as null + preset.SetBuiltIn(false); } else { - auto & presetHandle = preset.presetHandle.Value(); - // Per spec we need to check that: // (a) There is an existing non-pending preset with this handle. PresetStructWithOwnedMembers matchingPreset; - if (!GetMatchingPresetInPresets(delegate, preset, matchingPreset)) + if (!GetMatchingPresetInPresets(delegate, preset.GetPresetHandle().Value(), matchingPreset)) { return CHIP_IM_GLOBAL_STATUS(NotFound); } // (b) There is no existing pending preset with this handle. - if (CountPresetsInPendingListWithPresetHandle(delegate, presetHandle) > 0) + if (CountPresetsInPendingListWithPresetHandle(delegate, preset.GetPresetHandle().Value()) > 0) { return CHIP_IM_GLOBAL_STATUS(ConstraintError); } + const auto & presetBuiltIn = preset.GetBuiltIn(); + const auto & matchingPresetBuiltIn = matchingPreset.GetBuiltIn(); // (c)/(d) The built-in fields do not have a mismatch. - // TODO: What's the story with nullability on the BuiltIn field? - if (!preset.builtIn.IsNull() && !matchingPreset.GetBuiltIn().IsNull() && - preset.builtIn.Value() != matchingPreset.GetBuiltIn().Value()) + if (presetBuiltIn.IsNull()) { - return CHIP_IM_GLOBAL_STATUS(ConstraintError); + if (matchingPresetBuiltIn.IsNull()) + { + // This really shouldn't happen; internal presets should alway have built-in set + return CHIP_IM_GLOBAL_STATUS(InvalidInState); + } + preset.SetBuiltIn(matchingPresetBuiltIn.Value()); + } + else + { + if (matchingPresetBuiltIn.IsNull()) + { + // This really shouldn't happen; internal presets should alway have built-in set + return CHIP_IM_GLOBAL_STATUS(InvalidInState); + } + if (presetBuiltIn.Value() != matchingPresetBuiltIn.Value()) + { + return CHIP_IM_GLOBAL_STATUS(ConstraintError); + } } } - if (!PresetScenarioExistsInPresetTypes(delegate, preset.presetScenario)) + if (!PresetScenarioExistsInPresetTypes(delegate, preset.GetPresetScenario())) { return CHIP_IM_GLOBAL_STATUS(ConstraintError); } - if (preset.name.HasValue() && !PresetTypeSupportsNames(delegate, preset.presetScenario)) + if (preset.GetName().HasValue() && !PresetTypeSupportsNames(delegate, preset.GetPresetScenario())) { return CHIP_IM_GLOBAL_STATUS(ConstraintError); } + // Before adding this preset to the pending presets, if the expected length of the pending presets' list + // exceeds the total number of presets supported, return RESOURCE_EXHAUSTED. Note that the preset has not been appended yet. + + uint8_t numberOfPendingPresets = CountNumberOfPendingPresets(delegate); + + // We will be adding one more preset, so reject if the length is already at max. + if (numberOfPendingPresets >= delegate->GetNumberOfPresets()) + { + return CHIP_IM_GLOBAL_STATUS(ResourceExhausted); + } + + // TODO #34556 : Check if the number of presets for each presetScenario exceeds the max number of presets supported for that + // scenario. We plan to support only one preset for each presetScenario for our use cases so defer this for re-evaluation. + return delegate->AppendToPendingPresetList(preset); } @@ -504,25 +536,6 @@ Status ThermostatAttrAccess::PrecommitPresets(EndpointId endpoint) } } - uint8_t totalCount = CountNumberOfPendingPresets(delegate); - - uint8_t numberOfPresetsSupported = delegate->GetNumberOfPresets(); - - if (numberOfPresetsSupported == 0) - { - ChipLogError(Zcl, "emberAfThermostatClusterCommitPresetsSchedulesRequestCallback: Failed to get NumberOfPresets"); - return Status::InvalidInState; - } - - // If the expected length of the presets attribute with the applied changes exceeds the total number of presets supported, - // return RESOURCE_EXHAUSTED. Note that the changes are not yet applied. - if (numberOfPresetsSupported > 0 && totalCount > numberOfPresetsSupported) - { - return Status::ResourceExhausted; - } - - // TODO: Check if the number of presets for each presetScenario exceeds the max number of presets supported for that - // scenario. We plan to support only one preset for each presetScenario for our use cases so defer this for re-evaluation. return Status::Success; } diff --git a/src/app/clusters/thermostat-server/thermostat-server.cpp b/src/app/clusters/thermostat-server/thermostat-server.cpp index fe8ccf8aab3cf0..9e6e0f074d5e52 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.cpp +++ b/src/app/clusters/thermostat-server/thermostat-server.cpp @@ -468,6 +468,52 @@ void ThermostatAttrAccess::OnFabricRemoved(const FabricTable & fabricTable, Fabr } } +void MatterThermostatClusterServerAttributeChangedCallback(const ConcreteAttributePath & attributePath) +{ + uint32_t flags; + if (FeatureMap::Get(attributePath.mEndpointId, &flags) != Status::Success) + { + ChipLogError(Zcl, "MatterThermostatClusterServerAttributeChangedCallback: could not get feature flags"); + return; + } + + auto featureMap = BitMask(flags); + if (!featureMap.Has(Feature::kPresets)) + { + // This server does not support presets, so nothing to do + return; + } + + bool occupied = true; + if (featureMap.Has(Feature::kOccupancy)) + { + BitMask occupancy; + if (Occupancy::Get(attributePath.mEndpointId, &occupancy) == Status::Success) + { + occupied = occupancy.Has(OccupancyBitmap::kOccupied); + } + } + + bool clearActivePreset = false; + switch (attributePath.mAttributeId) + { + case OccupiedHeatingSetpoint::Id: + case OccupiedCoolingSetpoint::Id: + clearActivePreset = occupied; + break; + case UnoccupiedHeatingSetpoint::Id: + case UnoccupiedCoolingSetpoint::Id: + clearActivePreset = !occupied; + break; + } + if (!clearActivePreset) + { + return; + } + ChipLogProgress(Zcl, "Setting active preset to null"); + gThermostatAttrAccess.SetActivePreset(attributePath.mEndpointId, std::nullopt); +} + } // namespace Thermostat } // namespace Clusters } // namespace app @@ -762,6 +808,11 @@ MatterThermostatClusterServerPreAttributeChangedCallback(const app::ConcreteAttr } } +void MatterThermostatClusterServerAttributeChangedCallback(const ConcreteAttributePath & attributePath) +{ + Thermostat::MatterThermostatClusterServerAttributeChangedCallback(attributePath); +} + bool emberAfThermostatClusterClearWeeklyScheduleCallback(app::CommandHandler * commandObj, const app::ConcreteCommandPath & commandPath, const Commands::ClearWeeklySchedule::DecodableType & commandData) diff --git a/src/app/clusters/thermostat-server/thermostat-server.h b/src/app/clusters/thermostat-server/thermostat-server.h index cc941cfa766d92..2d365ffd8288d1 100644 --- a/src/app/clusters/thermostat-server/thermostat-server.h +++ b/src/app/clusters/thermostat-server/thermostat-server.h @@ -207,6 +207,7 @@ class ThermostatAttrAccess : public chip::app::AttributeAccessInterface, public friend void TimerExpiredCallback(System::Layer * systemLayer, void * callbackContext); friend void MatterThermostatClusterServerShutdownCallback(EndpointId endpoint); + friend void MatterThermostatClusterServerAttributeChangedCallback(const chip::app::ConcreteAttributePath & attributePath); friend bool emberAfThermostatClusterSetActivePresetRequestCallback( CommandHandler * commandObj, const ConcreteCommandPath & commandPath, diff --git a/src/app/clusters/thread-network-directory-server/thread-network-directory-server.cpp b/src/app/clusters/thread-network-directory-server/thread-network-directory-server.cpp index 64aa0a583738c6..5718c39e6f719a 100644 --- a/src/app/clusters/thread-network-directory-server/thread-network-directory-server.cpp +++ b/src/app/clusters/thread-network-directory-server/thread-network-directory-server.cpp @@ -182,9 +182,9 @@ void ThreadNetworkDirectoryServer::HandleAddNetworkRequest(HandlerContext & ctx, { OperationalDataset dataset; ByteSpan extendedPanIdSpan; + uint64_t activeTimestamp; union { - uint64_t activeTimestamp; uint16_t channel; uint8_t masterKey[kSizeMasterKey]; uint8_t meshLocalPrefix[kSizeMeshLocalPrefix]; @@ -203,7 +203,7 @@ void ThreadNetworkDirectoryServer::HandleAddNetworkRequest(HandlerContext & ctx, // TODO: An immutable OperationalDatasetView on top of a ByteSpan (without copying) would be useful here. SuccessOrExitAction(err = dataset.Init(req.operationalDataset), context = "OperationalDataset"); SuccessOrExitAction(err = dataset.GetExtendedPanIdAsByteSpan(extendedPanIdSpan), context = "ExtendedPanID"); - SuccessOrExitAction(err = dataset.GetActiveTimestamp(unused.activeTimestamp), context = "ActiveTimestamp"); + SuccessOrExitAction(err = dataset.GetActiveTimestamp(activeTimestamp), context = "ActiveTimestamp"); SuccessOrExitAction(err = dataset.GetChannel(unused.channel), context = "Channel"); SuccessOrExitAction(err = dataset.GetChannelMask(unusedSpan), context = "ChannelMask"); SuccessOrExitAction(err = dataset.GetMasterKey(unused.masterKey), context = "NetworkKey"); @@ -214,6 +214,27 @@ void ThreadNetworkDirectoryServer::HandleAddNetworkRequest(HandlerContext & ctx, SuccessOrExitAction(err = dataset.GetSecurityPolicy(unused.securityPolicy), context = "SecurityContext"); status = IMStatus::Failure; + + // "If the received dataset has an Active Timestamp that is less than or equal to that of the existing entry, + // then the update SHALL be rejected with a status of INVALID_IN_STATE." + { + uint8_t datasetBuffer[kSizeOperationalDataset]; + MutableByteSpan datasetSpan(datasetBuffer); + err = mStorage.GetNetworkDataset(ExtendedPanId(extendedPanIdSpan), datasetSpan); + if (err != CHIP_ERROR_NOT_FOUND) + { + SuccessOrExit(err); + SuccessOrExit(err = dataset.Init(datasetSpan)); + uint64_t existingActiveTimestamp; + SuccessOrExit(err = dataset.GetActiveTimestamp(existingActiveTimestamp)); + if (activeTimestamp <= existingActiveTimestamp) + { + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, IMStatus::InvalidInState, "ActiveTimestamp"); + return; + } + } + } + SuccessOrExit(err = mStorage.AddOrUpdateNetwork(ExtendedPanId(extendedPanIdSpan), req.operationalDataset)); ctx.mCommandHandler.AddStatus(ctx.mRequestPath, IMStatus::Success); @@ -266,6 +287,12 @@ void ThreadNetworkDirectoryServer::HandleOperationalDatasetRequest( { CHIP_ERROR err; + if (ctx.mCommandHandler.GetSubjectDescriptor().authMode != Access::AuthMode::kCase) + { + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, IMStatus::UnsupportedAccess); + return; + } + if (req.extendedPanID.size() != ExtendedPanId::size()) { ctx.mCommandHandler.AddStatus(ctx.mRequestPath, IMStatus::ConstraintError); diff --git a/src/app/clusters/water-heater-management-server/water-heater-management-server.cpp b/src/app/clusters/water-heater-management-server/water-heater-management-server.cpp index 3cbe76f60d38f4..165fc94fb319a2 100644 --- a/src/app/clusters/water-heater-management-server/water-heater-management-server.cpp +++ b/src/app/clusters/water-heater-management-server/water-heater-management-server.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -36,7 +37,59 @@ namespace app { namespace Clusters { namespace WaterHeaterManagement { -constexpr uint16_t kClusterRevision = 1; +constexpr uint16_t kClusterRevision = 2; + +/*************************************************************************** + * + * The Delegate implementation + * + ***************************************************************************/ + +CHIP_ERROR Delegate::GenerateBoostStartedEvent(uint32_t durationSecs, Optional oneShot, Optional emergencyBoost, + Optional temporarySetpoint, Optional targetPercentage, + Optional targetReheat) +{ + Events::BoostStarted::Type event; + EventNumber eventNumber; + + event.boostInfo.duration = durationSecs; + event.boostInfo.oneShot = oneShot; + event.boostInfo.emergencyBoost = emergencyBoost; + event.boostInfo.temporarySetpoint = temporarySetpoint; + event.boostInfo.targetPercentage = targetPercentage; + event.boostInfo.targetReheat = targetReheat; + + CHIP_ERROR err = LogEvent(event, mEndpointId, eventNumber); + if (CHIP_NO_ERROR != err) + { + ChipLogError(AppServer, "Unable to generate BoostStarted event: %" CHIP_ERROR_FORMAT, err.Format()); + return err; + } + + return err; +} + +CHIP_ERROR Delegate::GenerateBoostEndedEvent() +{ + Events::BoostEnded::Type event; + EventNumber eventNumber; + ChipLogError(AppServer, "Delegate::GenerateBoostEndedEvent"); + + CHIP_ERROR err = LogEvent(event, mEndpointId, eventNumber); + if (CHIP_NO_ERROR != err) + { + ChipLogError(AppServer, "Unable to generate BoostEnded event: %" CHIP_ERROR_FORMAT, err.Format()); + return err; + } + + return err; +} + +/*************************************************************************** + * + * The Instance implementation + * + ***************************************************************************/ CHIP_ERROR Instance::Init() { diff --git a/src/app/clusters/water-heater-management-server/water-heater-management-server.h b/src/app/clusters/water-heater-management-server/water-heater-management-server.h index 71a52de9b45eef..25ff16265b6df7 100644 --- a/src/app/clusters/water-heater-management-server/water-heater-management-server.h +++ b/src/app/clusters/water-heater-management-server/water-heater-management-server.h @@ -108,10 +108,30 @@ class Delegate virtual BitMask GetHeaterTypes() = 0; virtual BitMask GetHeatDemand() = 0; virtual uint16_t GetTankVolume() = 0; - virtual int64_t GetEstimatedHeatRequired() = 0; + virtual Energy_mWh GetEstimatedHeatRequired() = 0; virtual Percent GetTankPercentage() = 0; virtual BoostStateEnum GetBoostState() = 0; + // ------------------------------------------------------------------ + // Event generation + + /** + * @brief Generates a BoostStarted event. + * The parameters are same as those passed to HandleBoost(). + * + * @return CHIP_NO_ERROR if the event was successfully generated, otherwise an error. + */ + CHIP_ERROR GenerateBoostStartedEvent(uint32_t durationSecs, Optional oneShot, Optional emergencyBoost, + Optional temporarySetpoint, Optional targetPercentage, + Optional targetReheat); + + /** + * @brief Generates a BoostEnded event. + * + * @return CHIP_NO_ERROR if the event was successfully generated, otherwise an error. + */ + CHIP_ERROR GenerateBoostEndedEvent(); + protected: EndpointId mEndpointId = 0; }; diff --git a/src/app/clusters/wifi-network-management-server/wifi-network-management-server.cpp b/src/app/clusters/wifi-network-management-server/wifi-network-management-server.cpp index 79aac105e4e3fe..2f20ff36a09536 100644 --- a/src/app/clusters/wifi-network-management-server/wifi-network-management-server.cpp +++ b/src/app/clusters/wifi-network-management-server/wifi-network-management-server.cpp @@ -32,7 +32,7 @@ using namespace chip::app; using namespace chip::app::Clusters; using namespace chip::app::Clusters::WiFiNetworkManagement::Attributes; using namespace chip::app::Clusters::WiFiNetworkManagement::Commands; -using namespace std::placeholders; +using IMStatus = chip::Protocols::InteractionModel::Status; namespace chip { namespace app { @@ -143,6 +143,12 @@ void WiFiNetworkManagementServer::InvokeCommand(HandlerContext & ctx) void WiFiNetworkManagementServer::HandleNetworkPassphraseRequest(HandlerContext & ctx, const NetworkPassphraseRequest::DecodableType & req) { + if (ctx.mCommandHandler.GetSubjectDescriptor().authMode != Access::AuthMode::kCase) + { + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, IMStatus::UnsupportedAccess); + return; + } + if (HaveNetworkCredentials()) { NetworkPassphraseResponse::Type response; @@ -151,8 +157,7 @@ void WiFiNetworkManagementServer::HandleNetworkPassphraseRequest(HandlerContext } else { - // TODO: Status code TBC: https://github.com/CHIP-Specifications/connectedhomeip-spec/issues/9234 - ctx.mCommandHandler.AddStatus(ctx.mRequestPath, Protocols::InteractionModel::Status::InvalidInState); + ctx.mCommandHandler.AddStatus(ctx.mRequestPath, IMStatus::InvalidInState); } } diff --git a/src/app/codegen-data-model-provider/CodegenDataModelProvider_Read.cpp b/src/app/codegen-data-model-provider/CodegenDataModelProvider_Read.cpp index de17d1059be127..82baba4835c8b5 100644 --- a/src/app/codegen-data-model-provider/CodegenDataModelProvider_Read.cpp +++ b/src/app/codegen-data-model-provider/CodegenDataModelProvider_Read.cpp @@ -281,15 +281,17 @@ DataModel::ActionReturnStatus CodegenDataModelProvider::ReadAttribute(const Data RequiredPrivilege::ForReadAttribute(request.path)); if (err != CHIP_NO_ERROR) { - ReturnErrorCodeIf(err != CHIP_ERROR_ACCESS_DENIED, err); + ReturnErrorCodeIf((err != CHIP_ERROR_ACCESS_DENIED) && (err != CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL), err); // Implementation of 8.4.3.2 of the spec for path expansion if (request.path.mExpanded) { return CHIP_NO_ERROR; } - // access denied has a specific code for IM - return CHIP_IM_GLOBAL_STATUS(UnsupportedAccess); + + // access denied and access restricted have specific codes for IM + return err == CHIP_ERROR_ACCESS_DENIED ? CHIP_IM_GLOBAL_STATUS(UnsupportedAccess) + : CHIP_IM_GLOBAL_STATUS(AccessRestricted); } } diff --git a/src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp b/src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp index 7420427f84909b..ffb44eb492dc5a 100644 --- a/src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp +++ b/src/app/codegen-data-model-provider/CodegenDataModelProvider_Write.cpp @@ -287,10 +287,10 @@ DataModel::ActionReturnStatus CodegenDataModelProvider::WriteAttribute(const Dat if (err != CHIP_NO_ERROR) { - ReturnErrorCodeIf(err != CHIP_ERROR_ACCESS_DENIED, err); + ReturnErrorCodeIf((err != CHIP_ERROR_ACCESS_DENIED) && (err != CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL), err); // TODO: when wildcard/group writes are supported, handle them to discard rather than fail with status - return Status::UnsupportedAccess; + return err == CHIP_ERROR_ACCESS_DENIED ? Status::UnsupportedAccess : Status::AccessRestricted; } } @@ -386,8 +386,8 @@ DataModel::ActionReturnStatus CodegenDataModelProvider::WriteAttribute(const Dat } else { - status = emAfWriteAttributeExternal(request.path.mEndpointId, request.path.mClusterId, request.path.mAttributeId, - dataBuffer.data(), (*attributeMetadata)->attributeType); + status = + emAfWriteAttributeExternal(request.path, EmberAfWriteDataInput(dataBuffer.data(), (*attributeMetadata)->attributeType)); } if (status != Protocols::InteractionModel::Status::Success) diff --git a/src/app/codegen-data-model-provider/tests/EmberReadWriteOverride.cpp b/src/app/codegen-data-model-provider/tests/EmberReadWriteOverride.cpp index d3c3b9975f8176..ac918049b860f4 100644 --- a/src/app/codegen-data-model-provider/tests/EmberReadWriteOverride.cpp +++ b/src/app/codegen-data-model-provider/tests/EmberReadWriteOverride.cpp @@ -17,6 +17,7 @@ #include "EmberReadWriteOverride.h" #include +#include #include #include @@ -100,8 +101,7 @@ Status emAfReadOrWriteAttribute(const EmberAfAttributeSearchRecord * attRecord, return Status::Success; } -Status emAfWriteAttributeExternal(chip::EndpointId endpoint, chip::ClusterId cluster, chip::AttributeId attributeID, - uint8_t * dataPtr, EmberAfAttributeType dataType) +Status emAfWriteAttributeExternal(const chip::app::ConcreteAttributePath & path, const EmberAfWriteDataInput & input) { if (gEmberStatusCode != Status::Success) { @@ -110,13 +110,13 @@ Status emAfWriteAttributeExternal(chip::EndpointId endpoint, chip::ClusterId clu // ember here deduces the size of dataPtr. For testing however, we KNOW we read // out of the ember IO buffer, so we try to use that - VerifyOrDie(dataPtr == chip::app::Compatibility::Internal::gEmberAttributeIOBufferSpan.data()); + VerifyOrDie(input.dataPtr == chip::app::Compatibility::Internal::gEmberAttributeIOBufferSpan.data()); // In theory this should do type validation and sizes. This is NOT done for testing. // copy over as much data as possible // NOTE: we do NOT use (*metadata)->size since it is unclear if our mocks set that correctly size_t len = std::min(sizeof(gEmberIoBuffer), chip::app::Compatibility::Internal::gEmberAttributeIOBufferSpan.size()); - memcpy(gEmberIoBuffer, dataPtr, len); + memcpy(gEmberIoBuffer, input.dataPtr, len); gEmberIoBufferFill = len; return Status::Success; @@ -125,5 +125,6 @@ Status emAfWriteAttributeExternal(chip::EndpointId endpoint, chip::ClusterId clu Status emberAfWriteAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, chip::AttributeId attributeID, uint8_t * dataPtr, EmberAfAttributeType dataType) { - return emAfWriteAttributeExternal(endpoint, cluster, attributeID, dataPtr, dataType); + return emAfWriteAttributeExternal(chip::app::ConcreteAttributePath(endpoint, cluster, attributeID), + EmberAfWriteDataInput(dataPtr, dataType)); } diff --git a/src/app/common/templates/config-data.yaml b/src/app/common/templates/config-data.yaml index 660ca0b3aa1df4..61e7c45582268a 100644 --- a/src/app/common/templates/config-data.yaml +++ b/src/app/common/templates/config-data.yaml @@ -72,6 +72,7 @@ ClustersWithAttributeChangedFunctions: - Pump Configuration and Control - Window Covering - Fan Control + - Thermostat ClustersWithShutdownFunctions: - Barrier Control diff --git a/src/app/common_flags.gni b/src/app/common_flags.gni index be1149b2b67eb5..953afc23a20650 100644 --- a/src/app/common_flags.gni +++ b/src/app/common_flags.gni @@ -31,4 +31,10 @@ declare_args() { } else { chip_use_data_model_interface = "disabled" } + + # Whether we call `chipDie` on DM `check` errors + # + # If/once the chip_use_data_model_interface flag is removed or does not support + # a `check` option, this should alwo be removed + chip_data_model_check_die_on_failure = false } diff --git a/src/app/icd/client/DefaultCheckInDelegate.cpp b/src/app/icd/client/DefaultCheckInDelegate.cpp index 2d4624b7837470..081b4be7bb7395 100644 --- a/src/app/icd/client/DefaultCheckInDelegate.cpp +++ b/src/app/icd/client/DefaultCheckInDelegate.cpp @@ -41,7 +41,8 @@ void DefaultCheckInDelegate::OnCheckInComplete(const ICDClientInfo & clientInfo) CHIP_ERROR DefaultCheckInDelegate::GenerateRefreshKey(RefreshKeySender::RefreshKeyBuffer & newKey) { - return Crypto::DRBG_get_bytes(newKey.Bytes(), newKey.Capacity()); + ReturnErrorOnFailure(Crypto::DRBG_get_bytes(newKey.Bytes(), newKey.Capacity())); + return newKey.SetLength(newKey.Capacity()); } RefreshKeySender * DefaultCheckInDelegate::OnKeyRefreshNeeded(ICDClientInfo & clientInfo, ICDClientStorage * clientStorage) diff --git a/src/app/icd/client/DefaultICDClientStorage.cpp b/src/app/icd/client/DefaultICDClientStorage.cpp index 7582e8fd580c40..2b6b3a1aff1657 100644 --- a/src/app/icd/client/DefaultICDClientStorage.cpp +++ b/src/app/icd/client/DefaultICDClientStorage.cpp @@ -235,16 +235,22 @@ CHIP_ERROR DefaultICDClientStorage::Load(FabricIndex fabricIndex, std::vectorGetCASESessionManager(); + auto * caseSessionManager = mpImEngine->GetCASESessionManager(); VerifyOrReturnError(caseSessionManager != nullptr, CHIP_ERROR_INVALID_CASE_PARAMETER); caseSessionManager->FindOrEstablishSession(mICDClientInfo.peer_node, &mOnConnectedCallback, &mOnConnectionFailureCallback); return CHIP_NO_ERROR; diff --git a/src/app/icd/server/ICDConfigurationData.h b/src/app/icd/server/ICDConfigurationData.h index 937b08b99e0e45..0d6e17e55efca2 100644 --- a/src/app/icd/server/ICDConfigurationData.h +++ b/src/app/icd/server/ICDConfigurationData.h @@ -159,7 +159,9 @@ class ICDConfigurationData System::Clock::Seconds32 mMaximumCheckInBackOff = System::Clock::Seconds32(CHIP_CONFIG_ICD_MAXIMUM_CHECK_IN_BACKOFF_SEC); // SIT ICDs should have a SlowPollingThreshold shorter than or equal to 15s (spec 9.16.1.5) - static constexpr System::Clock::Milliseconds32 kSITPollingThreshold = System::Clock::Milliseconds32(15000); + static_assert((CHIP_DEVICE_CONFIG_ICD_SIT_SLOW_POLL_LIMIT).count() <= 15000, + "Spec requires the maximum slow poll interval for the SIT device to be smaller or equal than 15 s."); + static constexpr System::Clock::Milliseconds32 kSITPollingThreshold = CHIP_DEVICE_CONFIG_ICD_SIT_SLOW_POLL_LIMIT; System::Clock::Milliseconds32 mSlowPollingInterval = CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL; System::Clock::Milliseconds32 mFastPollingInterval = CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL; diff --git a/src/app/reporting/Engine.cpp b/src/app/reporting/Engine.cpp index 6d79e9e7b34af0..072aa100e10312 100644 --- a/src/app/reporting/Engine.cpp +++ b/src/app/reporting/Engine.cpp @@ -341,28 +341,31 @@ CHIP_ERROR Engine::CheckAccessDeniedEventPaths(TLV::TLVWriter & aWriter, bool & Access::RequestPath requestPath{ .cluster = current->mValue.mClusterId, .endpoint = current->mValue.mEndpointId, - .requestType = RequestType::kEventReadOrSubscribeRequest, + .requestType = RequestType::kEventReadRequest, .entityId = current->mValue.mEventId }; Access::Privilege requestPrivilege = RequiredPrivilege::ForReadEvent(path); err = Access::GetAccessControl().Check(apReadHandler->GetSubjectDescriptor(), requestPath, requestPrivilege); - if (err != CHIP_ERROR_ACCESS_DENIED) + if ((err != CHIP_ERROR_ACCESS_DENIED) && (err != CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL)) { ReturnErrorOnFailure(err); } else { TLV::TLVWriter checkpoint = aWriter; - err = EventReportIB::ConstructEventStatusIB(aWriter, path, StatusIB(Status::UnsupportedAccess)); + err = EventReportIB::ConstructEventStatusIB(aWriter, path, + err == CHIP_ERROR_ACCESS_DENIED ? StatusIB(Status::UnsupportedAccess) + : StatusIB(Status::AccessRestricted)); + if (err != CHIP_NO_ERROR) { aWriter = checkpoint; break; } aHasEncodedData = true; - ChipLogDetail(InteractionModel, "Access to event (%u, " ChipLogFormatMEI ", " ChipLogFormatMEI ") denied by ACL", + ChipLogDetail(InteractionModel, "Access to event (%u, " ChipLogFormatMEI ", " ChipLogFormatMEI ") denied by %s", current->mValue.mEndpointId, ChipLogValueMEI(current->mValue.mClusterId), - ChipLogValueMEI(current->mValue.mEventId)); + ChipLogValueMEI(current->mValue.mEventId), err == CHIP_ERROR_ACCESS_DENIED ? "ACL" : "ARL"); } current = current->mpNext; } @@ -852,7 +855,7 @@ CHIP_ERROR Engine::InsertPathIntoDirtySet(const AttributePathParams & aAttribute return CHIP_NO_ERROR; } -CHIP_ERROR Engine::SetDirty(AttributePathParams & aAttributePath) +CHIP_ERROR Engine::SetDirty(const AttributePathParams & aAttributePath) { BumpDirtySetGeneration(); diff --git a/src/app/reporting/Engine.h b/src/app/reporting/Engine.h index 070db9947b5f1c..cff36ff41ccb5b 100644 --- a/src/app/reporting/Engine.h +++ b/src/app/reporting/Engine.h @@ -93,7 +93,7 @@ class Engine /** * Application marks mutated change path and would be sent out in later report. */ - CHIP_ERROR SetDirty(AttributePathParams & aAttributePathParams); + CHIP_ERROR SetDirty(const AttributePathParams & aAttributePathParams); /** * @brief diff --git a/src/app/reporting/Read-Checked.cpp b/src/app/reporting/Read-Checked.cpp index 2bb969aac094d2..4336668f5764ea 100644 --- a/src/app/reporting/Read-Checked.cpp +++ b/src/app/reporting/Read-Checked.cpp @@ -96,7 +96,7 @@ ActionReturnStatus RetrieveClusterData(DataModel::Provider * dataModel, const Ac // Make unit tests strict; otherwise allow it with potentially odd mismatch errors // (in which case logs will be odd, however we also expect Checked versions to only // run for a short period until we switch over to either ember or DM completely). -#if CONFIG_BUILD_FOR_HOST_UNIT_TEST +#if CHIP_CONFIG_DATA_MODEL_CHECK_DIE_ON_FAILURE chipDie(); #endif } @@ -119,7 +119,7 @@ ActionReturnStatus RetrieveClusterData(DataModel::Provider * dataModel, const Ac { ChipLogError(Test, "Different written length: %" PRIu32 " (Ember) vs %" PRIu32 " (DataModel)", lengthWrittenEmber, reportBuilder.GetWriter()->GetLengthWritten()); -#if CONFIG_BUILD_FOR_HOST_UNIT_TEST +#if CHIP_CONFIG_DATA_MODEL_CHECK_DIE_ON_FAILURE chipDie(); #endif } @@ -138,7 +138,7 @@ ActionReturnStatus RetrieveClusterData(DataModel::Provider * dataModel, const Ac ChipLogError(Test, "Different partial data"); // NOTE: die on unit tests only, since partial data size may differ across // time-dependent data (very rarely because fast code, but still possible) -#if CONFIG_BUILD_FOR_HOST_UNIT_TEST +#if CHIP_CONFIG_DATA_MODEL_CHECK_DIE_ON_FAILURE chipDie(); #endif } @@ -147,7 +147,7 @@ ActionReturnStatus RetrieveClusterData(DataModel::Provider * dataModel, const Ac ChipLogError(Test, "Different partial data"); // NOTE: die on unit tests only, since partial data size may differ across // time-dependent data (very rarely because fast code, but still possible) -#if CONFIG_BUILD_FOR_HOST_UNIT_TEST +#if CHIP_CONFIG_DATA_MODEL_CHECK_DIE_ON_FAILURE chipDie(); #endif } diff --git a/src/app/reporting/reporting.cpp b/src/app/reporting/reporting.cpp index 0ee0ca954aaf6c..10f58f575612a4 100644 --- a/src/app/reporting/reporting.cpp +++ b/src/app/reporting/reporting.cpp @@ -24,44 +24,23 @@ using namespace chip; using namespace chip::app; -namespace { - -void IncreaseClusterDataVersion(const ConcreteClusterPath & aConcreteClusterPath) -{ - DataVersion * version = emberAfDataVersionStorage(aConcreteClusterPath); - if (version == nullptr) - { - ChipLogError(DataManagement, "Endpoint %x, Cluster " ChipLogFormatMEI " not found in IncreaseClusterDataVersion!", - aConcreteClusterPath.mEndpointId, ChipLogValueMEI(aConcreteClusterPath.mClusterId)); - } - else - { - (*(version))++; - ChipLogDetail(DataManagement, "Endpoint %x, Cluster " ChipLogFormatMEI " update version to %" PRIx32, - aConcreteClusterPath.mEndpointId, ChipLogValueMEI(aConcreteClusterPath.mClusterId), *(version)); - } -} - -} // namespace - void MatterReportingAttributeChangeCallback(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId) { // Attribute writes have asserted this already, but this assert should catch // applications notifying about changes from their end. assertChipStackLockedByCurrentThread(); - AttributePathParams info; - info.mClusterId = clusterId; - info.mAttributeId = attributeId; - info.mEndpointId = endpoint; - - IncreaseClusterDataVersion(ConcreteClusterPath(endpoint, clusterId)); - InteractionModelEngine::GetInstance()->GetReportingEngine().SetDirty(info); + emberAfAttributeChanged(endpoint, clusterId, attributeId, emberAfGlobalInteractionModelAttributesChangedListener()); } void MatterReportingAttributeChangeCallback(const ConcreteAttributePath & aPath) { - return MatterReportingAttributeChangeCallback(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId); + // Attribute writes have asserted this already, but this assert should catch + // applications notifying about changes from their end. + assertChipStackLockedByCurrentThread(); + + emberAfAttributeChanged(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId, + emberAfGlobalInteractionModelAttributesChangedListener()); } void MatterReportingAttributeChangeCallback(EndpointId endpoint) @@ -70,10 +49,5 @@ void MatterReportingAttributeChangeCallback(EndpointId endpoint) // applications notifying about changes from their end. assertChipStackLockedByCurrentThread(); - AttributePathParams info; - info.mEndpointId = endpoint; - - // We are adding or enabling a whole endpoint, in this case, we do not touch the cluster data version. - - InteractionModelEngine::GetInstance()->GetReportingEngine().SetDirty(info); + emberAfEndpointChanged(endpoint, emberAfGlobalInteractionModelAttributesChangedListener()); } diff --git a/src/app/server/BUILD.gn b/src/app/server/BUILD.gn index 401356d7b753a4..58524c3a648aab 100644 --- a/src/app/server/BUILD.gn +++ b/src/app/server/BUILD.gn @@ -13,6 +13,7 @@ # limitations under the License. import("//build_overrides/chip.gni") +import("${chip_root}/src/access/access.gni") import("${chip_root}/src/app/common_flags.gni") import("${chip_root}/src/app/icd/icd.gni") diff --git a/src/app/server/Server.cpp b/src/app/server/Server.cpp index 22cd274ba87e39..426e3c686572c0 100644 --- a/src/app/server/Server.cpp +++ b/src/app/server/Server.cpp @@ -177,6 +177,13 @@ CHIP_ERROR Server::Init(const ServerInitParams & initParams) SuccessOrExit(err = mAccessControl.Init(initParams.accessDelegate, sDeviceTypeResolver)); Access::SetAccessControl(mAccessControl); +#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS + if (initParams.accessRestrictionProvider != nullptr) + { + mAccessControl.SetAccessRestrictionProvider(initParams.accessRestrictionProvider); + } +#endif + mAclStorage = initParams.aclStorage; SuccessOrExit(err = mAclStorage->Init(*mDeviceStorage, mFabrics.begin(), mFabrics.end())); diff --git a/src/app/server/Server.h b/src/app/server/Server.h index 2f6126a4ace635..27c850563f6e98 100644 --- a/src/app/server/Server.h +++ b/src/app/server/Server.h @@ -163,6 +163,13 @@ struct ServerInitParams // ACL storage: MUST be injected. Used to store ACL entries in persistent storage. Must NOT // be initialized before being provided. app::AclStorage * aclStorage = nullptr; + +#if CHIP_CONFIG_USE_ACCESS_RESTRICTIONS + // Access Restriction implementation: MUST be injected if MNGD feature enabled. Used to enforce + // access restrictions that are managed by the device. + Access::AccessRestrictionProvider * accessRestrictionProvider = nullptr; +#endif + // Network native params can be injected depending on the // selected Endpoint implementation void * endpointNativeParams = nullptr; diff --git a/src/app/tests/TestSceneTable.cpp b/src/app/tests/TestSceneTable.cpp index ffb0a1fd5650ff..2e541cb0e76a95 100644 --- a/src/app/tests/TestSceneTable.cpp +++ b/src/app/tests/TestSceneTable.cpp @@ -17,7 +17,11 @@ */ #include +#include #include +#include +#include +#include #include #include #include @@ -26,6 +30,8 @@ #include #include using namespace chip; +using namespace chip::Test; +using namespace chip::app::Clusters::Globals::Attributes; using SceneTable = scenes::SceneTable; using SceneTableEntry = scenes::DefaultSceneTableImpl::SceneTableEntry; @@ -44,25 +50,29 @@ constexpr uint8_t defaultTestFabricCapacity = (defaultTestTableSize - 1) / 2; // Test Cluster ID constexpr chip::ClusterId kOnOffClusterId = 0x0006; constexpr chip::ClusterId kLevelControlClusterId = 0x0008; +constexpr chip::ClusterId kFakeClusterId = 0x0007; constexpr chip::ClusterId kColorControlClusterId = 0x0300; +constexpr chip::ClusterId kScenesClusterId = 0x0062; // Test Endpoint ID constexpr chip::EndpointId kTestEndpoint1 = chip::Test::kMockEndpoint1; constexpr chip::EndpointId kTestEndpoint2 = chip::Test::kMockEndpoint2; constexpr chip::EndpointId kTestEndpoint3 = chip::Test::kMockEndpoint3; +constexpr chip::EndpointId kTestEndpoint4 = kMockEndpointMin; // Test Attribute ID -constexpr uint32_t kOnOffAttId = 0x0000; -constexpr uint32_t kCurrentLevelId = 0x0000; -constexpr uint32_t kCurrentFrequencyId = 0x0004; -constexpr uint32_t kCurrentSaturationId = 0x0001; -constexpr uint32_t kCurrentXId = 0x0003; -constexpr uint32_t kCurrentYId = 0x0004; -constexpr uint32_t kColorTemperatureMiredsId = 0x0007; -constexpr uint32_t kEnhancedCurrentHueId = 0x4000; -constexpr uint32_t kColorLoopActiveId = 0x4002; -constexpr uint32_t kColorLoopDirectionId = 0x4003; -constexpr uint32_t kColorLoopTimeId = 0x4004; +constexpr uint32_t kOnOffAttId = app::Clusters::OnOff::Attributes::OnOff::Id; +constexpr uint32_t kCurrentLevelId = app::Clusters::LevelControl::Attributes::CurrentLevel::Id; +constexpr uint32_t kCurrentFrequencyId = app::Clusters::LevelControl::Attributes::CurrentFrequency::Id; +constexpr uint32_t kCurrentSaturationId = app::Clusters::ColorControl::Attributes::CurrentSaturation::Id; +constexpr uint32_t kCurrentXId = app::Clusters::ColorControl::Attributes::CurrentX::Id; +constexpr uint32_t kCurrentYId = app::Clusters::ColorControl::Attributes::CurrentY::Id; +constexpr uint32_t kColorTemperatureMiredsId = app::Clusters::ColorControl::Attributes::ColorTemperatureMireds::Id; +constexpr uint32_t kEnhancedCurrentHueId = app::Clusters::ColorControl::Attributes::EnhancedCurrentHue::Id; +constexpr uint32_t kEnhancedColorMode = app::Clusters::ColorControl::Attributes::EnhancedColorMode::Id; +constexpr uint32_t kColorLoopActiveId = app::Clusters::ColorControl::Attributes::ColorLoopActive::Id; +constexpr uint32_t kColorLoopDirectionId = app::Clusters::ColorControl::Attributes::ColorLoopDirection::Id; +constexpr uint32_t kColorLoopTimeId = app::Clusters::ColorControl::Attributes::ColorLoopTime::Id; // Test Group ID constexpr chip::GroupId kGroup1 = 0x101; @@ -142,7 +152,7 @@ static app::Clusters::ScenesManagement::Structs::ExtensionFieldSet::Type CCexten static app::Clusters::ScenesManagement::Structs::AttributeValuePairStruct::Type OOPairs[1]; static app::Clusters::ScenesManagement::Structs::AttributeValuePairStruct::Type LCPairs[2]; -static app::Clusters::ScenesManagement::Structs::AttributeValuePairStruct::Type CCPairs[8]; +static app::Clusters::ScenesManagement::Structs::AttributeValuePairStruct::Type CCPairs[9]; static uint8_t OO_buffer[scenes::kMaxFieldBytesPerCluster] = { 0 }; static uint8_t LC_buffer[scenes::kMaxFieldBytesPerCluster] = { 0 }; @@ -152,6 +162,222 @@ static uint32_t OO_buffer_serialized_length = 0; static uint32_t LC_buffer_serialized_length = 0; static uint32_t CC_buffer_serialized_length = 0; +static const uint8_t defaultValueData64[] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; + +static EmberAfAttributeMinMaxValue minMaxValueBool = { false, false, true }; +static EmberAfAttributeMinMaxValue minMaxValue8 = { static_cast(0), static_cast(1), static_cast(0xFE) }; +static EmberAfAttributeMinMaxValue minMaxValue8S = { static_cast(0), static_cast(-1), + static_cast(0x7F) }; +static EmberAfAttributeMinMaxValue minMaxValue16S = { static_cast(0), static_cast(-1), + static_cast(0x7FFD) }; + +static EmberAfAttributeMetadata mockMetadataBool = { + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(&minMaxValueBool), + .attributeId = 0, + .size = 1, + .attributeType = ZCL_BOOLEAN_ATTRIBUTE_TYPE, + .mask = ATTRIBUTE_MASK_WRITABLE, +}; + +static EmberAfAttributeMetadata mockMetadataUint8 = { + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(static_cast(0)), + .attributeId = 0, + .size = 1, + .attributeType = ZCL_INT8U_ATTRIBUTE_TYPE, + .mask = ATTRIBUTE_MASK_WRITABLE | ATTRIBUTE_MASK_NULLABLE, +}; + +static EmberAfAttributeMetadata mockMetadataUint8Max = { + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(&minMaxValue8), + .attributeId = 0, + .size = 1, + .attributeType = ZCL_INT8U_ATTRIBUTE_TYPE, + .mask = ATTRIBUTE_MASK_WRITABLE | ATTRIBUTE_MASK_NULLABLE | ATTRIBUTE_MASK_MIN_MAX, +}; + +static EmberAfAttributeMetadata mockMetadataUint16 = { + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(static_cast(0)), + .attributeId = 0, + .size = 2, + .attributeType = ZCL_INT16U_ATTRIBUTE_TYPE, + .mask = ATTRIBUTE_MASK_WRITABLE, +}; + +static EmberAfAttributeMetadata mockMetadataUint24 = { + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(static_cast(0)), + .attributeId = 0, + .size = 3, + .attributeType = ZCL_INT24U_ATTRIBUTE_TYPE, + .mask = ATTRIBUTE_MASK_WRITABLE, +}; + +static EmberAfAttributeMetadata mockMetadataUint32 = { + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(static_cast(0)), + .attributeId = 0, + .size = 4, + .attributeType = ZCL_INT32U_ATTRIBUTE_TYPE, + .mask = ATTRIBUTE_MASK_WRITABLE, +}; + +static EmberAfAttributeMetadata mockMetadataUint40 = { + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(defaultValueData64), + .attributeId = 0, + .size = 5, + .attributeType = ZCL_INT40U_ATTRIBUTE_TYPE, + .mask = ATTRIBUTE_MASK_WRITABLE, +}; + +static EmberAfAttributeMetadata mockMetadataUint48 = { + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(defaultValueData64), + .attributeId = 0, + .size = 6, + .attributeType = ZCL_INT48U_ATTRIBUTE_TYPE, + .mask = ATTRIBUTE_MASK_WRITABLE, +}; + +static EmberAfAttributeMetadata mockMetadataUint56 = { + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(defaultValueData64), + .attributeId = 0, + .size = 7, + .attributeType = ZCL_INT56U_ATTRIBUTE_TYPE, + .mask = ATTRIBUTE_MASK_WRITABLE, +}; + +static EmberAfAttributeMetadata mockMetadataUint64 = { + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(defaultValueData64), + .attributeId = 0, + .size = 8, + .attributeType = ZCL_INT64U_ATTRIBUTE_TYPE, + .mask = ATTRIBUTE_MASK_WRITABLE, +}; + +static EmberAfAttributeMetadata mockMetadataInt8 = { + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(&minMaxValue8S), + .attributeId = 0, + .size = 1, + .attributeType = ZCL_INT8S_ATTRIBUTE_TYPE, + .mask = ATTRIBUTE_MASK_WRITABLE | ATTRIBUTE_MASK_MIN_MAX, +}; + +static EmberAfAttributeMetadata mockMetadataInt16 = { + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(&minMaxValue16S), + .attributeId = 0, + .size = 2, + .attributeType = ZCL_INT16S_ATTRIBUTE_TYPE, + .mask = ATTRIBUTE_MASK_WRITABLE | ATTRIBUTE_MASK_MIN_MAX, +}; + +static EmberAfAttributeMetadata mockMetadataInt24 = { + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(static_cast(0)), + .attributeId = 0, + .size = 3, + .attributeType = ZCL_INT24S_ATTRIBUTE_TYPE, + .mask = ATTRIBUTE_MASK_WRITABLE, +}; + +static EmberAfAttributeMetadata mockMetadataInt32 = { + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(static_cast(0)), + .attributeId = 0, + .size = 4, + .attributeType = ZCL_INT32S_ATTRIBUTE_TYPE, + .mask = ATTRIBUTE_MASK_WRITABLE, +}; + +static EmberAfAttributeMetadata mockMetadataInt40 = { + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(defaultValueData64), + .attributeId = 0, + .size = 5, + .attributeType = ZCL_INT40S_ATTRIBUTE_TYPE, + .mask = ATTRIBUTE_MASK_WRITABLE, +}; + +static EmberAfAttributeMetadata mockMetadataInt48 = { + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(defaultValueData64), + .attributeId = 0, + .size = 6, + .attributeType = ZCL_INT48S_ATTRIBUTE_TYPE, + .mask = ATTRIBUTE_MASK_WRITABLE, +}; + +static EmberAfAttributeMetadata mockMetadataInt56 = { + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(defaultValueData64), + .attributeId = 0, + .size = 7, + .attributeType = ZCL_INT56S_ATTRIBUTE_TYPE, + .mask = ATTRIBUTE_MASK_WRITABLE, +}; + +static EmberAfAttributeMetadata mockMetadataInt64 = { + .defaultValue = EmberAfDefaultOrMinMaxAttributeValue(defaultValueData64), + .attributeId = 0, + .size = 8, + .attributeType = ZCL_INT64S_ATTRIBUTE_TYPE, + .mask = ATTRIBUTE_MASK_WRITABLE, +}; + +// clang-format off +static const MockNodeConfig SceneMockNodeConfig({ + MockEndpointConfig(kTestEndpoint1, { + MockClusterConfig(kScenesClusterId, {}), + MockClusterConfig(kOnOffClusterId, { + MockAttributeConfig(kOnOffAttId, mockMetadataBool) + }), + MockClusterConfig(kLevelControlClusterId, { + MockAttributeConfig(kCurrentLevelId, mockMetadataUint8Max), MockAttributeConfig(kCurrentFrequencyId, mockMetadataUint16) + }), + }), + MockEndpointConfig(kTestEndpoint2, { + MockClusterConfig(kScenesClusterId, {}), + MockClusterConfig(kOnOffClusterId, { + MockAttributeConfig(kOnOffAttId, mockMetadataBool) + }), + MockClusterConfig(kColorControlClusterId, { + MockAttributeConfig(kCurrentSaturationId, mockMetadataUint8), MockAttributeConfig(kCurrentXId, mockMetadataUint16), + MockAttributeConfig(kCurrentYId, mockMetadataUint16), MockAttributeConfig(kColorTemperatureMiredsId, mockMetadataUint16), + MockAttributeConfig(kEnhancedCurrentHueId, mockMetadataUint16), MockAttributeConfig(kEnhancedColorMode, mockMetadataUint8), + MockAttributeConfig(kColorLoopActiveId, mockMetadataUint8), MockAttributeConfig(kColorLoopDirectionId, mockMetadataUint8), + MockAttributeConfig(kColorLoopTimeId, mockMetadataUint16) + }), + }), + MockEndpointConfig(kTestEndpoint3, { + MockClusterConfig(kScenesClusterId, {}), + MockClusterConfig(kOnOffClusterId, { + MockAttributeConfig(kOnOffAttId, mockMetadataBool) + }), + MockClusterConfig(kLevelControlClusterId, { + MockAttributeConfig(kCurrentLevelId, mockMetadataUint8Max), MockAttributeConfig(kCurrentFrequencyId, mockMetadataUint16) + }), + MockClusterConfig(kColorControlClusterId, { + MockAttributeConfig(kCurrentSaturationId, mockMetadataUint8), MockAttributeConfig(kCurrentXId, mockMetadataUint16), + MockAttributeConfig(kCurrentYId, mockMetadataUint16), MockAttributeConfig(kColorTemperatureMiredsId, mockMetadataUint16), + MockAttributeConfig(kEnhancedCurrentHueId, mockMetadataUint16), MockAttributeConfig(kEnhancedColorMode, mockMetadataUint8), + MockAttributeConfig(kColorLoopActiveId, mockMetadataUint8), MockAttributeConfig(kColorLoopDirectionId, mockMetadataUint8), + MockAttributeConfig(kColorLoopTimeId, mockMetadataUint8) + }), + }), + + MockEndpointConfig(kTestEndpoint4, { + MockClusterConfig(kScenesClusterId, {}), + MockClusterConfig(MockClusterId(kColorControlClusterId), { + MockAttributeConfig(MockAttributeId(kCurrentSaturationId), mockMetadataUint24), MockAttributeConfig(MockAttributeId(kCurrentXId), mockMetadataUint32), + MockAttributeConfig(MockAttributeId(kCurrentYId), mockMetadataUint48), MockAttributeConfig(MockAttributeId(kColorTemperatureMiredsId), mockMetadataUint56), + MockAttributeConfig(MockAttributeId(kEnhancedCurrentHueId), mockMetadataUint64), MockAttributeConfig(MockAttributeId(kEnhancedColorMode), mockMetadataInt8), + MockAttributeConfig(MockAttributeId(kColorLoopActiveId), mockMetadataInt16), MockAttributeConfig(MockAttributeId(kColorLoopDirectionId), mockMetadataInt24), + MockAttributeConfig(MockAttributeId(kColorLoopTimeId), mockMetadataInt32) + }), + MockClusterConfig(MockClusterId(kOnOffClusterId), { + MockAttributeConfig(MockAttributeId(kOnOffAttId), mockMetadataInt48) + }), + MockClusterConfig(MockClusterId(kLevelControlClusterId), { + MockAttributeConfig(MockAttributeId(kCurrentLevelId), mockMetadataInt56), MockAttributeConfig(MockAttributeId(kCurrentFrequencyId), mockMetadataInt64) + }), + MockClusterConfig(MockClusterId(kFakeClusterId), { + MockAttributeConfig(MockAttributeId(kCurrentLevelId), mockMetadataUint40), MockAttributeConfig(MockAttributeId(kCurrentFrequencyId), mockMetadataInt40) + }), + }), +}); +// clang-format on + /// @brief Simulates a Handler where Endpoint 1 supports onoff and level control and Endpoint 2 supports onoff and color control class TestSceneHandler : public scenes::DefaultSceneHandlerImpl { @@ -191,6 +417,16 @@ class TestSceneHandler : public scenes::DefaultSceneHandlerImpl clusterBuffer.reduce_size(3); } } + else if (endpoint == kTestEndpoint4) + { + if (clusterBuffer.size() >= 3) + { + buffer[0] = MockClusterId(kOnOffClusterId); + buffer[1] = MockClusterId(kLevelControlClusterId); + buffer[2] = MockClusterId(kColorControlClusterId); + clusterBuffer.reduce_size(3); + } + } else { clusterBuffer.reduce_size(0); @@ -208,7 +444,7 @@ class TestSceneHandler : public scenes::DefaultSceneHandlerImpl } } - if (endpoint == kTestEndpoint1) + if (endpoint == kTestEndpoint2) { if (cluster == kOnOffClusterId || cluster == kColorControlClusterId) { @@ -216,7 +452,7 @@ class TestSceneHandler : public scenes::DefaultSceneHandlerImpl } } - if (endpoint == kTestEndpoint1) + if (endpoint == kTestEndpoint3) { if (cluster == kOnOffClusterId || cluster == kLevelControlClusterId || cluster == kColorControlClusterId) { @@ -224,6 +460,15 @@ class TestSceneHandler : public scenes::DefaultSceneHandlerImpl } } + if (endpoint == kTestEndpoint4) + { + if (cluster == MockClusterId(kColorControlClusterId) || cluster == MockClusterId(kLevelControlClusterId) || + cluster == MockClusterId(kColorControlClusterId) || cluster == MockClusterId(kFakeClusterId)) + { + return true; + } + } + return false; } @@ -258,7 +503,7 @@ class TestSceneHandler : public scenes::DefaultSceneHandlerImpl break; } } - if (endpoint == kTestEndpoint1) + if (endpoint == kTestEndpoint2) { switch (cluster) { @@ -280,7 +525,7 @@ class TestSceneHandler : public scenes::DefaultSceneHandlerImpl break; } } - if (endpoint == kTestEndpoint1) + if (endpoint == kTestEndpoint3) { switch (cluster) { @@ -347,7 +592,7 @@ class TestSceneHandler : public scenes::DefaultSceneHandlerImpl } // Takes values from cluster in Endpoint 2 - if (endpoint == kTestEndpoint1) + if (endpoint == kTestEndpoint2) { switch (cluster) { @@ -369,7 +614,7 @@ class TestSceneHandler : public scenes::DefaultSceneHandlerImpl } // Takes values from cluster in Endpoint 3 - if (endpoint == kTestEndpoint1) + if (endpoint == kTestEndpoint3) { switch (cluster) { @@ -440,6 +685,7 @@ class TestSceneTable : public ::testing::Test SceneTable * sceneTable = scenes::GetSceneTableImpl(); ASSERT_NE(sceneTable, nullptr); ASSERT_EQ(sceneTable->Init(mpTestStorage), CHIP_NO_ERROR); + SetMockNodeConfig(SceneMockNodeConfig); } static void TearDownTestSuite() @@ -531,34 +777,32 @@ TEST_F(TestSceneTable, TestHandlerFunctions) TLV::TLVReader reader; TLV::TLVWriter writer; - static const uint8_t OO_av_payload = 0x01; - static const uint16_t LC_av_payload[2] = { 0x64, 0x01F0 }; - static const uint16_t CC_av_payload[8] = { 0 }; - OOPairs[0].attributeID = kOnOffAttId; - OOPairs[0].valueUnsigned8.SetValue(OO_av_payload); + OOPairs[0].valueUnsigned8.SetValue(0x01); LCPairs[0].attributeID = kCurrentLevelId; - LCPairs[0].valueUnsigned8.SetValue(static_cast(LC_av_payload[0])); + LCPairs[0].valueUnsigned8.SetValue(0x64); LCPairs[1].attributeID = kCurrentFrequencyId; - LCPairs[1].valueUnsigned16.SetValue(LC_av_payload[1]); + LCPairs[1].valueUnsigned16.SetValue(0x01F0); CCPairs[0].attributeID = kCurrentSaturationId; - CCPairs[0].valueUnsigned8.SetValue(static_cast(CC_av_payload[0])); + CCPairs[0].valueUnsigned8.SetValue(0); CCPairs[1].attributeID = kCurrentXId; - CCPairs[1].valueUnsigned16.SetValue(CC_av_payload[1]); + CCPairs[1].valueUnsigned16.SetValue(0); CCPairs[2].attributeID = kCurrentYId; - CCPairs[2].valueUnsigned16.SetValue(CC_av_payload[2]); + CCPairs[2].valueUnsigned16.SetValue(0); CCPairs[3].attributeID = kColorTemperatureMiredsId; - CCPairs[3].valueUnsigned16.SetValue(CC_av_payload[3]); + CCPairs[3].valueUnsigned16.SetValue(0); CCPairs[4].attributeID = kEnhancedCurrentHueId; - CCPairs[4].valueUnsigned16.SetValue(CC_av_payload[4]); - CCPairs[5].attributeID = kColorLoopActiveId; - CCPairs[5].valueUnsigned8.SetValue(static_cast(CC_av_payload[5])); - CCPairs[6].attributeID = kColorLoopDirectionId; - CCPairs[6].valueUnsigned8.SetValue(static_cast(CC_av_payload[6])); - CCPairs[7].attributeID = kColorLoopTimeId; - CCPairs[7].valueUnsigned8.SetValue(static_cast(CC_av_payload[7])); + CCPairs[4].valueUnsigned16.SetValue(0); + CCPairs[5].attributeID = kEnhancedColorMode; + CCPairs[5].valueUnsigned8.SetValue(0); + CCPairs[6].attributeID = kColorLoopActiveId; + CCPairs[6].valueUnsigned8.SetValue(0); + CCPairs[7].attributeID = kColorLoopDirectionId; + CCPairs[7].valueUnsigned8.SetValue(0); + CCPairs[8].attributeID = kColorLoopTimeId; + CCPairs[8].valueUnsigned16.SetValue(0); // Initialize Extension Field sets as if they were received by add commands OOextensionFieldSet.clusterID = kOnOffClusterId; @@ -572,7 +816,8 @@ TEST_F(TestSceneTable, TestHandlerFunctions) ByteSpan LC_list(LC_buffer); ByteSpan CC_list(CC_buffer); - uint8_t buffer[scenes::kMaxFieldBytesPerCluster] = { 0 }; + constexpr uint16_t bufferSize = 1024; + uint8_t buffer[bufferSize] = { 0 }; MutableByteSpan buff_span(buffer); // Serialize Extension Field sets as if they were recovered from memory @@ -626,11 +871,11 @@ TEST_F(TestSceneTable, TestHandlerFunctions) EXPECT_EQ(CHIP_NO_ERROR, reader.Next()); EXPECT_EQ(CHIP_NO_ERROR, extensionFieldSetIn.attributeValueList.Decode(reader)); - EXPECT_TRUE(mpSceneHandler->SupportsCluster(kTestEndpoint1, extensionFieldSetIn.clusterID)); - EXPECT_EQ(CHIP_NO_ERROR, mpSceneHandler->SerializeAdd(kTestEndpoint1, extensionFieldSetIn, buff_span)); + EXPECT_TRUE(mpSceneHandler->SupportsCluster(kTestEndpoint2, extensionFieldSetIn.clusterID)); + EXPECT_EQ(CHIP_NO_ERROR, mpSceneHandler->SerializeAdd(kTestEndpoint2, extensionFieldSetIn, buff_span)); // Verify the handler extracted buffer matches the initial field sets - EXPECT_EQ(0, memcmp(CC_list.data(), buff_span.data(), buff_span.size())); + EXPECT_EQ(0, memcmp(CC_list.data(), buff_span.data(), CC_list.size())); memset(buffer, 0, buff_span.size()); buff_span = MutableByteSpan(buffer); @@ -641,7 +886,7 @@ TEST_F(TestSceneTable, TestHandlerFunctions) // Verify Encoding the Extension field set returns the same data as the one serialized for on off previously writer.Init(buff_span); EXPECT_EQ(CHIP_NO_ERROR, app::DataModel::Encode(writer, TLV::AnonymousTag(), extensionFieldSetOut.attributeValueList)); - EXPECT_EQ(0, memcmp(OO_list.data(), buff_span.data(), buff_span.size())); + EXPECT_EQ(0, memcmp(OO_list.data(), buff_span.data(), OO_list.size())); memset(buffer, 0, buff_span.size()); // Verify Deserializing is properly filling out output extension field set for level control @@ -651,17 +896,17 @@ TEST_F(TestSceneTable, TestHandlerFunctions) // Verify Encoding the Extension field set returns the same data as the one serialized for level control previously writer.Init(buff_span); EXPECT_EQ(CHIP_NO_ERROR, app::DataModel::Encode(writer, TLV::AnonymousTag(), extensionFieldSetOut.attributeValueList)); - EXPECT_EQ(0, memcmp(LC_list.data(), buff_span.data(), buff_span.size())); + EXPECT_EQ(0, memcmp(LC_list.data(), buff_span.data(), LC_list.size())); memset(buffer, 0, buff_span.size()); // Verify Deserializing is properly filling out output extension field set for color control - EXPECT_TRUE(mpSceneHandler->SupportsCluster(kTestEndpoint1, kColorControlClusterId)); - EXPECT_EQ(CHIP_NO_ERROR, mpSceneHandler->Deserialize(kTestEndpoint1, kColorControlClusterId, CC_list, extensionFieldSetOut)); + EXPECT_TRUE(mpSceneHandler->SupportsCluster(kTestEndpoint2, kColorControlClusterId)); + EXPECT_EQ(CHIP_NO_ERROR, mpSceneHandler->Deserialize(kTestEndpoint2, kColorControlClusterId, CC_list, extensionFieldSetOut)); // Verify Encoding the Extension field set returns the same data as the one serialized for color control previously writer.Init(buff_span); EXPECT_EQ(CHIP_NO_ERROR, app::DataModel::Encode(writer, TLV::AnonymousTag(), extensionFieldSetOut.attributeValueList)); - EXPECT_EQ(0, memcmp(CC_list.data(), buff_span.data(), buff_span.size())); + EXPECT_EQ(0, memcmp(CC_list.data(), buff_span.data(), CC_list.size())); memset(buffer, 0, buff_span.size()); // To test failure on serialize and deserialize when too many pairs are in the field sets @@ -698,6 +943,353 @@ TEST_F(TestSceneTable, TestHandlerFunctions) memset(failBuffer, 0, fail_list.size()); memset(buffer, 0, buff_span.size()); + + // Test Serialize Add of an attribute value that is greater than the mock attribute max (Max bool value) + OOPairs[0].valueUnsigned8.SetValue(0xFF); + + // EFS to test caping of value once a variable above the mock attribute size is serialized + app::Clusters::ScenesManagement::Structs::ExtensionFieldSet::Type extensionFieldValueCapOut; + app::Clusters::ScenesManagement::Structs::ExtensionFieldSet::DecodableType extensionFieldValueCapIn; + + extensionFieldValueCapOut.clusterID = kOnOffClusterId; + extensionFieldValueCapOut.attributeValueList = OOPairs; + + /// Setup of input EFS (by temporary using the output one) + writer.Init(buff_span); + EXPECT_EQ(CHIP_NO_ERROR, app::DataModel::Encode(writer, TLV::AnonymousTag(), extensionFieldValueCapOut.attributeValueList)); + + reader.Init(buffer); + extensionFieldValueCapIn.clusterID = kOnOffClusterId; + EXPECT_EQ(CHIP_NO_ERROR, reader.Next()); + EXPECT_EQ(CHIP_NO_ERROR, extensionFieldValueCapIn.attributeValueList.Decode(reader)); + + // Verify that the initial value is not capped + auto pair_iterator = extensionFieldValueCapIn.attributeValueList.begin(); + pair_iterator.Next(); + app::Clusters::ScenesManagement::Structs::AttributeValuePairStruct::Type pair = pair_iterator.GetValue(); + EXPECT_EQ(pair.valueUnsigned8.Value(), OOPairs[0].valueUnsigned8.Value()); + + // Verify that we cap the value to the mock attribute size when serializing + EXPECT_EQ(CHIP_NO_ERROR, mpSceneHandler->SerializeAdd(kTestEndpoint1, extensionFieldValueCapIn, buff_span)); + EXPECT_EQ(CHIP_NO_ERROR, mpSceneHandler->Deserialize(kTestEndpoint1, kOnOffClusterId, buff_span, extensionFieldValueCapOut)); + + // Verify that the output value is capped to 1 + EXPECT_EQ(1, extensionFieldValueCapOut.attributeValueList[0].valueUnsigned8.Value()); + + // Clear buffer + memset(buffer, 0, buff_span.size()); + + // Test Serialize Add of an attribute value that is smaller than the mock attribute min (1) for LC current level + LCPairs[0].valueUnsigned8.SetValue(0); + + extensionFieldValueCapOut.clusterID = kLevelControlClusterId; + extensionFieldValueCapOut.attributeValueList = LCPairs; + + /// Setup of input EFS (by temporary using the output one) + buff_span = MutableByteSpan(buffer); + writer.Init(buff_span); + EXPECT_EQ(CHIP_NO_ERROR, app::DataModel::Encode(writer, TLV::AnonymousTag(), extensionFieldValueCapOut.attributeValueList)); + + reader.Init(buffer); + extensionFieldValueCapIn.clusterID = kLevelControlClusterId; + EXPECT_EQ(CHIP_NO_ERROR, reader.Next()); + EXPECT_EQ(CHIP_NO_ERROR, extensionFieldValueCapIn.attributeValueList.Decode(reader)); + + // Verify that the initial value is not capped + auto iteratorMin = extensionFieldValueCapIn.attributeValueList.begin(); + iteratorMin.Next(); + pair = iteratorMin.GetValue(); + EXPECT_EQ(pair.valueUnsigned8.Value(), LCPairs[0].valueUnsigned8.Value()); + + // Verify that we cap the value to the mock attribute size when serializing + EXPECT_EQ(CHIP_NO_ERROR, mpSceneHandler->SerializeAdd(kTestEndpoint1, extensionFieldValueCapIn, buff_span)); + EXPECT_EQ(CHIP_NO_ERROR, + mpSceneHandler->Deserialize(kTestEndpoint1, kLevelControlClusterId, buff_span, extensionFieldValueCapOut)); + + // Verify that the output value is capped to 255 (NULL) as Level Control Current Level is a nullable uint8_t + EXPECT_EQ(255, extensionFieldValueCapOut.attributeValueList[0].valueUnsigned8.Value()); + + // Clear buffer + memset(buffer, 0, buff_span.size()); + + // Test Serialize Add of an attribute value that is higher than the mock attribute max (0xFE) for LC current level + LCPairs[0].valueUnsigned8.SetValue(0xFF); + + extensionFieldValueCapOut.clusterID = kLevelControlClusterId; + extensionFieldValueCapOut.attributeValueList = LCPairs; + + /// Setup of input EFS (by temporary using the output one) + buff_span = MutableByteSpan(buffer); + writer.Init(buff_span); + EXPECT_EQ(CHIP_NO_ERROR, app::DataModel::Encode(writer, TLV::AnonymousTag(), extensionFieldValueCapOut.attributeValueList)); + + reader.Init(buffer); + extensionFieldValueCapIn.clusterID = kLevelControlClusterId; + EXPECT_EQ(CHIP_NO_ERROR, reader.Next()); + EXPECT_EQ(CHIP_NO_ERROR, extensionFieldValueCapIn.attributeValueList.Decode(reader)); + + // Verify that the initial value is not capped + auto iteratorMax = extensionFieldValueCapIn.attributeValueList.begin(); + iteratorMax.Next(); + pair = iteratorMax.GetValue(); + EXPECT_EQ(pair.valueUnsigned8.Value(), LCPairs[0].valueUnsigned8.Value()); + EXPECT_EQ(CHIP_NO_ERROR, mpSceneHandler->SerializeAdd(kTestEndpoint1, extensionFieldValueCapIn, buff_span)); + EXPECT_EQ(CHIP_NO_ERROR, + mpSceneHandler->Deserialize(kTestEndpoint1, kLevelControlClusterId, buff_span, extensionFieldValueCapOut)); + + // Verify that the output value is 0xFF (NULL) as Level Control Current Level is a nullable uint8_t + EXPECT_EQ(0xFF, extensionFieldValueCapOut.attributeValueList[0].valueUnsigned8.Value()); + + // Clear buffer + memset(buffer, 0, buff_span.size()); + buff_span = MutableByteSpan(buffer); + + // Test for attribtues types that are in no Real clusters yet but are supported in scenes + { + // Setup EFS for mock cluster testing all attributes types + app::Clusters::ScenesManagement::Structs::AttributeValuePairStruct::Type MockOOPairs[1]; + app::Clusters::ScenesManagement::Structs::AttributeValuePairStruct::Type MockLCPairs[2]; + app::Clusters::ScenesManagement::Structs::AttributeValuePairStruct::Type MockCCPairs[9]; + app::Clusters::ScenesManagement::Structs::AttributeValuePairStruct::Type MockFKPairs[2]; + // Mock CC + MockCCPairs[0].attributeID = MockAttributeId(kCurrentSaturationId); + MockCCPairs[0].valueUnsigned32.SetValue(UINT32_MAX); // will cap to 0x00FFFFFF (uint24) + MockCCPairs[1].attributeID = MockAttributeId(kCurrentXId); + MockCCPairs[1].valueUnsigned32.SetValue(UINT32_MAX); // not capped + MockCCPairs[2].attributeID = MockAttributeId(kCurrentYId); + MockCCPairs[2].valueUnsigned64.SetValue(UINT64_MAX); // will cap to 0x0000FFFFFFFFFFFF (uint48) + MockCCPairs[3].attributeID = MockAttributeId(kColorTemperatureMiredsId); + MockCCPairs[3].valueUnsigned64.SetValue(UINT64_MAX); // will cap to 0x00FFFFFFFFFFFFFF (uint56) + MockCCPairs[4].attributeID = MockAttributeId(kEnhancedCurrentHueId); + MockCCPairs[4].valueUnsigned64.SetValue(UINT64_MAX); // not capped + MockCCPairs[5].attributeID = MockAttributeId(kEnhancedColorMode); + MockCCPairs[5].valueSigned8.SetValue(static_cast(-2)); // will cap to -1 + MockCCPairs[6].attributeID = MockAttributeId(kColorLoopActiveId); + MockCCPairs[6].valueSigned16.SetValue( + static_cast(0x7FFE)); // will cap to 0x7FFD in int16 due to declared maximum in the attribute's mock metadata + MockCCPairs[7].attributeID = MockAttributeId(kColorLoopDirectionId); + MockCCPairs[7].valueSigned32.SetValue(-1); // will cap to -1 in int24 + MockCCPairs[8].attributeID = MockAttributeId(kColorLoopTimeId); + MockCCPairs[8].valueSigned32.SetValue(-1); // not capped + // Mock OO + MockOOPairs[0].attributeID = MockAttributeId(kOnOffAttId); + MockOOPairs[0].valueSigned64.SetValue(INT64_MAX); // will cap to 0x00007FFFFFFFFFFF (int48) + // Mock LC + MockLCPairs[0].attributeID = MockAttributeId(kCurrentLevelId); + MockLCPairs[0].valueSigned64.SetValue(INT64_MIN); // will cap to 0x0080000000000000 (int56 min) + MockLCPairs[1].attributeID = MockAttributeId(kCurrentFrequencyId); + MockLCPairs[1].valueSigned64.SetValue(INT64_MIN); // not capped + // Mock Fake + MockFKPairs[0].attributeID = MockAttributeId(kCurrentLevelId); + MockFKPairs[0].valueUnsigned64.SetValue(UINT64_MAX); // will cap to UINT40_MAX + MockFKPairs[1].attributeID = MockAttributeId(kCurrentFrequencyId); + MockFKPairs[1].valueSigned64.SetValue(INT64_MAX); // will cap to INT40_MIN + + // Initialize Extension Field sets as if they were received by add commands + OOextensionFieldSet.clusterID = MockClusterId(kOnOffClusterId); + OOextensionFieldSet.attributeValueList = MockOOPairs; + LCextensionFieldSet.clusterID = MockClusterId(kLevelControlClusterId); + LCextensionFieldSet.attributeValueList = MockLCPairs; + CCextensionFieldSet.clusterID = MockClusterId(kColorControlClusterId); + CCextensionFieldSet.attributeValueList = MockCCPairs; + + uint8_t mock_OO_buffer[scenes::kMaxFieldBytesPerCluster] = { 0 }; + uint8_t mock_LC_buffer[scenes::kMaxFieldBytesPerCluster] = { 0 }; + uint8_t mock_CC_buffer[scenes::kMaxFieldBytesPerCluster * 2] = { + 0 + }; // Using mock attributes way bigger than the real ones so we increase the buffer size for this test + ByteSpan Mock_OO_list(mock_OO_buffer); + ByteSpan Mock_LC_list(mock_LC_buffer); + ByteSpan Mock_CC_list(mock_CC_buffer); + + // Serialize Extension Field sets as if they were recovered from memory + writer.Init(mock_OO_buffer); + EXPECT_EQ(CHIP_NO_ERROR, app::DataModel::Encode(writer, TLV::AnonymousTag(), OOextensionFieldSet.attributeValueList)); + OO_buffer_serialized_length = writer.GetLengthWritten(); + + writer.Init(mock_LC_buffer); + EXPECT_EQ(CHIP_NO_ERROR, app::DataModel::Encode(writer, TLV::AnonymousTag(), LCextensionFieldSet.attributeValueList)); + LC_buffer_serialized_length = writer.GetLengthWritten(); + + writer.Init(mock_CC_buffer); + EXPECT_EQ(CHIP_NO_ERROR, app::DataModel::Encode(writer, TLV::AnonymousTag(), CCextensionFieldSet.attributeValueList)); + CC_buffer_serialized_length = writer.GetLengthWritten(); + + // Setup the On Off Extension field set in the expected state from a command + reader.Init(Mock_OO_list); + extensionFieldValueCapIn.clusterID = MockClusterId(kOnOffClusterId); + EXPECT_EQ(CHIP_NO_ERROR, reader.Next()); + EXPECT_EQ(CHIP_NO_ERROR, extensionFieldValueCapIn.attributeValueList.Decode(reader)); + + // Verify that the initial value is not capped + auto iteratorOO = extensionFieldValueCapIn.attributeValueList.begin(); + iteratorOO.Next(); + pair = iteratorOO.GetValue(); + EXPECT_EQ(pair.valueSigned64.Value(), MockOOPairs[0].valueSigned64.Value()); + + // Verify that we cap the value to the mock attribute size when serializing + EXPECT_EQ(CHIP_NO_ERROR, mpSceneHandler->SerializeAdd(kTestEndpoint4, extensionFieldValueCapIn, buff_span)); + EXPECT_EQ( + CHIP_NO_ERROR, + mpSceneHandler->Deserialize(kTestEndpoint4, MockClusterId(kOnOffClusterId), buff_span, extensionFieldValueCapOut)); + + // Verify that the output value is capped to int48 max value + int64_t int48Max = static_cast(0x00007FFFFFFFFFFF); + EXPECT_EQ(int48Max, extensionFieldValueCapOut.attributeValueList[0].valueSigned64.Value()); + + // Clear buffer + memset(buffer, 0, buff_span.size()); + // Reinit buffer + buff_span = MutableByteSpan(buffer); + + reader.Init(Mock_LC_list); + extensionFieldValueCapIn.clusterID = MockClusterId(kLevelControlClusterId); + EXPECT_EQ(CHIP_NO_ERROR, reader.Next()); + EXPECT_EQ(CHIP_NO_ERROR, extensionFieldValueCapIn.attributeValueList.Decode(reader)); + + // Verify that the initial values are not capped + auto iteratorLC = extensionFieldValueCapIn.attributeValueList.begin(); + iteratorLC.Next(); + pair = iteratorLC.GetValue(); + EXPECT_EQ(pair.valueSigned64.Value(), MockLCPairs[0].valueSigned64.Value()); + iteratorLC.Next(); + pair = iteratorLC.GetValue(); + EXPECT_EQ(pair.valueSigned64.Value(), MockLCPairs[1].valueSigned64.Value()); + + // Verify that we cap the value to the mock attribute size when serializing + EXPECT_EQ(CHIP_NO_ERROR, mpSceneHandler->SerializeAdd(kTestEndpoint4, extensionFieldValueCapIn, buff_span)); + EXPECT_EQ(CHIP_NO_ERROR, + mpSceneHandler->Deserialize(kTestEndpoint4, MockClusterId(kLevelControlClusterId), buff_span, + extensionFieldValueCapOut)); + + // Verify that the output value is capped to int56 min value + int64_t int56Min = static_cast(0xFF80000000000000); + EXPECT_EQ(int56Min, static_cast(extensionFieldValueCapOut.attributeValueList[0].valueSigned64.Value())); + + // Verify that the output value is not capped + EXPECT_EQ(INT64_MIN, extensionFieldValueCapOut.attributeValueList[1].valueSigned64.Value()); + + // Clear buffer + memset(buffer, 0, buff_span.size()); + // Reinit buffer + buff_span = MutableByteSpan(buffer); + + reader.Init(Mock_CC_list); + extensionFieldValueCapIn.clusterID = MockClusterId(kColorControlClusterId); + EXPECT_EQ(CHIP_NO_ERROR, reader.Next()); + EXPECT_EQ(CHIP_NO_ERROR, extensionFieldValueCapIn.attributeValueList.Decode(reader)); + + // Verify that the initial values are not capped + auto iteratorCC = extensionFieldValueCapIn.attributeValueList.begin(); + iteratorCC.Next(); + pair = iteratorCC.GetValue(); + EXPECT_EQ(pair.valueUnsigned32.Value(), MockCCPairs[0].valueUnsigned32.Value()); + iteratorCC.Next(); + pair = iteratorCC.GetValue(); + EXPECT_EQ(pair.valueUnsigned32.Value(), MockCCPairs[1].valueUnsigned32.Value()); + iteratorCC.Next(); + pair = iteratorCC.GetValue(); + EXPECT_EQ(pair.valueUnsigned64.Value(), MockCCPairs[2].valueUnsigned64.Value()); + iteratorCC.Next(); + pair = iteratorCC.GetValue(); + EXPECT_EQ(pair.valueUnsigned64.Value(), MockCCPairs[3].valueUnsigned64.Value()); + iteratorCC.Next(); + pair = iteratorCC.GetValue(); + EXPECT_EQ(pair.valueUnsigned64.Value(), MockCCPairs[4].valueUnsigned64.Value()); + iteratorCC.Next(); + pair = iteratorCC.GetValue(); + EXPECT_EQ(pair.valueSigned8.Value(), MockCCPairs[5].valueSigned8.Value()); + iteratorCC.Next(); + pair = iteratorCC.GetValue(); + EXPECT_EQ(pair.valueSigned16.Value(), MockCCPairs[6].valueSigned16.Value()); + iteratorCC.Next(); + pair = iteratorCC.GetValue(); + EXPECT_EQ(pair.valueSigned32.Value(), MockCCPairs[7].valueSigned32.Value()); + iteratorCC.Next(); + pair = iteratorCC.GetValue(); + EXPECT_EQ(pair.valueSigned32.Value(), MockCCPairs[8].valueSigned32.Value()); + + // Verify that we cap the value to the mock attribute size when serializing + EXPECT_EQ(CHIP_NO_ERROR, mpSceneHandler->SerializeAdd(kTestEndpoint4, extensionFieldValueCapIn, buff_span)); + EXPECT_EQ(CHIP_NO_ERROR, + mpSceneHandler->Deserialize(kTestEndpoint4, MockClusterId(kColorControlClusterId), buff_span, + extensionFieldValueCapOut)); + + // Verify that the output value is capped to uint24t max value + uint32_t uint24Max = static_cast(0x00FFFFFF); + EXPECT_EQ(uint24Max, extensionFieldValueCapOut.attributeValueList[0].valueUnsigned32.Value()); + + // Verify that the output value is not capped + EXPECT_EQ(UINT32_MAX, extensionFieldValueCapOut.attributeValueList[1].valueUnsigned32.Value()); + + // Verify that the output value is capped to int48_t max value + uint64_t uint48Max = static_cast(0x0000FFFFFFFFFFFF); + EXPECT_EQ(uint48Max, extensionFieldValueCapOut.attributeValueList[2].valueUnsigned64.Value()); + + // Verify that the output value is capped to int56_t max value + uint64_t uint56Max = static_cast(0x00FFFFFFFFFFFFFF); + EXPECT_EQ(uint56Max, extensionFieldValueCapOut.attributeValueList[3].valueUnsigned64.Value()); + + // Verify that the output value is not capped + EXPECT_EQ(UINT64_MAX, extensionFieldValueCapOut.attributeValueList[4].valueUnsigned64.Value()); + + // Verify that the output value is capped to the defined min for this attribute + EXPECT_EQ(static_cast(-1), extensionFieldValueCapOut.attributeValueList[5].valueSigned8.Value()); + + // Verify that the output value is capped to the defined max for this attribute + EXPECT_EQ(0x7FFD, extensionFieldValueCapOut.attributeValueList[6].valueSigned16.Value()); + + // Verify that the output value is not capped to -1 in int24t + using Int24Type = app::NumericAttributeTraits>::WorkingType; + EXPECT_EQ(static_cast(-1), extensionFieldValueCapOut.attributeValueList[7].valueSigned32.Value()); + + // Verify that the output value will not cap + EXPECT_EQ(-1, extensionFieldValueCapOut.attributeValueList[8].valueSigned32.Value()); + + // Clear buffer + memset(buffer, 0, buff_span.size()); + + LCextensionFieldSet.clusterID = MockClusterId(kFakeClusterId); + LCextensionFieldSet.attributeValueList = MockFKPairs; + + writer.Init(mock_LC_buffer); + EXPECT_EQ(CHIP_NO_ERROR, app::DataModel::Encode(writer, TLV::AnonymousTag(), LCextensionFieldSet.attributeValueList)); + LC_buffer_serialized_length = writer.GetLengthWritten(); + + // Reinit buffer + buff_span = MutableByteSpan(buffer); + + reader.Init(Mock_LC_list); + extensionFieldValueCapIn.clusterID = MockClusterId(kFakeClusterId); + EXPECT_EQ(CHIP_NO_ERROR, reader.Next()); + EXPECT_EQ(CHIP_NO_ERROR, extensionFieldValueCapIn.attributeValueList.Decode(reader)); + + // Verify that the initial values are not capped + auto iteratorFK = extensionFieldValueCapIn.attributeValueList.begin(); + iteratorFK.Next(); + pair = iteratorFK.GetValue(); + EXPECT_EQ(pair.valueUnsigned64.Value(), MockFKPairs[0].valueUnsigned64.Value()); + iteratorFK.Next(); + pair = iteratorFK.GetValue(); + EXPECT_EQ(pair.valueSigned64.Value(), MockFKPairs[1].valueSigned64.Value()); + + // Verify that we cap the value to the mock attribute size when serializing + EXPECT_EQ(CHIP_NO_ERROR, mpSceneHandler->SerializeAdd(kTestEndpoint4, extensionFieldValueCapIn, buff_span)); + EXPECT_EQ(CHIP_NO_ERROR, + mpSceneHandler->Deserialize(kTestEndpoint4, MockClusterId(kFakeClusterId), buff_span, extensionFieldValueCapOut)); + + // Verify that the output value is capped to uint40 max value + uint64_t uint40Max = static_cast(0x000000FFFFFFFFFF); + EXPECT_EQ(uint40Max, extensionFieldValueCapOut.attributeValueList[0].valueUnsigned64.Value()); + + // Verify that the output value is capped to int40 max value + int64_t int40Max = static_cast(0x0000007FFFFFFFFF); + EXPECT_EQ(int40Max, extensionFieldValueCapOut.attributeValueList[1].valueSigned64.Value()); + + // Clear buffer + memset(buffer, 0, buff_span.size()); + // Reinit buffer + } }; TEST_F(TestSceneTable, TestStoreScenes) diff --git a/src/app/tests/suites/certification/PICS.yaml b/src/app/tests/suites/certification/PICS.yaml index c575bd348fc518..32ea708bd871fe 100644 --- a/src/app/tests/suites/certification/PICS.yaml +++ b/src/app/tests/suites/certification/PICS.yaml @@ -6494,6 +6494,13 @@ PICS: - label: "Does the device implement the Schedules attribute?" id: TSTAT.S.A0051 + - label: "Does the device implement the Schedules attribute?" + id: TSTAT.S.A0051 + + - label: + "Does the device implement the SetpointHoldExpiryTimestamp attribute?" + id: TSTAT.S.A0052 + # # server / commandsReceived # @@ -6517,6 +6524,11 @@ PICS: "Does the device implement receiving the GetRelayStatusLog command?" id: TSTAT.S.C04.Rsp + - label: + "Does the device implement receiving the SetActiveScheduleRequest + command?" + id: TSTAT.S.C05.Rsp + - label: "Does the device implement receiving the SetActivePresetRequest command?" @@ -6541,7 +6553,7 @@ PICS: id: TSTAT.S.C01.Tx - label: "Does the device implement sending the AtomicResponse command?" - id: TSTAT.S.CFD.Tx + id: TSTAT.S.Cfd.Tx # # server / features @@ -6614,6 +6626,11 @@ PICS: - label: "Does the device implement sending the GetRelayStatusLog command?" id: TSTAT.C.C04.Tx + - label: + "Does the device implement sending the SetActiveScheduleRequest + command?" + id: TSTAT.C.C05.Tx + - label: "Does the device implement sending the SetActivePresetRequest command?" id: TSTAT.C.C06.Tx diff --git a/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml b/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml deleted file mode 100644 index 5ee85f98a48a72..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_CADMIN_1_9.yaml +++ /dev/null @@ -1,603 +0,0 @@ -# Copyright (c) 2023 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -name: - 24.1.9. [TC-CADMIN-1.9] Device exit commissioning mode after 20 failed - commission attempts [ECM] [DUT - Commissionee] - -PICS: - - CADMIN.S - -config: - nodeId: 0x12344321 - timeout: 700 - nodeIdForDuplicateCommissioning: - type: node_id - defaultValue: 0x11 - nodeId2: - type: node_id - defaultValue: 0xCAFE - nodeId3: - type: node_id - defaultValue: 0xC00FEE - endpoint: 0 - waitAfterCommissioning: - type: int16u - defaultValue: 5000 - discriminator: - type: int16u - defaultValue: 3840 - correctPayload: - type: char_string - defaultValue: "MT:-24J0AFN00KA0648G00" - incorrectSetupCodePayload: - type: char_string - defaultValue: "MT:-24J0AFN00I.0648G00" - PakeVerifier: - type: octet_string - defaultValue: "hex:b96170aae803346884724fe9a3b287c30330c2a660375d17bb205a8cf1aecb350457f8ab79ee253ab6a8e46bb09e543ae422736de501e3db37d441fe344920d09548e4c18240630c4ff4913c53513839b7c07fcc0627a1b8573a149fcd1fa466cf" - PIXIT.CADMIN.CwDuration: - type: int16u - defaultValue: 900 - -tests: - - label: "Precondition: Reset Devices to factory defaults" - PICS: PICS_SDK_CI_ONLY - cluster: "SystemCommands" - command: "FactoryReset" - - - label: "Precondition: Reset Devices to factory defaults" - verification: | - Reset Devices to factory defaults - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP - arguments: - values: - - name: "message" - value: "Factory Reset the DUT and enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "Step 1a: TH_CR1 starts a commissioning process with DUT_CE" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId - - name: "payload" - value: correctPayload - - - label: "Step 1b: TH_CR1 commissioned with DUT_CE" - cluster: "DelayCommands" - command: "WaitForCommissionee" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId - - - label: - "Step 2: TH_CR1 opens a commissioning window on DUT_CE using a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - cluster: "Administrator Commissioning" - command: "OpenCommissioningWindow" - timedInteractionTimeoutMs: 10000 - PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY - arguments: - values: - - name: "CommissioningTimeout" - value: PIXIT.CADMIN.CwDuration - - name: "PAKEPasscodeVerifier" - value: PakeVerifier - - name: "Discriminator" - value: discriminator - - name: "Iterations" - value: 1000 - - name: "Salt" - value: "SPAKE2P Key Salt" - - - label: "Waiting after opening commissioning window" - PICS: CADMIN.S.C00.Rsp && PICS_SDK_CI_ONLY - cluster: "DelayCommands" - command: "WaitForMs" - arguments: - values: - - name: "ms" - value: waitAfterCommissioning - - #Issue https://github.com/project-chip/connectedhomeip/issues/26127 - - label: - "Step 2: TH_CR1 opens a commissioning window on DUT_CE using a - commissioning timeout of PIXIT.CADMIN.CwDuration seconds using ECM" - verification: | - On TH_CR1 send the below command - - ./chip-tool pairing open-commissioning-window 1 1 PIXIT.CADMIN.CwDuration 1000 3841 - - Verify the Open commisioning window on the DUT_CE(all-cluster-app) Log: - - [1660904553.796857][3537:3537] CHIP:DMG: Received command for Endpoint=0 Cluster=0x0000_003C Command=0x0000_0000 - [1660904553.796951][3537:3537] CHIP:ZCL: Received command to open commissioning window - [1660904553.797255][3537:3537] CHIP:IN: SecureSession[0xaaab142ef7f0]: Allocated Type:1 LSID:34523 - - Verify the Manual pairing code on the TH_CR1(chip-tool) Log: - - [1635864513.699433][3850:3855] CHIP:DMG: ICR moving to [CommandSen] - [1635864513.699489][3850:3855] CHIP:CTL: Manual pairing code: [36177160937] - [1635864513.699566][3850:3855] CHIP:CTL: SetupQRCode: [MT:00000CQM00YZN476420] - [1635864513.699636][3850:3855] CHIP:EM: Sending Standalone Ack for MessageCounter:2599714227 on exchange 60688i - [1635864513.699685][3850:3855] CHIP:IN: Prepared plaintext message 0xffff8a7cd960 to 0x0000000000000000 of type - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: - "Step 3: DNS-SD records shows DUT_CE advertising. Verify that the - DNS-SD advertisement shows CM=2" - PICS: CADMIN.S.C00.Rsp - cluster: "DiscoveryCommands" - command: "FindCommissionable" - response: - values: - - name: "commissioningMode" - value: 2 - - - label: - "Step 4.1: TH_CR2 starts a commissioning process with DUT_CE using - Invalid setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "Step 4.2: TH_CR2 starts a commissioning process with DUT_CE using - Invalid setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "Step 4.3: TH_CR2 starts a commissioning process with DUT_CE using - Invalid setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "Step 4.4: TH_CR2 starts a commissioning process with DUT_CE using - Invalid setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "Step 4.5: TH_CR2 starts a commissioning process with DUT_CE using - Invalid setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "Step 4.6: TH_CR2 starts a commissioning process with DUT_CE using - Invalid setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "Step 4.7: TH_CR2 starts a commissioning process with DUT_CE using - Invalid setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "Step 4.8: TH_CR2 starts a commissioning process with DUT_CE using - Invalid setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "Step 4.9: TH_CR2 starts a commissioning process with DUT_CE using - Invalid setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "Step 4.10: TH_CR2 starts a commissioning process with DUT_CE using - Invalid setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "Step 4.11: TH_CR2 starts a commissioning process with DUT_CE using - Invalid setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "Step 4.12: TH_CR2 starts a commissioning process with DUT_CE using - Invalid setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "Step 4.13: TH_CR2 starts a commissioning process with DUT_CE using - Invalid setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "Step 4.14: TH_CR2 starts a commissioning process with DUT_CE using - Invalid setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "Step 4.15: TH_CR2 starts a commissioning process with DUT_CE using - Invalid setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "Step 4.16: TH_CR2 starts a commissioning process with DUT_CE using - Invalid setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "Step 4.17: TH_CR2 starts a commissioning process with DUT_CE using - Invalid setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "Step 4.18: TH_CR2 starts a commissioning process with DUT_CE using - Invalid setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "Step 4.19: TH_CR2 starts a commissioning process with DUT_CE using - Invalid setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - - label: - "Step 4.20: TH_CR2 starts a commissioning process with DUT_CE using - Invalid setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: incorrectSetupCodePayload - - name: discoverOnce - value: true - response: - error: FAILURE - - # This step must match the verification step above where we checked `payload` - - label: - "Step 5: TH_CR2 starts a commissioning process with DUT_CE using valid - setup code" - identity: "beta" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S && PICS_SDK_CI_ONLY - arguments: - values: - - name: "nodeId" - value: nodeId2 - - name: "payload" - value: correctPayload - response: - error: FAILURE - - #Issue https://github.com/project-chip/connectedhomeip/issues/26127 - - label: "Step 5: TH_CR2 starts a commissioning process with DUT_CE" - verification: | - On TH_CR2 send the below command (with correct passcode) - - ./chip-tool pairing code 0xCAFE 36177160937 --commissioner-name beta - - Verify the following error on 21st attempt using correct passcode in TH_CR2(chip-tool) - - [1665484807.015876][5399:5399] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) - [1665484807.016042][5399:5399] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) - [1665484807.016108][5399:5399] CHIP:DL: Inet Layer shutdown - [1665484807.016163][5399:5399] CHIP:DL: BLE Layer shutdown - [1665484807.016215][5399:5399] CHIP:DL: System Layer shutdown - [1665484807.016460][5399:5399] CHIP:TOO: Run command failure: ../../commands/pairing/PairingCommand.cpp:164: CHIP Error 0x00000003: Incorrect state - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" - - - label: "Step 6: TH_CR3 starts a commissioning process with DUT_CE" - identity: "gamma" - cluster: "CommissionerCommands" - command: "PairWithCode" - PICS: CADMIN.S && PICS_SDK_CI_ONLY - arguments: - values: - - name: "nodeId" - value: nodeId3 - - name: "payload" - value: correctPayload - response: - error: FAILURE - - #Issue https://github.com/project-chip/connectedhomeip/issues/26127 - - label: "Step 6: TH_CR2 starts a commissioning process with DUT_CE" - verification: | - On TH_CR3 send the below command (with correct passcode) - - ./chip-tool pairing code 0xC00FEE 36177160938 (With correct passcode) --commissioner-name gamma - - Verify the following error on correct passcode in TH_CR3(chip-tool) - [1665484807.015876][5399:5399] CHIP:DL: renamed tmp file to file (/tmp/chip_counters.ini) - [1665484807.016042][5399:5399] CHIP:DL: NVS set: chip-counters/total-operational-hours = 0 (0x0) - [1665484807.016108][5399:5399] CHIP:DL: Inet Layer shutdown - [1665484807.016163][5399:5399] CHIP:DL: BLE Layer shutdown - [1665484807.016215][5399:5399] CHIP:DL: System Layer shutdown - [1665484807.016460][5399:5399] CHIP:TOO: Run command failure: ../../commands/pairing/PairingCommand.cpp:164: CHIP Error 0x00000003: Incorrect state - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP && CADMIN.S.C00.Rsp - arguments: - values: - - name: "message" - value: "Enter 'y' after success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml index 294cb9a9cc81ee..b24a3d094ec161 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_2_1.yaml @@ -115,7 +115,7 @@ tests: response: constraints: type: int16u - minValue: 0 + minValue: 1 maxValue: 65279 - label: "Step 10: TH reads from the DUT the (0x0008) ColorMode attribute" @@ -250,7 +250,7 @@ tests: response: constraints: type: int16u - minValue: 0 + minValue: 1 maxValue: 65279 - label: @@ -262,7 +262,7 @@ tests: response: constraints: type: int16u - minValue: 0 + minValue: 1 maxValue: 65279 - label: @@ -286,8 +286,7 @@ tests: response: constraints: type: int16u - minValue: 0 - maxValue: 65279 + python: (value is None) or ((value >= 1) and (value <= 65279)) #Defined Primaries Information Attribute Set - label: diff --git a/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml index 0438a6e376f0ee..cc21bc18a83e94 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_4_2.yaml @@ -393,6 +393,22 @@ tests: response: error: INVALID_COMMAND + - label: + "Step 6c: TH sends MoveSaturation command to DUT with MoveMode=0x00 + (stop) and Rate=0 (units/s)" + command: "MoveSaturation" + PICS: CC.S.F00 && CC.S.C04.Rsp + arguments: + values: + - name: "MoveMode" + value: 0 + - name: "Rate" + value: 0 + - name: "OptionsMask" + value: 0 + - name: "OptionsOverride" + value: 0 + - label: "Turn off light that we turned on" PICS: OO.S.C00.Rsp cluster: "On/Off" diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml index 5222aec2aa198c..28fe223777a006 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_3.yaml @@ -312,7 +312,7 @@ tests: error: INVALID_COMMAND - label: - "Step 5ab TH sends StepColorTemperature command to DUT with + "Step 5b TH sends StepColorTemperature command to DUT with StepMode=0x03 (down), StepSize=0" PICS: CC.S.F04 && CC.S.C4c.Rsp command: "StepColorTemperature" diff --git a/src/app/tests/suites/certification/Test_TC_CC_6_5.yaml b/src/app/tests/suites/certification/Test_TC_CC_6_5.yaml index 3bab44386e2181..38f33654e10177 100755 --- a/src/app/tests/suites/certification/Test_TC_CC_6_5.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_6_5.yaml @@ -55,7 +55,7 @@ tests: response: constraints: type: int16u - minValue: 0 + minValue: 1 maxValue: 65279 - label: "Step 0d: TH reads ColorTempPhysicalMinMireds attribute from DUT." @@ -65,7 +65,7 @@ tests: response: constraints: type: int16u - minValue: 0 + minValue: 1 maxValue: 65279 - label: "Step 0e: TH reads ColorTempPhysicalMaxMireds attribute from DUT." @@ -75,7 +75,7 @@ tests: response: constraints: type: int16u - minValue: 0 + minValue: 1 maxValue: 65279 - label: @@ -87,8 +87,7 @@ tests: response: constraints: type: int16u - minValue: 0 - maxValue: 65279 + python: (value is None) or ((value >= 1) and (value <= 65279)) - label: "Step 2a: TH writes to StartUpColorTemperatureMireds attribute with @@ -141,8 +140,7 @@ tests: saveAs: StartUpColorTemperatureMiredsValue constraints: type: int16u - minValue: 0 - maxValue: 65279 + python: (value is None) or ((value >= 1) and (value <= 65279)) - label: "Step 2b: Verify that the DUT response contains diff --git a/src/app/tests/suites/certification/Test_TC_CC_7_2.yaml b/src/app/tests/suites/certification/Test_TC_CC_7_2.yaml index 18f1113d4928b6..23397fa9cd1d01 100644 --- a/src/app/tests/suites/certification/Test_TC_CC_7_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_CC_7_2.yaml @@ -332,7 +332,7 @@ tests: - label: "Step 5a: TH sends EnhancedMoveHue command to DUT with MoveMode=0x01 (up) and Rate=0 (units/s)" - PICS: CC.S.F01 && CC.S.C41.Rsp" + PICS: CC.S.F01 && CC.S.C41.Rsp command: "EnhancedMoveHue" arguments: values: diff --git a/src/app/tests/suites/certification/Test_TC_CNET_4_13.yaml b/src/app/tests/suites/certification/Test_TC_CNET_4_13.yaml index d2dbeb418f9f25..8acd24628c910e 100644 --- a/src/app/tests/suites/certification/Test_TC_CNET_4_13.yaml +++ b/src/app/tests/suites/certification/Test_TC_CNET_4_13.yaml @@ -54,7 +54,7 @@ tests: entries as 'NumNetworks'" PICS: CNET.S.A0001 verification: | - ./chip-tool network-commissioning read networks 1 0 + ./chip-tool networkcommissioning read networks 1 0 The test case is not verifiable in RPI platform. As MaxNetworks value is 1 but expected is 4 ( Pre-Condition) @@ -128,7 +128,7 @@ tests: NT_SSID 2. NetworkIn dex is 'MaxNetwo rksValue' 3. Breadcrum b is 2" PICS: CNET.S.C08.Rsp && CNET.S.C05.Tx verification: | - ./chip-tool network-commissioning read networks 1 0 + ./chip-tool networkcommissioning read networks 1 0 The test case is not verifiable in RPI platform. As MaxNetworks value is 1 but expected is 4 ( Pre-Condition) @@ -189,7 +189,7 @@ tests: - label: "Step 13: TH readsNetworksattribute list fromthe DUT" PICS: CNET.S.A0001 verification: | - ./chip-tool network-commissioning read networks 1 0 + ./chip-tool networkcommissioning read networks 1 0 The test case is not verifiable in RPI platform. As MaxNetworks value is 1 but expected is 4 ( Pre-Condition) @@ -208,7 +208,7 @@ tests: - label: "Step 15: TH readsNetworksattribute list fromthe DUT" PICS: CNET.S.A0001 verification: | - ./chip-tool network-commissioning read networks 1 0 + ./chip-tool networkcommissioning read networks 1 0 The test case is not verifiable in RPI platform. As MaxNetworks value is 1 but expected is 4 ( Pre-Condition) @@ -268,7 +268,7 @@ tests: - label: "Step 21: TH readsNetworksattribute list fromthe DUT" PICS: CNET.S.A0001 verification: | - ./chip-tool network-commissioning read networks 1 0 + ./chip-tool networkcommissioning read networks 1 0 The test case is not verifiable in RPI platform. As MaxNetworks value is 1 but expected is 4 ( Pre-Condition) diff --git a/src/app/tests/suites/certification/Test_TC_DD_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DD_2_1.yaml index 94888631f6a143..e0f8386d742b97 100644 --- a/src/app/tests/suites/certification/Test_TC_DD_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DD_2_1.yaml @@ -35,13 +35,14 @@ tests: disabled: true - label: - "Step 1: If TH is aware of the DUT's Discovery Capability Bitmask, it + "Step 1: If TH is aware of the DUT’s Discovery Capability Bitmask, it SHALL initiate Device Discovery in any order of priority on all the networking technologies that are supported by both the TH and the DUT - If TH is unaware of the DUT's Discovery Capability Bitmask, it SHALL + If TH is unaware of the DUT’s Discovery Capability Bitmask, it MAY initiate Device Discovery in any order on all the networking - technologies it supports out of Wi-Fi Soft-AP, BLE, and on IP network - discovery." + technologies it supports out of Wi-Fi Soft-AP, Wi-Fi PAF, BLE, and on + IP network discovery, or initiate Device Discovery on a specific + networking technology." verification: | TH selects the DUT's capability bitmask and start the commissiong process accordingly No applicable TH or DUT logs. @@ -137,8 +138,8 @@ tests: disabled: true - label: - "Step 7: TH does not respond to DUT and DUT keeps sending ADVs. TH - waits at least 15 minutes" + "Step 7a: TH waits until T0+ 2 minutes and 45 seconds and confirms + that the DUT is still sending ADVs." PICS: MCORE.COM.BLE verification: | No applicable TH logs. @@ -148,39 +149,94 @@ tests: OR HCIDump (https://ubuntu.com/core/docs/bluez/reference/commands) 2. After DUT has been advertising for 2min59sec (right before the minimum 3min mark), check that the DUT is still advertising over BLE - 3. After DUT has been advertising for 15min, check that the DUT has stopped advertising over BLE disabled: true - - label: "Step 8: TH scans and finds the DUT SSID" - PICS: MCORE.COM.WIFI + - label: + "Step 7b: TH waits until T0+ 15 minutes and checks if the DUT is + sending ADVs." + PICS: MCORE.COM.BLE verification: | - Out of Scope - SoftAP commissioning not currently supported on TH=chip-tool + No applicable TH logs. + + 1. Discover commissionables over BLE using a BLE discovery tool of choice. + Try NRF Connect app (https://www.nordicsemi.com/Products/Development-tools/nrf-connect-for-desktop) + OR + HCIDump (https://ubuntu.com/core/docs/bluez/reference/commands) + 2. After DUT has been advertising for 15min(T0+ 15 minutes), check that the DUT has not stopped the advertising over BLE + + Instruction to verify using NRF Connect app: + >open nrfconnect app and scan for the device. + >once the deviceis listed double click on the device to view the ADV data + >Here you can see the advertisement range under the ADV. interval feild Check the advertisement range is grater than 1200ms + if the advertising rate is not 1285ms +/- 10ms, even though this is legal, since 1285ms is a SHOULD in the core specification. + >Click on the raw data option in theselected device, where you can get the 16-bit data + For example, "0xF6FF00050F0000000002" would translate to: + 0xF6, 0xFF= 0xFFF6 = 16-bit Matter UUID assigned by Bluetooth SIG + 0x00 = 0x00 (Commissionable) = Matter BLE OpCode + 0x01, 0x0F = 0x0F01 = 3841 Discriminator + 0x00, 0x00, = 0x0000 = 0 VendorID + 0x00, 0x00 = 0x0000 = 0 Product ID + 0x02 = Additional Data Flag(Extended Announcement) + here check discrimator and the "vendor-id"&"product-id" feild is set to 0 and Extended Data is set to 1 disabled: true - label: - "Step 9: TH scans and finds the DUT SSID TH sends to DUT a 1st power - cycle command (or reset manually) TH sends to DUT a 2nd power cycle - command (or reset manually)" - PICS: MCORE.COM.WIFI + "Step 8a: TH is configured to perform commissioning on Channel 6 in + 2.4GHz band." + PICS: MCORE.COM.WIFI && MCORE.DD.DISCOVERY_PAF + verification: | + [Configuration command to be filled by NXP] + + Configure the AP to the PAF working channel and connect TH to AP + disabled: true + + - label: + "Step 8b: TH is configured to perform commissioning on Channel 44 in + 5GHz band if it is in non-ETSI regulatory domains and on Channel 149 + in 5GHz band if it is in ETSI regulatory domains." + PICS: MCORE.COM.WIFI && !MCORE.COM.BLE && MCORE.DD.DISCOVERY_PAF + verification: | + [Configuration command to be filled by NXP] + + Configure the AP to the PAF working channel and connect TH to AP + disabled: true + + - label: "Step 9: DUT begins sending Wi-Fi PAF Publish messages." + PICS: MCORE.COM.WIFI && MCORE.DD.DISCOVERY_PAF + verification: | + [Verification command to be filled by NXP] + + * 2.4g: + $sudo ./chip-all-clusters-app --wifi --wifipaf freq_list=2437 + * 5g, FCC: + $sudo ./chip-all-clusters-app --wifi --wifipaf freq_list=5220 + * 5g ETSI: + $sudo ./chip-all-clusters-app --wifi --wifipaf freq_list=5745 + disabled: true + + - label: "Step 10: TH scans and finds the DUT SSID" + PICS: MCORE.COM.WIFI && MCORE.DD.DISCOVERY_SOFTAP verification: | Out of Scope SoftAP commissioning not currently supported on TH=chip-tool disabled: true - - label: "Step 10: TH scans and finds the DUT SSID" - PICS: MCORE.COM.WIFI && MCORE.DD.IE + - label: + "Step 11: TTH scans and finds the DUT SSID TH sends to DUT a 1st power + cycle command (or reset manually) TH sends to DUT a 2nd power cycle + command (or reset manually)" + PICS: MCORE.COM.WIFI && MCORE.DD.DISCOVERY_SOFTAP verification: | Out of Scope SoftAP commissioning not currently supported on TH=chip-tool disabled: true - label: - "Step 11: TH and DUT are connected to the same network through + "Step 12: TH and DUT are connected to the same network through vendor-unique means or by commissioning the DUT onto the Matter network and opening a commissioning window. The DUT is sending - mandatory Commissionable Node Discovery service records over - DNS-SD.|DUT is able to be discovered over DNS-SD." + mandatory Commissionable Node Discovery service records over DNS-SD." + PICS: MCORE.COM.WIFI && MCORE.DD.DISCOVERY_SOFTAP verification: | ./chip-all-clusters-app ... @@ -220,7 +276,7 @@ tests: disabled: true - label: - "Step 12a: TH and DUT are connected to the same network and the DUT is + "Step 13a: TH and DUT are connected to the same network and the DUT is sending optional Commissionable Node Discovery service records over DNS-SD." PICS: MCORE.DD.TXT_KEY_VP @@ -262,7 +318,7 @@ tests: disabled: true - label: - "Step 12b: TH and DUT are connected to the same network and the DUT is + "Step 13b: TH and DUT are connected to the same network and the DUT is sending optional Commissionable Node Discovery service records over DNS-SD." PICS: MCORE.DD.TXT_KEY_DT @@ -304,7 +360,7 @@ tests: disabled: true - label: - "Step 12c: TH and DUT are connected to the same network and the DUT is + "Step 13c: TH and DUT are connected to the same network and the DUT is sending optional Commissionable Node Discovery service records over DNS-SD." PICS: MCORE.DD.TXT_KEY_DN @@ -346,7 +402,7 @@ tests: disabled: true - label: - "Step 12d: TH and DUT are connected to the same network and the DUT is + "Step 13d: TH and DUT are connected to the same network and the DUT is sending optional Commissionable Node Discovery service records over DNS-SD." PICS: MCORE.DD.TXT_KEY_RI @@ -388,7 +444,7 @@ tests: disabled: true - label: - "Step 12e: TH and DUT are connected to the same network and the DUT is + "Step 13e: TH and DUT are connected to the same network and the DUT is sending optional Commissionable Node Discovery service records over DNS-SD." PICS: MCORE.DD.TXT_KEY_PH @@ -430,7 +486,7 @@ tests: disabled: true - label: - "Step 12f: TH and DUT are connected to the same network and the DUT is + "Step 13f: TH and DUT are connected to the same network and the DUT is sending optional Commissionable Node Discovery service records over DNS-SD." PICS: MCORE.DD.TXT_KEY_PI @@ -471,7 +527,7 @@ tests: txt = ["PI=10" "PH=33" "RI=AB" "CM=0" "D=840" "DN=Test Bulb" "DT=257" "VP=65521+32769"] disabled: true - - label: "Step 13: Place the DUT device into a non-commissionable state" + - label: "Step 14: Place the DUT device into a non-commissionable state" PICS: MCORE.DD.EXTENDED_DISCOVERY verification: | 1. Vendor specific, take DUT out of commissioning mode @@ -484,7 +540,7 @@ tests: disabled: true - label: - "Step 14a: TH and DUT are connected to the same network and the DUT is + "Step 15a: TH and DUT are connected to the same network and the DUT is sending a Commissionable Node Discovery service record over DNS-SD." verification: | ./chip-tool discover commissionables @@ -509,7 +565,7 @@ tests: disabled: true - label: - "Step 14b: Mandatory Commissioning Subtypes: Send a browse request for + "Step 15b: Mandatory Commissioning Subtypes: Send a browse request for '_services._dns-sd._udp' using a DNS-SD records command-line test tool (i.e. 'dns-sd -B _services._dns-sd._udp' or 'avahi-browse _services._dns-sd._udp -r')" @@ -524,7 +580,7 @@ tests: disabled: true - label: - "Step 14c: Optional Commissioning Subtypes: Send a browse request for + "Step 15c: Optional Commissioning Subtypes: Send a browse request for '_services._dns-sd._udp' using a DNS-SD records command-line test tool (i.e. 'dns-sd -B _services._dns-sd._udp' or 'avahi-browse _services._dns-sd._udp -r')" @@ -537,7 +593,7 @@ tests: 11:56:29.770 Add 3 7 . _sub.local. _V65521 disabled: true - - label: "Step 15a: Place the DUT device into Commissioning mode" + - label: "Step 16a: Place the DUT device into Commissioning mode" verification: | $ ./chip-tool discover commissionables Verify in TH as commissioner side: @@ -561,7 +617,7 @@ tests: disabled: true - label: - "Step 15b: Send a browse request for '_matterc._udp' using a DNS-SD + "Step 16b: Send a browse request for '_matterc._udp' using a DNS-SD records command-line test tool (i.e. 'dns-sd -B _matterc._udp' or 'avahi-browse _matterc._udp -r')" verification: | diff --git a/src/app/tests/suites/certification/Test_TC_DEMM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DEMM_1_2.yaml index 55aa1400ec1ac5..900428998445ea 100644 --- a/src/app/tests/suites/certification/Test_TC_DEMM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DEMM_1_2.yaml @@ -37,7 +37,6 @@ tests: at least one entry the values of the Value fields that are not larger than 16 bits - for each Value field: Is the mode tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster-derived tag value (No Optimization, Device Optimization, Local Optimization, Grid Optimization) or in the MfgTags (0x8000 to 0xBFFF) range - for at least one Value field: Is the mode tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a derived cluster value (RapidCool, RapidFreeze) - - if the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 - Verify that at least one ModeOptionsStruct entry includes either the RapidCool semantic tag or the RapidFreeze semantic tag in the SemanticTags field - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: diff --git a/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml index 2afe448fa99f30..cf47c3fc503a73 100644 --- a/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml @@ -42,23 +42,29 @@ tests: PICS: DESC.S.A0000 && DESC.S.A0003 verification: | Send a read request to the DUT using chip-tool to read the partsList attribute in the descriptor cluster on Endpoint 0. - Make a note of all the items(Endpoint id’s) in the list. In the below example there are 2 endpoint id's listed [1,2] + Make a note of all the items(Endpoint id’s) in the list. In the below example there are 4 endpoint id's listed [1, 2, 3, 4] - ./chip-tool descriptor read parts-list 1 0 + ./chip-tool descriptor read parts-list 1 0 Verify "PartsList" attribute is not empty (use this list of endpoints in step 1b) on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - [1672919206.069327][33426:33428] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2847656117 - [1672919206.069380][33426:33428] CHIP:TOO: PartsList: 2 entries - [1672919206.069398][33426:33428] CHIP:TOO: [1]: 1 - [1672919206.069410][33426:33428] CHIP:TOO: [2]: 2 + [1724249918.931] [2996912:2996914] [TOO] Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 444270524 + [1724249918.931] [2996912:2996914] [TOO] PartsList: 4 entries + [1724249918.931] [2996912:2996914] [TOO] [1]: 1 + [1724249918.931] [2996912:2996914] [TOO] [2]: 2 + [1724249918.931] [2996912:2996914] [TOO] [3]: 3 + [1724249918.931] [2996912:2996914] [TOO] [4]: 4 + ./chip-tool descriptor read device-type-list 1 0 - on TH (Chip-tool) log, Verify that the DeviceTypeList contains one Root Node Device Type and may only contain other Node Device Types (device types with scope=node, it can be any of the following Power Source, OTA Requestor, OTA Provider) next to the Root Node Device Type. (here DeviceType: 17 is power source ) + on TH (Chip-tool) log, + - Verify that the DeviceTypeList count is at least one. + - Verify that the DeviceTypeList contains one Root Node Device Type and may only contain other Node Device Types (device types with scope=node, it can be any of the following Power Source, OTA Requestor, OTA Provider) next to the Root Node Device Type. (here DeviceType: 17 is power source ) + - Read each element from the DeviceTypeList and check for the following: + DeviceType should be one of the DeviceTypes listed in the PIXIT.DESC.DeviceTypeConformanceList. - Revision value is not less than 1 and it should match the Revision of the DeviceType and below is the sample log provided for the raspi platform - [1674552598.748946][21129:21131] CHIP:DMG: } [[1692617243.785786][31325:31327] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1437984882 [1692617243.785840][31325:31327] CHIP:TOO: DeviceTypeList: 2 entries [1692617243.785862][31325:31327] CHIP:TOO: [1]: { @@ -89,9 +95,11 @@ tests: ./chip-tool descriptor read device-type-list 1 1 On TH (Chip-tool) log, Verify that the DeviceTypeList count is at least one. - - If the DeviceTypeList contains more than one Application Device Type, verify that all the Application Device Types are part of the same superset. - - Verify the DeviceTypeList does not contain the Root Node Device Type. - - Revision value is not less than 1 and it should match the Revision of the DeviceType and below is the sample log provided for the raspi platform + - If the DeviceTypeList contains more than one Application Device Type, verify that all the Application Device Types are part of the same superset. + - Verify the DeviceTypeList does not contain the Root Node Device Type. + - Read each element from the DeviceTypeList and check for the following: + DeviceType should match to the DeviceType listed in the PIXIT.DESC.DeviceTypeConformanceList. + - Revision value is not less than 1 and it should match the Revision of the DeviceType and below is the sample log provided for the raspi platform [1674552599.264189][21135:21137] CHIP:DMG: } [1692617790.900384][31584:31586] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 2832593371 @@ -115,9 +123,11 @@ tests: ./chip-tool descriptor read device-type-list 1 2 On TH (Chip-tool) log, Verify that the DeviceTypeList count is at least one. - - If the DeviceTypeList contains more than one Application Device Type, verify that all the Application Device Types are part of the same superset. - - Verify the DeviceTypeList does not contain the Root Node Device Type. - - Revision value is not less than 1 and it should match the Revision of the DeviceType and below is the sample log provided for the raspi platform + - If the DeviceTypeList contains more than one Application Device Type, verify that all the Application Device Types are part of the same superset. + - Verify the DeviceTypeList does not contain the Root Node Device Type. + - Read each element from the DeviceTypeList and check for the following: + DeviceType should match to the DeviceType listed in the PIXIT.DESC.DeviceTypeConformanceList. + - Revision value is not less than 1 and it should match the Revision of the DeviceType and below is the sample log provided for the raspi platform [1692618454.794870][31669:31671] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 1103199808 [1692618454.794946][31669:31671] CHIP:TOO: DeviceTypeList: 2 entries @@ -129,6 +139,57 @@ tests: [1692618454.795072][31669:31671] CHIP:TOO: DeviceType: 17 [1692618454.795080][31669:31671] CHIP:TOO: Revision: 1 [1692618454.795089][31669:31671] CHIP:TOO: } + + + ./chip-tool descriptor read parts-list 1 3 + + Verify parts-list response contains 0 entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1724250097.366] [2998028:2998030] [DMG] } + [1724250097.367] [2998028:2998030] [TOO] Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 816387248 + [1724250097.367] [2998028:2998030] [TOO] PartsList: 0 entries + + ./chip-tool descriptor read device-type-list 1 3 + + On TH (Chip-tool) log, Verify that the DeviceTypeList count is at least one. + - If the DeviceTypeList contains more than one Application Device Type, verify that all the Application Device Types are part of the same superset. + - Verify the DeviceTypeList does not contain the Root Node Device Type. + - Read each element from the DeviceTypeList and check for the following: + DeviceType should match to the DeviceType listed in the PIXIT.DESC.DeviceTypeConformanceList. + - Revision value is not less than 1 and it should match the Revision of the DeviceType and below is the sample log provided for the raspi platform + + [1724250131.542] [2998254:2998256] [DMG] } + [1724250131.542] [2998254:2998256] [TOO] Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 816387248 + [1724250131.543] [2998254:2998256] [TOO] DeviceTypeList: 1 entries + [1724250131.543] [2998254:2998256] [TOO] [1]: { + [1724250131.543] [2998254:2998256] [TOO] DeviceType: 15 + [1724250131.543] [2998254:2998256] [TOO] Revision: 3 + [1724250131.543] [2998254:2998256] [TOO] } + + ./chip-tool descriptor read parts-list 1 4 + + Verify parts-list response contains 0 entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + + [1724250163.361] [2998451:2998453] [DMG] } + [1724250163.361] [2998451:2998453] [TOO] Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 3394934309 + [1724250163.361] [2998451:2998453] [TOO] PartsList: 0 entries + + ./chip-tool descriptor read device-type-list 1 4 + + On TH (Chip-tool) log, Verify that the DeviceTypeList count is at least one. + - If the DeviceTypeList contains more than one Application Device Type, verify that all the Application Device Types are part of the same superset. + - Verify the DeviceTypeList does not contain the Root Node Device Type. + - Read each element from the DeviceTypeList and check for the following: + DeviceType should match to the DeviceType listed in the PIXIT.DESC.DeviceTypeConformanceList. + - Revision value is not less than 1 and it should match the Revision of the DeviceType and below is the sample log provided for the raspi platform + + [1724250191.099] [2998617:2998619] [DMG] } + [1724250191.099] [2998617:2998619] [TOO] Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0000 DataVersion: 3394934309 + [1724250191.099] [2998617:2998619] [TOO] DeviceTypeList: 1 entries + [1724250191.099] [2998617:2998619] [TOO] [1]: { + [1724250191.099] [2998617:2998619] [TOO] DeviceType: 15 + [1724250191.099] [2998617:2998619] [TOO] Revision: 3 + [1724250191.099] [2998617:2998619] [TOO] } disabled: true - label: "Step 2: TH reads 'ServerList' attribute." @@ -142,95 +203,121 @@ tests: Verify ServerList entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform, - [1707996554.409850][20755:20757] [DMG] } - [1707996554.410814][20755:20757] [TOO] Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 3583190746 - [1707996554.410955][20755:20757] [TOO] ServerList: 71 entries - [1707996554.410990][20755:20757] [TOO] [1]: 3 (Identify) - [1707996554.411002][20755:20757] [TOO] [2]: 4 (Groups) - [1707996554.411013][20755:20757] [TOO] [3]: 6 (OnOff) - [1707996554.411024][20755:20757] [TOO] [4]: 7 (OnOffSwitchConfiguration) - [1707996554.411034][20755:20757] [TOO] [5]: 8 (LevelControl) - [1707996554.411045][20755:20757] [TOO] [6]: 15 (BinaryInputBasic) - [1707996554.411056][20755:20757] [TOO] [7]: 29 (Descriptor) - [1707996554.411067][20755:20757] [TOO] [8]: 30 (Binding) - [1707996554.411078][20755:20757] [TOO] [9]: 37 (Actions) - [1707996554.411092][20755:20757] [TOO] [10]: 47 (PowerSource) - [1707996554.411103][20755:20757] [TOO] [11]: 59 (Switch) - [1707996554.411113][20755:20757] [TOO] [12]: 64 (FixedLabel) - [1707996554.411124][20755:20757] [TOO] [13]: 65 (UserLabel) - [1707996554.411135][20755:20757] [TOO] [14]: 69 (BooleanState) - [1707996554.411146][20755:20757] [TOO] [15]: 72 (OvenCavityOperationalState) - [1707996554.411156][20755:20757] [TOO] [16]: 73 (OvenMode) - [1707996554.411167][20755:20757] [TOO] [17]: 74 (LaundryDryerControls) - [1707996554.411177][20755:20757] [TOO] [18]: 80 (ModeSelect) - [1707996554.411188][20755:20757] [TOO] [19]: 81 (LaundryWasherMode) - [1707996554.411199][20755:20757] [TOO] [20]: 82 (RefrigeratorAndTemperatureControlledCabinetMode) - [1707996554.411209][20755:20757] [TOO] [21]: 83 (LaundryWasherControls) - [1707996554.411220][20755:20757] [TOO] [22]: 84 (RvcRunMode) - [1707996554.411231][20755:20757] [TOO] [23]: 85 (RvcCleanMode) - [1707996554.411240][20755:20757] [TOO] [24]: 86 (TemperatureControl) - [1707996554.411251][20755:20757] [TOO] [25]: 87 (RefrigeratorAlarm) - [1707996554.411261][20755:20757] [TOO] [26]: 89 (DishwasherMode) - [1707996554.411271][20755:20757] [TOO] [27]: 91 (AirQuality) - [1707996554.411282][20755:20757] [TOO] [28]: 92 (SmokeCoAlarm) - [1707996554.411293][20755:20757] [TOO] [29]: 93 (DishwasherAlarm) - [1707996554.411303][20755:20757] [TOO] [30]: 94 (MicrowaveOvenMode) - [1707996554.411313][20755:20757] [TOO] [31]: 96 (OperationalState) - [1707996554.411323][20755:20757] [TOO] [32]: 97 (RvcOperationalState) - [1707996554.411334][20755:20757] [TOO] [33]: 98 (ScenesManagement) - [1707996554.411345][20755:20757] [TOO] [34]: 113 (HepaFilterMonitoring) - [1707996554.411355][20755:20757] [TOO] [35]: 114 (ActivatedCarbonFilterMonitoring) - [1707996554.411367][20755:20757] [TOO] [36]: 128 (BooleanStateConfiguration) - [1707996554.411376][20755:20757] [TOO] [37]: 129 (ValveConfigurationAndControl) - [1707996554.411387][20755:20757] [TOO] [38]: 144 (ElectricalPowerMeasurement) - [1707996554.411396][20755:20757] [TOO] [39]: 145 (ElectricalEnergyMeasurement) - [1707996554.411406][20755:20757] [TOO] [40]: 152 (DeviceEnergyManagement) - [1707996554.411417][20755:20757] [TOO] [41]: 153 (EnergyEvse) - [1707996554.411427][20755:20757] [TOO] [42]: 157 (EnergyEvseMode) - [1707996554.411437][20755:20757] [TOO] [43]: 159 (DeviceEnergyManagementMode) - [1707996554.411449][20755:20757] [TOO] [44]: 258 (WindowCovering) - [1707996554.411459][20755:20757] [TOO] [45]: 259 (BarrierControl) - [1707996554.411469][20755:20757] [TOO] [46]: 512 (PumpConfigurationAndControl) - [1707996554.411480][20755:20757] [TOO] [47]: 513 (Thermostat) - [1707996554.411490][20755:20757] [TOO] [48]: 514 (FanControl) - [1707996554.411500][20755:20757] [TOO] [49]: 516 (ThermostatUserInterfaceConfiguration) - [1707996554.411511][20755:20757] [TOO] [50]: 768 (ColorControl) - [1707996554.411521][20755:20757] [TOO] [51]: 769 (BallastConfiguration) - [1707996554.411532][20755:20757] [TOO] [52]: 1024 (IlluminanceMeasurement) - [1707996554.411559][20755:20757] [TOO] [53]: 1026 (TemperatureMeasurement) - [1707996554.411562][20755:20757] [TOO] [54]: 1027 (PressureMeasurement) - [1707996554.411565][20755:20757] [TOO] [55]: 1028 (FlowMeasurement) - [1707996554.411568][20755:20757] [TOO] [56]: 1029 (RelativeHumidityMeasurement) - [1707996554.411571][20755:20757] [TOO] [57]: 1030 (OccupancySensing) - [1707996554.411575][20755:20757] [TOO] [58]: 1036 (CarbonMonoxideConcentrationMeasurement) - [1707996554.411578][20755:20757] [TOO] [59]: 1037 (CarbonDioxideConcentrationMeasurement) - [1707996554.411581][20755:20757] [TOO] [60]: 1043 (NitrogenDioxideConcentrationMeasurement) - [1707996554.411584][20755:20757] [TOO] [61]: 1045 (OzoneConcentrationMeasurement) - [1707996554.411587][20755:20757] [TOO] [62]: 1066 (Pm25ConcentrationMeasurement) - [1707996554.411589][20755:20757] [TOO] [63]: 1067 (FormaldehydeConcentrationMeasurement) - [1707996554.411592][20755:20757] [TOO] [64]: 1068 (Pm1ConcentrationMeasurement) - [1707996554.411595][20755:20757] [TOO] [65]: 1069 (Pm10ConcentrationMeasurement) - [1707996554.411598][20755:20757] [TOO] [66]: 1070 (TotalVolatileOrganicCompoundsConcentrationMeasurement) - [1707996554.411601][20755:20757] [TOO] [67]: 1071 (RadonConcentrationMeasurement) - [1707996554.411604][20755:20757] [TOO] [68]: 1283 (WakeOnLan) - [1707996554.411607][20755:20757] [TOO] [69]: 1288 (LowPower) - [1707996554.411610][20755:20757] [TOO] [70]: 2820 (ElectricalMeasurement) - [1707996554.411613][20755:20757] [TOO] [71]: 4294048773 (UnitTesting) + 1724250318.422] [2999432:2999434] [TOO] Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 753901911 + [1724250318.422] [2999432:2999434] [TOO] ServerList: 75 entries + [1724250318.422] [2999432:2999434] [TOO] [1]: 3 + [1724250318.422] [2999432:2999434] [TOO] [2]: 4 + [1724250318.422] [2999432:2999434] [TOO] [3]: 6 + [1724250318.422] [2999432:2999434] [TOO] [4]: 7 + [1724250318.422] [2999432:2999434] [TOO] [5]: 8 + [1724250318.422] [2999432:2999434] [TOO] [6]: 15 + [1724250318.422] [2999432:2999434] [TOO] [7]: 29 + [1724250318.422] [2999432:2999434] [TOO] [8]: 30 + [1724250318.422] [2999432:2999434] [TOO] [9]: 37 + [1724250318.422] [2999432:2999434] [TOO] [10]: 47 + [1724250318.423] [2999432:2999434] [TOO] [11]: 59 + [1724250318.423] [2999432:2999434] [TOO] [12]: 64 + [1724250318.423] [2999432:2999434] [TOO] [13]: 65 + [1724250318.423] [2999432:2999434] [TOO] [14]: 69 + [1724250318.423] [2999432:2999434] [TOO] [15]: 72 + [1724250318.423] [2999432:2999434] [TOO] [16]: 73 + [1724250318.423] [2999432:2999434] [TOO] [17]: 74 + [1724250318.423] [2999432:2999434] [TOO] [18]: 80 + [1724250318.423] [2999432:2999434] [TOO] [19]: 81 + [1724250318.423] [2999432:2999434] [TOO] [20]: 82 + [1724250318.423] [2999432:2999434] [TOO] [21]: 83 + [1724250318.423] [2999432:2999434] [TOO] [22]: 84 + [1724250318.423] [2999432:2999434] [TOO] [23]: 85 + [1724250318.423] [2999432:2999434] [TOO] [24]: 86 + [1724250318.423] [2999432:2999434] [TOO] [25]: 87 + [1724250318.423] [2999432:2999434] [TOO] [26]: 89 + [1724250318.423] [2999432:2999434] [TOO] [27]: 91 + [1724250318.423] [2999432:2999434] [TOO] [28]: 92 + [1724250318.423] [2999432:2999434] [TOO] [29]: 93 + [1724250318.423] [2999432:2999434] [TOO] [30]: 94 + [1724250318.423] [2999432:2999434] [TOO] [31]: 96 + [1724250318.423] [2999432:2999434] [TOO] [32]: 97 + [1724250318.423] [2999432:2999434] [TOO] [33]: 98 + [1724250318.423] [2999432:2999434] [TOO] [34]: 113 + [1724250318.423] [2999432:2999434] [TOO] [35]: 114 + [1724250318.423] [2999432:2999434] [TOO] [36]: 128 + [1724250318.424] [2999432:2999434] [TOO] [37]: 129 + [1724250318.424] [2999432:2999434] [TOO] [38]: 144 + [1724250318.424] [2999432:2999434] [TOO] [39]: 145 + [1724250318.424] [2999432:2999434] [TOO] [40]: 148 + [1724250318.424] [2999432:2999434] [TOO] [41]: 152 + [1724250318.424] [2999432:2999434] [TOO] [42]: 153 + [1724250318.424] [2999432:2999434] [TOO] [43]: 155 + [1724250318.424] [2999432:2999434] [TOO] [44]: 156 + [1724250318.424] [2999432:2999434] [TOO] [45]: 157 + [1724250318.424] [2999432:2999434] [TOO] [46]: 158 + [1724250318.424] [2999432:2999434] [TOO] [47]: 159 + [1724250318.424] [2999432:2999434] [TOO] [48]: 258 + [1724250318.424] [2999432:2999434] [TOO] [49]: 259 + [1724250318.424] [2999432:2999434] [TOO] [50]: 512 + [1724250318.424] [2999432:2999434] [TOO] [51]: 513 + [1724250318.424] [2999432:2999434] [TOO] [52]: 514 + [1724250318.424] [2999432:2999434] [TOO] [53]: 516 + [1724250318.424] [2999432:2999434] [TOO] [54]: 768 + [1724250318.424] [2999432:2999434] [TOO] [55]: 769 + [1724250318.424] [2999432:2999434] [TOO] [56]: 1024 + [1724250318.424] [2999432:2999434] [TOO] [57]: 1026 + [1724250318.424] [2999432:2999434] [TOO] [58]: 1027 + [1724250318.424] [2999432:2999434] [TOO] [59]: 1028 + [1724250318.425] [2999432:2999434] [TOO] [60]: 1029 + [1724250318.425] [2999432:2999434] [TOO] [61]: 1030 + [1724250318.425] [2999432:2999434] [TOO] [62]: 1036 + [1724250318.425] [2999432:2999434] [TOO] [63]: 1037 + [1724250318.425] [2999432:2999434] [TOO] [64]: 1043 + [1724250318.425] [2999432:2999434] [TOO] [65]: 1045 + [1724250318.425] [2999432:2999434] [TOO] [66]: 1066 + [1724250318.425] [2999432:2999434] [TOO] [67]: 1067 + [1724250318.425] [2999432:2999434] [TOO] [68]: 1068 + [1724250318.425] [2999432:2999434] [TOO] [69]: 1069 + [1724250318.425] [2999432:2999434] [TOO] [70]: 1070 + [1724250318.425] [2999432:2999434] [TOO] [71]: 1071 + [1724250318.425] [2999432:2999434] [TOO] [72]: 1283 + [1724250318.425] [2999432:2999434] [TOO] [73]: 1288 + [1724250318.425] [2999432:2999434] [TOO] [74]: 2820 + [1724250318.425] [2999432:2999434] [TOO] [75]: 4294048773 ./chip-tool descriptor read server-list 1 2 Verify ServerList entries on TH (Chip-tool) Log and below is the sample log provided for the raspi platform, Here ServerList entries are 7. - [1692618559.962829][31688:31690] [TOO] Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 1103199808 - [1692618559.962884][31688:31690] [TOO] ServerList: 7 entries - [1692618559.962910][31688:31690] [TOO] [1]: 3 (Identify) - [1692618559.962922][31688:31690] [TOO] [2]: 4 (Groups) - [1692618559.962933][31688:31690] [TOO] [3]: 5 (Unknown) - [1692618559.962945][31688:31690] [TOO] [4]: 6 (OnOff) - [1692618559.962955][31688:31690] [TOO] [5]: 29 (Descriptor) - [1692618559.962966][31688:31690] [TOO] [6]: 47 (PowerSource) - [1692618559.962978][31688:31690] [TOO] [7]: 1030 (OccupancySensing) + [1712128823.483245][6638:6640] CHIP:DMG: } + [1712128823.483490][6638:6640] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 3376044082 + [1712128823.483556][6638:6640] CHIP:TOO: ServerList: 7 entries + [1712128823.483582][6638:6640] CHIP:TOO: [1]: 3 + [1712128823.483595][6638:6640] CHIP:TOO: [2]: 4 + [1712128823.483606][6638:6640] CHIP:TOO: [3]: 6 + [1712128823.483617][6638:6640] CHIP:TOO: [4]: 29 + [1712128823.483628][6638:6640] CHIP:TOO: [5]: 47 + [1712128823.483639][6638:6640] CHIP:TOO: [6]: 98 + [1712128823.483650][6638:6640] CHIP:TOO: [7]: 1030 + + ./chip-tool descriptor read server-list 1 3 + + Verify ServerList entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform, + + [1724250405.960] [2999967:2999969] [DMG] } + [1724250405.960] [2999967:2999969] [TOO] Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 816387248 + [1724250405.960] [2999967:2999969] [TOO] ServerList: 3 entries + [1724250405.960] [2999967:2999969] [TOO] [1]: 3 + [1724250405.960] [2999967:2999969] [TOO] [2]: 29 + [1724250405.960] [2999967:2999969] [TOO] [3]: 59 + + ./chip-tool descriptor read server-list 1 4 + + Verify ServerList entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform, + + [1724250445.115] [3000229:3000231] [DMG] } + [1724250445.116] [3000229:3000231] [TOO] Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0001 DataVersion: 3394934309 + [1724250445.116] [3000229:3000231] [TOO] ServerList: 3 entries + [1724250445.116] [3000229:3000231] [TOO] [1]: 3 + [1724250445.116] [3000229:3000231] [TOO] [2]: 29 + [1724250445.116] [3000229:3000231] [TOO] [3]: 59 disabled: true - label: "Step 3: TH reads 'ClientList' attribute" @@ -244,30 +331,51 @@ tests: Verify client list entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform, Here ClientList entries are 1. - [1676367470.160199][9805:9807] [DMG] } - [1676367470.160268][9805:9807] [TOO] Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 3336430903 - [1676367470.160282][9805:9807] [TOO] ClientList: 1 entries - [1676367470.160289][9805:9807] [TOO] [1]: 6 (OnOff) + [1676367470.160199][9805:9807] CHIP:DMG: } + [1676367470.160268][9805:9807] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 3336430903 + [1676367470.160282][9805:9807] CHIP:TOO: ClientList: 1 entries + [1676367470.160289][9805:9807] CHIP:TOO: [1]: 6 ./chip-tool descriptor read client-list 1 2 Verify client list entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform, Here ClientList entries are 0. - [1660146160.390200][46818:46823] [TOO] Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 1051414887 - [1660146160.390211][46818:46823] [TOO] ClientList: 0 entries + [1660146160.390200][46818:46823] CHIP:TOO: Endpoint: 2 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 1051414887 + [1660146160.390211][46818:46823] CHIP:TOO: ClientList: 0 entries + + ./chip-tool descriptor read client-list 1 3 + + Verify client list entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform, Here ClientList entries are 0. + + [1724250500.160] [3000560:3000563] [DMG] } + [1724250500.160] [3000560:3000563] [TOO] Endpoint: 3 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 816387248 + [1724250500.160] [3000560:3000563] [TOO] ClientList: 0 entries + + ./chip-tool descriptor read client-list 1 4 + + Verify client list entries on the TH (Chip-tool) and below is the sample log provided for the raspi platform, Here ClientList entries are 0. + + [1724250523.972] [3000725:3000727] [DMG] } + [1724250523.973] [3000725:3000727] [TOO] Endpoint: 4 Cluster: 0x0000_001D Attribute 0x0000_0002 DataVersion: 3394934309 + [1724250523.973] [3000725:3000727] [TOO] ClientList: 0 entries disabled: true - label: "Step 4: TH reads 'PartsList' attribute." PICS: DESC.S.A0003 verification: | - ./chip-tool descriptor read parts-list 1 0 + ./chip-tool descriptor read parts-list 1 0 + + Verify PartsList response greater than 0 and Endpoint is in the range of 1 to 65534 on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - Verify PartsList response greater than 0 and Endpoint is in the range of 1 to 65534 on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + [1724250727.129] [3001992:3001994] [DMG] } + [1724250727.130] [3001992:3001994] [TOO] Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 444270524 + [1724250727.130] [3001992:3001994] [TOO] PartsList: 4 entries + [1724250727.130] [3001992:3001994] [TOO] [1]: 1 + [1724250727.130] [3001992:3001994] [TOO] [2]: 2 + [1724250727.130] [3001992:3001994] [TOO] [3]: 3 + [1724250727.130] [3001992:3001994] [TOO] [4]: 4 - [1672919326.178697][33468:33470] CHIP:TOO: Endpoint: 0 Cluster: 0x0000_001D Attribute 0x0000_0003 DataVersion: 2847656117 - [1672919326.178739][33468:33470] CHIP:TOO: PartsList: 2 entries - [1672919326.178765][33468:33470] CHIP:TOO: [1]: 1 - [1672919326.178777][33468:33470] CHIP:TOO: [2]: 2 + Repeat Steps 1b to 4 in a recursive manner for the Endpoints read in this step (i.e. recursively walk all the Endpoints encountered in all PartsLists) disabled: true - label: "Step 5: TH reads from the DUT the 'TagList' attribute." diff --git a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml index 0bb760685297ef..20b2d348617635 100644 --- a/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_DISHM_1_2.yaml @@ -36,49 +36,48 @@ tests: verification: | ./chip-tool dishwashermode read supported-modes 1 1 - Verify that the DUT response contains list of ModeOptionsStruct entries. - - Verify that the list has at least 2 and at most 255 entries - - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value. - - If ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the mode tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster-derived tag value (Normal, Heavy, Light) or in the MfgTags (0x8000 to 0xBFFF) range. - - If the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 - - Verify that at least one ModeOptionsStruct entry includes the Normal mode tag - - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + Verify that the DUT response contains list of ModeOptionsStruct entries. + - Verify that the list has at least 2 and at most 255 entries + - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value. + - If ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the mode tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster-derived tag value (Normal, Heavy, Light) or in the MfgTags (0x8000 to 0xBFFF) range. + - Verify that at least one ModeOptionsStruct entry includes the Normal mode tag + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - [1689997453.610123][360094:360096] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 1427220838 - [1689997453.610169][360094:360096] CHIP:TOO: SupportedModes: 3 entries - [1689997453.610483][360094:360096] CHIP:TOO: [1]: { - [1689997453.610503][360094:360096] CHIP:TOO: Label: Normal - [1689997453.610530][360094:360096] CHIP:TOO: Mode: 0 - [1689997453.610536][360094:360096] CHIP:TOO: ModeTags: 1 entries - [1689997453.610540][360094:360096] CHIP:TOO: [1]: { - [1689997453.610542][360094:360096] CHIP:TOO: Value: 16384 - [1689997453.610551][360094:360096] CHIP:TOO: } - [1689997453.610553][360094:360096] CHIP:TOO: } - [1689997453.610559][360094:360096] CHIP:TOO: [2]: { - [1689997453.610571][360094:360096] CHIP:TOO: Label: Heavy - [1689997453.610574][360094:360096] CHIP:TOO: Mode: 1 - [1689997453.610577][360094:360096] CHIP:TOO: ModeTags: 2 entries - [1689997453.610580][360094:360096] CHIP:TOO: [1]: { - [1689997453.610582][360094:360096] CHIP:TOO: Value: 7 - [1689997453.610583][360094:360096] CHIP:TOO: } - [1689997453.610585][360094:360096] CHIP:TOO: [2]: { - [1689997453.610587][360094:360096] CHIP:TOO: Value: 16385 - [1689997453.610588][360094:360096] CHIP:TOO: } - [1689997453.610590][360094:360096] CHIP:TOO: } - [1689997453.610594][360094:360096] CHIP:TOO: [3]: { - [1689997453.610595][360094:360096] CHIP:TOO: Label: Light - [1689997453.610597][360094:360096] CHIP:TOO: Mode: 2 - [1689997453.610600][360094:360096] CHIP:TOO: ModeTags: 3 entries - [1689997453.610602][360094:360096] CHIP:TOO: [1]: { - [1689997453.610604][360094:360096] CHIP:TOO: Value: 16386 - [1689997453.610605][360094:360096] CHIP:TOO: } - [1689997453.610607][360094:360096] CHIP:TOO: [2]: { - [1689997453.610609][360094:360096] CHIP:TOO: Value: 8 - [1689997453.610610][360094:360096] CHIP:TOO: } - [1689997453.610612][360094:360096] CHIP:TOO: [3]: { - [1689997453.610614][360094:360096] CHIP:TOO: Value: 2 - [1689997453.610615][360094:360096] CHIP:TOO: } - [1689997453.610617][360094:360096] CHIP:TOO: } + [1689997453.610123][360094:360096] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0059 Attribute 0x0000_0000 DataVersion: 1427220838 + [1689997453.610169][360094:360096] CHIP:TOO: SupportedModes: 3 entries + [1689997453.610483][360094:360096] CHIP:TOO: [1]: { + [1689997453.610503][360094:360096] CHIP:TOO: Label: Normal + [1689997453.610530][360094:360096] CHIP:TOO: Mode: 0 + [1689997453.610536][360094:360096] CHIP:TOO: ModeTags: 1 entries + [1689997453.610540][360094:360096] CHIP:TOO: [1]: { + [1689997453.610542][360094:360096] CHIP:TOO: Value: 16384 + [1689997453.610551][360094:360096] CHIP:TOO: } + [1689997453.610553][360094:360096] CHIP:TOO: } + [1689997453.610559][360094:360096] CHIP:TOO: [2]: { + [1689997453.610571][360094:360096] CHIP:TOO: Label: Heavy + [1689997453.610574][360094:360096] CHIP:TOO: Mode: 1 + [1689997453.610577][360094:360096] CHIP:TOO: ModeTags: 2 entries + [1689997453.610580][360094:360096] CHIP:TOO: [1]: { + [1689997453.610582][360094:360096] CHIP:TOO: Value: 7 + [1689997453.610583][360094:360096] CHIP:TOO: } + [1689997453.610585][360094:360096] CHIP:TOO: [2]: { + [1689997453.610587][360094:360096] CHIP:TOO: Value: 16385 + [1689997453.610588][360094:360096] CHIP:TOO: } + [1689997453.610590][360094:360096] CHIP:TOO: } + [1689997453.610594][360094:360096] CHIP:TOO: [3]: { + [1689997453.610595][360094:360096] CHIP:TOO: Label: Light + [1689997453.610597][360094:360096] CHIP:TOO: Mode: 2 + [1689997453.610600][360094:360096] CHIP:TOO: ModeTags: 3 entries + [1689997453.610602][360094:360096] CHIP:TOO: [1]: { + [1689997453.610604][360094:360096] CHIP:TOO: Value: 16386 + [1689997453.610605][360094:360096] CHIP:TOO: } + [1689997453.610607][360094:360096] CHIP:TOO: [2]: { + [1689997453.610609][360094:360096] CHIP:TOO: Value: 8 + [1689997453.610610][360094:360096] CHIP:TOO: } + [1689997453.610612][360094:360096] CHIP:TOO: [3]: { + [1689997453.610614][360094:360096] CHIP:TOO: Value: 2 + [1689997453.610615][360094:360096] CHIP:TOO: } + [1689997453.610617][360094:360096] CHIP:TOO: } disabled: true - label: "Step 3: TH reads from the DUT the CurrentMode attribute." diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml index 38465c434078bb..8954d44a658d97 100755 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_1.yaml @@ -35,8 +35,35 @@ tests: - name: "nodeId" value: nodeId - - label: "Precondition: Create new user" - PICS: DRLK.S.F00 && DRLK.S.F07 + - label: "Step 1a: TH reads LockState attribute from DUT" + PICS: DRLK.S.A0000 + command: "readAttribute" + attribute: "LockState" + response: + saveAs: LockStateValue + constraints: + type: enum8 + minValue: 0 + maxValue: 3 + + - label: "Step 1b: TH writes LockState attribute as 1" + PICS: DRLK.S.A0000 + command: "writeAttribute" + attribute: "LockState" + arguments: + value: 1 + response: + error: UNSUPPORTED_WRITE + + - label: "Step 1c: TH reads LockState attribute from DUT" + PICS: DRLK.S.A0000 + command: "readAttribute" + attribute: "LockState" + response: + value: LockStateValue + + - label: "Step 1d: TH sends SetUser Command to DUT" + PICS: DRLK.S.F08 && DRLK.S.C1a.Rsp command: "SetUser" timedInteractionTimeoutMs: 1000 arguments: @@ -56,38 +83,34 @@ tests: - name: "CredentialRule" value: 0 - - label: "Precondition: Read the user back and verify its fields" - PICS: DRLK.S.F00 && DRLK.S.F07 - command: "GetUser" - arguments: - values: - - name: "UserIndex" - value: 1 + - label: + "Step 1e: TH reads MinPINCodeLength attribute and saves the value as + min_pin_code_length" + PICS: DRLK.S.F08 && DRLK.S.F00 + command: "readAttribute" + attribute: "MinPINCodeLength" response: - values: - - name: "UserIndex" - value: 1 - - name: "UserName" - value: "xxx" - - name: "UserUniqueID" - value: 6452 - - name: "UserStatus" - value: 1 - - name: "UserType" - value: 0 - - name: "CredentialRule" - value: 0 - - name: "Credentials" - value: [] - - name: "CreatorFabricIndex" - value: 1 - - name: "LastModifiedFabricIndex" - value: 1 - - name: "NextUserIndex" - value: null + saveAs: min_pin_code_length + constraints: + type: int8u + minValue: 0 + maxValue: 255 - - label: "Precondition: Create new PIN credential and lock/unlock user" - PICS: DRLK.S.F00 && DRLK.S.F07 + - label: + "Step 1f: TH reads MaxPINCodeLength attribute and saves the value as + max_pin_code_length" + PICS: DRLK.S.F08 && DRLK.S.F00 + command: "readAttribute" + attribute: "MaxPINCodeLength" + response: + saveAs: max_pin_code_length + constraints: + type: int8u + minValue: 0 + maxValue: 255 + + - label: "Step 1g: TH sends SetCredential Command" + PICS: DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx command: "SetCredential" timedInteractionTimeoutMs: 1000 arguments: @@ -104,64 +127,9 @@ tests: value: null - name: "UserType" value: null - response: - values: - - name: "Status" - value: 0 - - name: "UserIndex" - value: null - - name: "NextCredentialIndex" - value: 2 - - - label: "Precondition: Verify created PIN credential" - PICS: DRLK.S.F00 && DRLK.S.F07 - command: "GetCredentialStatus" - arguments: - values: - - name: "Credential" - value: { CredentialType: 1, CredentialIndex: 1 } - response: - values: - - name: "CredentialExists" - value: true - - name: "UserIndex" - value: 1 - - name: "CreatorFabricIndex" - value: 1 - - name: "LastModifiedFabricIndex" - value: 1 - - name: "NextCredentialIndex" - value: null - - - label: "Step 1a: TH reads LockState attribute from DUT" - PICS: DRLK.S.A0000 - command: "readAttribute" - attribute: "LockState" - response: - saveAs: LockStateValue - constraints: - type: enum8 - minValue: 0 - maxValue: 3 - - - label: "Step 1b: TH writes LockState attribute as 1" - PICS: DRLK.S.A0000 - command: "writeAttribute" - attribute: "LockState" - arguments: - value: 1 - response: - error: UNSUPPORTED_WRITE - - - label: "Step 1c: TH reads LockState attribute from DUT" - PICS: DRLK.S.A0000 - command: "readAttribute" - attribute: "LockState" - response: - value: LockStateValue - label: - "Step 1d: TH sends a Lock Door command to the DUT. If DRLK.S.F00(PIN) + "Step 1h: TH sends a Lock Door command to the DUT. If DRLK.S.F00(PIN) & DRLK.S.F07(COTA), include a Valid PINCode in the Lock Door command." PICS: DRLK.S.C00.Rsp && DRLK.S.F00 && DRLK.S.F07 && DRLK.S.A0000 command: "LockDoor" @@ -171,7 +139,8 @@ tests: - name: "PINCode" value: "123456" - - label: "Step 1d: TH sends a Lock Door command to the DUT." + - label: + "Step 1h: TH sends a Lock Door command to the DUT without pin_code." PICS: DRLK.S.C00.Rsp && !DRLK.S.F00 && !DRLK.S.F07 && DRLK.S.A0000 command: "LockDoor" timedInteractionTimeoutMs: 1000 @@ -184,23 +153,16 @@ tests: values: - name: "ms" value: WaitAfterLockAandUnlockDoor - - - label: "Step 1d: TH reads LockState attribute from DUT" + - label: "Step 1h: TH reads LockState attribute from DUT" PICS: DRLK.S.A0000 command: "readAttribute" attribute: "LockState" response: value: 1 - - label: - "Step 1e: TH sends a Unlock Door command to the DUT. If + "Step 1i: TH sends a Unlock Door command to the DUT. If DRLK.S.F00(PIN) & DRLK.S.F07(COTA), include a Valid PINCode in the Unlock Door command" - PICS: DRLK.S.C01.Rsp && !DRLK.S.F00 && !DRLK.S.F07 && DRLK.S.A0000 - command: "UnlockDoor" - timedInteractionTimeoutMs: 1000 - - - label: "Step 1e: TH sends a Unlock Door command to the DUT." PICS: DRLK.S.C01.Rsp && DRLK.S.F00 && DRLK.S.F07 && DRLK.S.A0000 command: "UnlockDoor" timedInteractionTimeoutMs: 1000 @@ -209,6 +171,12 @@ tests: - name: "PINCode" value: "123456" + - label: + "Step 1i: TH sends a Unlock Door command to the DUT without pincode." + PICS: DRLK.S.C01.Rsp && !DRLK.S.F00 && !DRLK.S.F07 && DRLK.S.A0000 + command: "UnlockDoor" + timedInteractionTimeoutMs: 1000 + - label: "Wait after Unlock Door" PICS: DRLK.S.C00.Rsp cluster: "DelayCommands" @@ -218,14 +186,14 @@ tests: - name: "ms" value: WaitAfterLockAandUnlockDoor - - label: "Step 1e: TH reads LockState attribute from DUT" + - label: "Step 1i: TH reads LockState attribute from DUT" PICS: DRLK.S.A0000 command: "readAttribute" attribute: "LockState" response: value: 2 - - label: "Step 1f: Simulate a not fully locked scenario on the DUT." + - label: "Step 1j: Simulate a not fully locked scenario on the DUT." PICS: DRLK.S.A0000 && DRLK.S.M.SimulateNotFullyLocked && PICS_SKIP_SAMPLE_APP @@ -1366,6 +1334,26 @@ tests: response: value: Current_WrongCode_EntryLimit + - label: "Step 31b: TH writes WrongCodeEntryLimit attribute as 8" + PICS: + " ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0030 && + DRLK.S.M.WrongCodeEntryLimitAttributeWritable " + command: "writeAttribute" + attribute: "WrongCodeEntryLimit" + arguments: + value: 8 + + - label: "Step 31b: TH writes WrongCodeEntryLimit attribute as 8" + PICS: + " ( DRLK.S.F00 || DRLK.S.F01 ) && DRLK.S.A0030 && + !DRLK.S.M.WrongCodeEntryLimitAttributeWritable " + command: "writeAttribute" + attribute: "WrongCodeEntryLimit" + arguments: + value: 8 + response: + error: UNSUPPORTED_WRITE + - label: "Step 32a: TH reads UserCodeTemporary DisableTime attribute from DUT TH saves the values as Current_UserCode TemporaryDisableTime" @@ -1552,7 +1540,7 @@ tests: value: NumberOfCredentialsSupportedPerUserValue - label: "Step 36: TH sends ClearCredential Command to DUT" - PICS: DRLK.S.F00 && DRLK.S.F07 && DRLK.S.C26.Rsp + PICS: DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C26.Rsp command: "ClearCredential" timedInteractionTimeoutMs: 1000 arguments: @@ -1562,7 +1550,7 @@ tests: - label: "Step 37: TH sends ClearUser Command to DUT with the UserIndex as 1" - PICS: DRLK.S.F07 && DRLK.S.C1d.Rsp + PICS: DRLK.S.F08 && DRLK.S.C1d.Rsp command: "ClearUser" timedInteractionTimeoutMs: 1000 arguments: diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_10.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_10.yaml index 321e04f55f3e2a..d608353dd5393b 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_10.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_10.yaml @@ -34,24 +34,14 @@ tests: 2. Build respective app (lock-app) 3. Commission DUT to TH 4. Open 2nd terminal of DUT and provide the below command to obtain PID of DUT - ps -aef|grep lock-app + ps -aef|grep lock-app 5. Follow the Verification step below to generate the event in 2nd terminal of DUT - Pre-Conditions "1 TH is commissioned with the DUT 2 Lock device is the DUT - Before sending the Events proceed following steps: - - 1. Send Set User Command and Get User for setting User. - - 2. Send Set Credential Command and Get Credential Status for setting PIN code. - - After sending Events with all condition proceed following step - - 1. Send Clear Credential and Clear User Command." disabled: true - label: @@ -62,9 +52,10 @@ tests: To trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in lock-app to generate the event, Vendor Dut should have capability to generate this event) echo '{"Cmd": "SendDoorLockAlarm", "Params": { "EndpointId": 1, "AlarmCode": 0 } }' > /tmp/chip_lock_app_fifo- (PID of lock-app) + For example : - echo '{"Cmd": "SendDoorLockAlarm", "Params": { "EndpointId": 1, "AlarmCode": 0 } }' > /tmp/chip_lock_app_fifo-3940 (PID may vary based on the actual DUT) + echo '{"Cmd": "SendDoorLockAlarm", "Params": { "EndpointId": 1, "AlarmCode": 0 } }' > /tmp/chip_lock_app_fifo-3940 (PID may vary based on the actual DUT) disabled: true - label: "Step 1b: TH reads the DoorLockAlarm event from DUT" @@ -82,6 +73,7 @@ tests: [1659521453.110507][4098:4103] CHIP:TOO: DoorLockAlarm: { [1659521453.110557][4098:4103] CHIP:TOO: AlarmCode: 0 [1659521453.110591][4098:4103] CHIP:TOO: } + disabled: true - label: "Step 2a: Trigger the DUT to generate DoorStateChange Event" @@ -109,16 +101,57 @@ tests: disabled: true - label: - "Step 3a: TH sends the Lock Door command (using Remote) to the DUT - with valid PINCode" - PICS: DRLK.S.C00.Rsp + "Step 2c: TH sends SetUser Command to DUT with the following values: + a) OperationType as 0, b)UserIndex as 1, c)UserName as xxx, + d)UserUniqueID as 6452, e)UserStatus as 1, f)UserType as 0, + g)CredentialRule as 0" + PICS: DRLK.S.F08 && DRLK.S.C1a.Rsp verification: | ./chip-tool doorlock set-user 0 1 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 Via the TH (chip-tool), verify the SUCCESS response for setting the Users details. - [1656497453.684077][25847:25853] CHIP:DMG: status = 0x00 (SUCCESS), + [1721036387.039] [100957:100959] [DMG] StatusIB = + [1721036387.039] [100957:100959] [DMG] { + [1721036387.039] [100957:100959] [DMG] status = 0x00 (SUCCESS), + [1721036387.040] [100957:100959] [DMG] }, + disabled: true + + - label: + "Step 2d: TH reads MinPINCodeLength attribute and saves the value as + min_pin_code_length." + PICS: DRLK.S.F08 && DRLK.S.F00 + verification: | + ./chip-tool doorlock read min-pincode-length 1 1 + + Via the TH (chip-tool), verify that the MinPINCodeLength attribute contains value in the range of 0 to 255. + + [1654680280.327488][3639:3644] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0018 DataVersion: 3738767914 + [1654680280.327558][3639:3644] CHIP:TOO: MinPINCodeLength: 6 + disabled: true + + - label: + "Step 2e: TH reads MaxPINCodeLength attribute and saves the value as + max_pin_code_length" + PICS: DRLK.S.F08 && DRLK.S.F00 + verification: | + ./chip-tool doorlock read max-pincode-length 1 1 + Via the TH (chip-tool), verify that the MaxPINCodeLength attribute contains value in the range of 0 to 255. + + [1654680165.815239][3630:3635] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Attribute 0x0000_0017 DataVersion: 3738767914 + [1654680165.815374][3630:3635] CHIP:TOO: MaxPINCodeLength: 8 + disabled: true + + - label: + "Step 2f: TH sends SetCredential Command to DUT with the following + fields and CredentialData Length is in an inclusive range of + min_pin_code_length to max_pin_code_length, CredentialData='123456' a) + OperationType as 0, b) Credential as 1 2, c) CredentialData as 123456, + d) UserIndex as 1, e) UserStatus as null f) UserType as null. Save + CredentialData as pin_code" + PICS: DRLK.S.F08 && DRLK.S.F00 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx + verification: | ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 2 }' 123456 1 null null 1 1 --timedInteractionTimeoutMs 1000 Via the TH (chip-tool), verify the SUCCESS response for setting the credential details. @@ -127,7 +160,13 @@ tests: [1656497508.814257][25858:25863] CHIP:TOO: status: 0 [1656497508.814301][25858:25863] CHIP:TOO: userIndex: null [1656497508.814343][25858:25863] CHIP:TOO: nextCredentialIndex: 3 + disabled: true + - label: + "Step 3a: TH sends the Lock Door command (using Remote) to the DUT + with valid PINCode" + PICS: DRLK.S.C00.Rsp + verification: | ./chip-tool doorlock lock-door 1 1 --timedInteractionTimeoutMs 1000 --PINCode 123456 Via the TH (chip-tool), verify the SUCCESS response for door lock operation with valid PINCode. @@ -137,15 +176,6 @@ tests: [1654687870.020756][4246:4251] CHIP:DMG: { [1654687870.020797][4246:4251] CHIP:DMG: status = 0x00 (SUCCESS), [1654687870.020837][4246:4251] CHIP:DMG: }, - [1654687870.020879][4246:4251] CHIP:DMG: - [1654687870.020919][4246:4251] CHIP:DMG: }, - [1654687870.020963][4246:4251] CHIP:DMG: - [1654687870.020994][4246:4251] CHIP:DMG: }, - [1654687870.021033][4246:4251] CHIP:DMG: - [1654687870.021063][4246:4251] CHIP:DMG: ], - [1654687870.021100][4246:4251] CHIP:DMG: - [1654687870.021130][4246:4251] CHIP:DMG: InteractionModelRevision = 1 - [1654687870.021160][4246:4251] CHIP:DMG: }," disabled: true - label: "Step 3b: TH reads the LockOperation event from DUT" @@ -192,16 +222,6 @@ tests: [1659777464.384997][3157:3162] CHIP:DMG: { [1659777464.385032][3157:3162] CHIP:DMG: status = 0x00 (SUCCESS), [1659777464.385067][3157:3162] CHIP:DMG: }, - [1659777464.385099][3157:3162] CHIP:DMG: - [1659777464.385128][3157:3162] CHIP:DMG: }, - [1659777464.385162][3157:3162] CHIP:DMG: - [1659777464.385189][3157:3162] CHIP:DMG: }, - [1659777464.385221][3157:3162] CHIP:DMG: - [1659777464.385244][3157:3162] CHIP:DMG: ], - [1659777464.385272][3157:3162] CHIP:DMG: - [1659777464.385295][3157:3162] CHIP:DMG: InteractionModelRevision = 1 - [1659777464.385318][3157:3162] CHIP:DMG: }, - [1659777464.385375][3157:3162] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0001 Status=0x0 disabled: true - label: "Step 3d: TH reads the LockOperation event from DUT" @@ -338,17 +358,6 @@ tests: [1659777735.863849][3232:3237] CHIP:DMG: { [1659777735.863888][3232:3237] CHIP:DMG: status = 0x01 (FAILURE), [1659777735.863925][3232:3237] CHIP:DMG: }, - [1659777735.863962][3232:3237] CHIP:DMG: - [1659777735.863996][3232:3237] CHIP:DMG: }, - [1659777735.864038][3232:3237] CHIP:DMG: - [1659777735.864068][3232:3237] CHIP:DMG: }, - [1659777735.864104][3232:3237] CHIP:DMG: - [1659777735.864133][3232:3237] CHIP:DMG: ], - [1659777735.864166][3232:3237] CHIP:DMG: - [1659777735.864192][3232:3237] CHIP:DMG: InteractionModelRevision = 1 - [1659777735.864218][3232:3237] CHIP:DMG: }, - [1659777735.864281][3232:3237] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0000 Status=0x1 - [1659777735.864317][3232:3237] CHIP:TOO: Error: IM Error 0x00000501: General error: 0x01 (FAILURE) disabled: true - label: "Step 4b: TH reads the LockOperationError event from DUT" @@ -356,26 +365,26 @@ tests: verification: | ./chip-tool doorlock read-event lock-operation-error 1 1 - Via the TH (chip-tool), verify that the: - -LockOperationType value as 0(Lock). - -OperationSource value as 7(Remote). - -OperationError is set to 1(InvalidCredential). - -Priority is set to Critical. - - [1659777833.226970][3243:3248] CHIP:DMG: } - [1659777833.227194][3243:3248] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0003 - [1659777833.227221][3243:3248] CHIP:TOO: Event number: 8 - [1659777833.227243][3243:3248] CHIP:TOO: Priority: Critical - [1659777833.227264][3243:3248] CHIP:TOO: Timestamp: 3439177 - [1659777833.227367][3243:3248] CHIP:TOO: LockOperationError: { - [1659777833.227407][3243:3248] CHIP:TOO: LockOperationType: 0 - [1659777833.227431][3243:3248] CHIP:TOO: OperationSource: 7 - [1659777833.227453][3243:3248] CHIP:TOO: OperationError: 1 - [1659777833.227476][3243:3248] CHIP:TOO: UserIndex: null - [1659777833.227498][3243:3248] CHIP:TOO: FabricIndex: 1 - [1659777833.227523][3243:3248] CHIP:TOO: SourceNode: 112233 - [1659777833.227553][3243:3248] CHIP:TOO: Credentials: null - [1659777833.227696][3243:3248] CHIP:TOO: } + Via the TH (chip-tool), verify that the: + -LockOperationType value as 0(Lock). + -OperationSource value as 7(Remote). + -OperationError is set to 1(InvalidCredential). + -Priority is set to Critical. + + [1659777833.226970][3243:3248] CHIP:DMG: } + [1659777833.227194][3243:3248] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0003 + [1659777833.227221][3243:3248] CHIP:TOO: Event number: 8 + [1659777833.227243][3243:3248] CHIP:TOO: Priority: Critical + [1659777833.227264][3243:3248] CHIP:TOO: Timestamp: 3439177 + [1659777833.227367][3243:3248] CHIP:TOO: LockOperationError: { + [1659777833.227407][3243:3248] CHIP:TOO: LockOperationType: 0 + [1659777833.227431][3243:3248] CHIP:TOO: OperationSource: 7 + [1659777833.227453][3243:3248] CHIP:TOO: OperationError: 1 + [1659777833.227476][3243:3248] CHIP:TOO: UserIndex: null + [1659777833.227498][3243:3248] CHIP:TOO: FabricIndex: 1 + [1659777833.227523][3243:3248] CHIP:TOO: SourceNode: 112233 + [1659777833.227553][3243:3248] CHIP:TOO: Credentials: null + [1659777833.227696][3243:3248] CHIP:TOO: } disabled: true - label: @@ -384,23 +393,13 @@ tests: verification: | ./chip-tool doorlock unlock-door 1 1 --timedInteractionTimeoutMs 1000 --PINCode 12345678 - Via the TH (chip-tool), verify the FAILURE response for door unlock operation with invalid PINCode. + Via the TH (chip-tool), verify the FAILURE response for door unlock operation with invalid PINCode. - [1659777885.573854][3251:3256] CHIP:DMG: StatusIB = - [1659777885.573896][3251:3256] CHIP:DMG: { - [1659777885.573938][3251:3256] CHIP:DMG: status = 0x01 (FAILURE), - [1659777885.573981][3251:3256] CHIP:DMG: }, - [1659777885.574025][3251:3256] CHIP:DMG: - [1659777885.574064][3251:3256] CHIP:DMG: }, - [1659777885.574105][3251:3256] CHIP:DMG: - [1659777885.574138][3251:3256] CHIP:DMG: }, - [1659777885.574177][3251:3256] CHIP:DMG: - [1659777885.574205][3251:3256] CHIP:DMG: ], - [1659777885.574240][3251:3256] CHIP:DMG: - [1659777885.574268][3251:3256] CHIP:DMG: InteractionModelRevision = 1 - [1659777885.574296][3251:3256] CHIP:DMG: }, - [1659777885.574366][3251:3256] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0001 Status=0x1 - [1659777885.574405][3251:3256] CHIP:TOO: Error: IM Error 0x00000501: General error: 0x01 (FAILURE) + [1659777885.573854][3251:3256] CHIP:DMG: StatusIB = + [1659777885.573896][3251:3256] CHIP:DMG: { + [1659777885.573938][3251:3256] CHIP:DMG: status = 0x01 (FAILURE), + [1659777885.573981][3251:3256] CHIP:DMG: }, + [1659777885.574025][3251:3256] CHIP:DMG: disabled: true - label: "Step 4d: TH reads the LockOperationError event from DUT" @@ -464,7 +463,7 @@ tests: - label: "Step 5b: TH reads the LockUserChange event from DUT" PICS: DRLK.S.E04 verification: | - ./chip-tool doorlock read-event lock-user-change 1 1 + ./chip-tool doorlock read-event lock-user-change 1 1 Via the TH (chip-tool), verify that the: -LockDataType is set to 2 (UserIndex). @@ -474,44 +473,44 @@ tests: [1659778039.468487][3278:3283] CHIP:DMG: } [1659778039.468725][3278:3283] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1659778039.468757][3278:3283] CHIP:TOO: Event number: 3 - [1659778039.468783][3278:3283] CHIP:TOO: Priority: Info - [1659778039.468808][3278:3283] CHIP:TOO: Timestamp: 3309634 - [1659778039.468915][3278:3283] CHIP:TOO: LockUserChange: { - [1659778039.468956][3278:3283] CHIP:TOO: LockDataType: 2 - [1659778039.468984][3278:3283] CHIP:TOO: DataOperationType: 0 - [1659778039.469010][3278:3283] CHIP:TOO: OperationSource: 7 - [1659778039.469036][3278:3283] CHIP:TOO: UserIndex: 1 - [1659778039.469061][3278:3283] CHIP:TOO: FabricIndex: 1 - [1659778039.469088][3278:3283] CHIP:TOO: SourceNode: 112233 - [1659778039.469114][3278:3283] CHIP:TOO: DataIndex: 1 - [1659778039.469137][3278:3283] CHIP:TOO: } + [1659778039.468757][3278:3283] CHIP:TOO: Event number: 3 + [1659778039.468783][3278:3283] CHIP:TOO: Priority: Info + [1659778039.468808][3278:3283] CHIP:TOO: Timestamp: 3309634 + [1659778039.468915][3278:3283] CHIP:TOO: LockUserChange: { + [1659778039.468956][3278:3283] CHIP:TOO: LockDataType: 2 + [1659778039.468984][3278:3283] CHIP:TOO: DataOperationType: 0 + [1659778039.469010][3278:3283] CHIP:TOO: OperationSource: 7 + [1659778039.469036][3278:3283] CHIP:TOO: UserIndex: 1 + [1659778039.469061][3278:3283] CHIP:TOO: FabricIndex: 1 + [1659778039.469088][3278:3283] CHIP:TOO: SourceNode: 112233 + [1659778039.469114][3278:3283] CHIP:TOO: DataIndex: 1 + [1659778039.469137][3278:3283] CHIP:TOO: } [1659778039.469250][3278:3283] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1659778039.469320][3278:3283] CHIP:TOO: Event number: 4 - [1659778039.469344][3278:3283] CHIP:TOO: Priority: Info - [1659778039.469369][3278:3283] CHIP:TOO: Timestamp: 3318674 - [1659778039.469429][3278:3283] CHIP:TOO: LockUserChange: { - [1659778039.469457][3278:3283] CHIP:TOO: LockDataType: 6 - [1659778039.469483][3278:3283] CHIP:TOO: DataOperationType: 0 - [1659778039.469508][3278:3283] CHIP:TOO: OperationSource: 7 - [1659778039.469532][3278:3283] CHIP:TOO: UserIndex: 1 - [1659778039.469557][3278:3283] CHIP:TOO: FabricIndex: 1 - [1659778039.469582][3278:3283] CHIP:TOO: SourceNode: 112233 - [1659778039.469607][3278:3283] CHIP:TOO: DataIndex: 1 - [1659778039.469632][3278:3283] CHIP:TOO: } + [1659778039.469320][3278:3283] CHIP:TOO: Event number: 4 + [1659778039.469344][3278:3283] CHIP:TOO: Priority: Info + [1659778039.469369][3278:3283] CHIP:TOO: Timestamp: 3318674 + [1659778039.469429][3278:3283] CHIP:TOO: LockUserChange: { + [1659778039.469457][3278:3283] CHIP:TOO: LockDataType: 6 + [1659778039.469483][3278:3283] CHIP:TOO: DataOperationType: 0 + [1659778039.469508][3278:3283] CHIP:TOO: OperationSource: 7 + [1659778039.469532][3278:3283] CHIP:TOO: UserIndex: 1 + [1659778039.469557][3278:3283] CHIP:TOO: FabricIndex: 1 + [1659778039.469582][3278:3283] CHIP:TOO: SourceNode: 112233 + [1659778039.469607][3278:3283] CHIP:TOO: DataIndex: 1 + [1659778039.469632][3278:3283] CHIP:TOO: } [1659778039.469739][3278:3283] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Event 0x0000_0004 - [1659778039.469765][3278:3283] CHIP:TOO: Event number: 10 - [1659778039.469790][3278:3283] CHIP:TOO: Priority: Info - [1659778039.469815][3278:3283] CHIP:TOO: Timestamp: 3692303 - [1659778039.469851][3278:3283] CHIP:TOO: LockUserChange: { - [1659778039.469878][3278:3283] CHIP:TOO: LockDataType: 2 - [1659778039.469903][3278:3283] CHIP:TOO: DataOperationType: 0 - [1659778039.469981][3278:3283] CHIP:TOO: OperationSource: 7 - [1659778039.470006][3278:3283] CHIP:TOO: UserIndex: 2 - [1659778039.470031][3278:3283] CHIP:TOO: FabricIndex: 1 - [1659778039.470056][3278:3283] CHIP:TOO: SourceNode: 112233 - [1659778039.470081][3278:3283] CHIP:TOO: DataIndex: 4 - [1659778039.470104][3278:3283] CHIP:TOO: } + [1659778039.469765][3278:3283] CHIP:TOO: Event number: 10 + [1659778039.469790][3278:3283] CHIP:TOO: Priority: Info + [1659778039.469815][3278:3283] CHIP:TOO: Timestamp: 3692303 + [1659778039.469851][3278:3283] CHIP:TOO: LockUserChange: { + [1659778039.469878][3278:3283] CHIP:TOO: LockDataType: 2 + [1659778039.469903][3278:3283] CHIP:TOO: DataOperationType: 0 + [1659778039.469981][3278:3283] CHIP:TOO: OperationSource: 7 + [1659778039.470006][3278:3283] CHIP:TOO: UserIndex: 2 + [1659778039.470031][3278:3283] CHIP:TOO: FabricIndex: 1 + [1659778039.470056][3278:3283] CHIP:TOO: SourceNode: 112233 + [1659778039.470081][3278:3283] CHIP:TOO: DataIndex: 4 + [1659778039.470104][3278:3283] CHIP:TOO: } disabled: true - label: @@ -528,15 +527,6 @@ tests: [1658142169.347900][2900:2905] CHIP:DMG: { [1658142169.347945][2900:2905] CHIP:DMG: status = 0x00 (SUCCESS), [1658142169.347986][2900:2905] CHIP:DMG: }, - [1658142169.348030][2900:2905] CHIP:DMG: - [1658142169.348066][2900:2905] CHIP:DMG: }, - [1658142169.348112][2900:2905] CHIP:DMG: - [1658142169.348146][2900:2905] CHIP:DMG: }, - [1658142169.348195][2900:2905] CHIP:DMG: - [1658142169.348227][2900:2905] CHIP:DMG: ], - [1658142169.348267][2900:2905] CHIP:DMG: - [1658142169.348300][2900:2905] CHIP:DMG: InteractionModelRevision = 1 - [1658142169.348331][2900:2905] CHIP:DMG: }, disabled: true - label: "Step 5d: TH reads the LockUserChange event from DUT" @@ -606,11 +596,9 @@ tests: disabled: true - label: - "Step 5e: TH sends Set Credential Command to DUT with the following - fields: 1.OperationType as 0-Add 2.Credential as 1 1- PIN, Index - 3.CredentialData as 123456 4.UserIndex as 1 5.UserStatus as null - 6.UserType as null" - PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx + "Step 5e: TH sends ClearCredential Command to DUT with the following + fields: a) CredentialType as 1, b) CredentialIndex as 2" + PICS: DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C26.Tx verification: | ./chip-tool doorlock clear-credential '{ "credentialType" : 1 , "credentialIndex" : 2 }' 1 1 --timedInteractionTimeoutMs 1000 @@ -621,8 +609,15 @@ tests: [1658995364.178088][4383:4388] CHIP:DMG: { [1658995364.178137][4383:4388] CHIP:DMG: status = 0x00 (SUCCESS), [1658995364.178185][4383:4388] CHIP:DMG: }, + disabled: true - + - label: + "Step 5f: TH sends Set Credential Command to DUT with the following + fields: 1.OperationType as 0-Add 2.Credential as 1 1- PIN, Index + 3.CredentialData as 123456 4.UserIndex as 1 5.UserStatus as null + 6.UserType as null" + PICS: DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx + verification: | ./chip-tool doorlock set-user 0 1 xxx 6452 1 0 0 1 1 --timedInteractionTimeoutMs 1000 Via the TH (chip-tool), verify the SUCCESS response for setting the users details. @@ -631,17 +626,12 @@ tests: [1659778601.601636][3414:3419] CHIP:DMG: { [1659778601.601671][3414:3419] CHIP:DMG: status = 0x00 (SUCCESS), [1659778601.601713][3414:3419] CHIP:DMG: }, - [1659778601.601746][3414:3419] CHIP:DMG: - [1659778601.601785][3414:3419] CHIP:DMG: }, - [1659778601.601823][3414:3419] CHIP:DMG: + ./chip-tool doorlock set-credential 0 '{ "credentialType" : 1 , "credentialIndex" : 1 }' 123456 1 null null 1 1 --timedInteractionTimeoutMs 1000 Via the TH (chip-tool), verify the SUCCESS response for setting the credential details. - - [1658142472.351596][2966:2971] CHIP:DMG: }, - [1658142472.351698][2966:2971] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0023 [1658142472.351773][2966:2971] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0101 Command 0x0000_0023 [1658142472.351853][2966:2971] CHIP:TOO: SetCredentialResponse: { [1658142472.351910][2966:2971] CHIP:TOO: status: 0 @@ -650,7 +640,7 @@ tests: [1658142472.352012][2966:2971] CHIP:TOO: } disabled: true - - label: "Step 5f: TH reads the LockUserChange event from DUT" + - label: "Step 5g: TH reads the LockUserChange event from DUT" PICS: DRLK.S.E04 verification: | ./chip-tool doorlock read-event lock-user-change 1 1 @@ -690,34 +680,9 @@ tests: disabled: true - label: - "Step 5g: TH sends Clear User Command to DUT for user created in Step - 5a" - PICS: DRLK.S.C1d.Rsp - verification: | - ./chip-tool doorlock clear-user 2 1 1 --timedInteractionTimeoutMs 1000 - - Via the TH (chip-tool), verify the SUCCESS response for clearing the users details. - - [1658142762.492854][2993:2998] CHIP:DMG: - [1658142762.492888][2993:2998] CHIP:DMG: StatusIB = - [1658142762.492920][2993:2998] CHIP:DMG: { - [1658142762.492957][2993:2998] CHIP:DMG: status = 0x00 (SUCCESS), - [1658142762.492994][2993:2998] CHIP:DMG: }, - [1658142762.493026][2993:2998] CHIP:DMG: - [1658142762.493060][2993:2998] CHIP:DMG: }, - [1658142762.493097][2993:2998] CHIP:DMG: - [1658142762.493125][2993:2998] CHIP:DMG: }, - [1658142762.493158][2993:2998] CHIP:DMG: - [1658142762.493182][2993:2998] CHIP:DMG: ], - [1658142762.493211][2993:2998] CHIP:DMG: - [1658142762.493235][2993:2998] CHIP:DMG: InteractionModelRevision = 1 - [1658142762.493258][2993:2998] CHIP:DMG: }, - disabled: true - - - label: - "Step 6a: TH sends Clear Credential Command to DUT for Credential - created in Preconditions" - PICS: DRLK.S.C26.Rsp + "Step 6a: TH sends ClearCredential Command to DUT with the following + fields: a) CredentialType as 1, b) CredentialIndex as 1" + PICS: DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C26.Rsp verification: | ./chip-tool doorlock clear-credential '{ "credentialType" : 1 , "credentialIndex" : 1 }' 1 1 --timedInteractionTimeoutMs 1000 @@ -727,40 +692,16 @@ tests: [1658142697.890058][2985:2990] CHIP:DMG: { [1658142697.890103][2985:2990] CHIP:DMG: status = 0x00 (SUCCESS), [1658142697.890147][2985:2990] CHIP:DMG: }, - [1658142697.890190][2985:2990] CHIP:DMG: - [1658142697.890229][2985:2990] CHIP:DMG: }, - [1658142697.890275][2985:2990] CHIP:DMG: - [1658142697.890312][2985:2990] CHIP:DMG: }, - [1658142697.890353][2985:2990] CHIP:DMG: - [1658142697.890385][2985:2990] CHIP:DMG: ], - [1658142697.890423][2985:2990] CHIP:DMG: - [1658142697.890455][2985:2990] CHIP:DMG: InteractionModelRevision = 1 - [1658142697.890486][2985:2990] CHIP:DMG: }, - [1658142697.890563][2985:2990] CHIP:DMG: Received Command Response Status for Endpoint=1 Cluster=0x0000_0101 Command=0x0000_0026 Status=0x0 - [1658142697.890616][2985:2990] CHIP:DMG: ICR moving to [AwaitingDe] disabled: true - label: "Step 6b: TH sends Clear User Command to DUT for user created in Preconditions" - PICS: DRLK.S.C1d.Rsp + PICS: DRLK.S.F08 && DRLK.S.C1d.Rsp verification: | - ./chip-tool doorlock clear-user 1 1 1 --timedInteractionTimeoutMs 1000 + ./chip-tool doorlock clear-user 0xFFFE 1 1 --timedInteractionTimeoutMs 1000 Via the TH (chip-tool), verify the SUCCESS response for clearing the users details. - [1658142762.492854][2993:2998] CHIP:DMG: - [1658142762.492888][2993:2998] CHIP:DMG: StatusIB = - [1658142762.492920][2993:2998] CHIP:DMG: { - [1658142762.492957][2993:2998] CHIP:DMG: status = 0x00 (SUCCESS), - [1658142762.492994][2993:2998] CHIP:DMG: }, - [1658142762.493026][2993:2998] CHIP:DMG: - [1658142762.493060][2993:2998] CHIP:DMG: }, - [1658142762.493097][2993:2998] CHIP:DMG: - [1658142762.493125][2993:2998] CHIP:DMG: }, - [1658142762.493158][2993:2998] CHIP:DMG: - [1658142762.493182][2993:2998] CHIP:DMG: ], - [1658142762.493211][2993:2998] CHIP:DMG: - [1658142762.493235][2993:2998] CHIP:DMG: InteractionModelRevision = 1 - [1658142762.493258][2993:2998] CHIP:DMG: }, + [1657631472.017012][2661:2666] CHIP:DMG: status = 0x00 (SUCCESS), disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_11.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_11.yaml index de3a170c4f29fb..d159e70858ceb5 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_11.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_11.yaml @@ -26,7 +26,7 @@ config: nodeId: 0x12344321 cluster: "Door Lock" endpoint: 1 - PINCredentialData: + CredentialData: type: octet_string defaultValue: "123456" RFIDCredentialData: @@ -45,55 +45,6 @@ tests: - name: "nodeId" value: nodeId - - label: "Precondition: Create new user with default parameters" - command: "SetUser" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "OperationType" - value: 0 - - name: "UserIndex" - value: 1 - - name: "UserName" - value: "xxx" - - name: "UserUniqueID" - value: 6452 - - name: "UserStatus" - value: 1 - - name: "UserType" - value: 0 - - name: "CredentialRule" - value: 0 - - - label: "Precondition: Read the user back and verify its fields" - command: "GetUser" - arguments: - values: - - name: "UserIndex" - value: 1 - response: - values: - - name: "UserIndex" - value: 1 - - name: "UserName" - value: "xxx" - - name: "UserUniqueID" - value: 6452 - - name: "UserStatus" - value: 1 - - name: "UserType" - value: 0 - - name: "CredentialRule" - value: 0 - - name: "Credentials" - value: [] - - name: "CreatorFabricIndex" - value: 1 - - name: "LastModifiedFabricIndex" - value: 1 - - name: "NextUserIndex" - value: null - - label: "Step 1a: TH reads NumberOfTotalUsersSupported and saves for future use." @@ -141,7 +92,28 @@ tests: minValue: 0 maxValue: 255 - - label: "Step 2a: TH sends Set Credential Command to DUT with type PIN" + - label: "Step 2a: TH sends SetUser Command to DUT" + PICS: DRLK.S.F08 && DRLK.S.C1a.Rsp + command: "SetUser" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "OperationType" + value: 0 + - name: "UserIndex" + value: 1 + - name: "UserName" + value: "xxx" + - name: "UserUniqueID" + value: 6452 + - name: "UserStatus" + value: 1 + - name: "UserType" + value: 0 + - name: "CredentialRule" + value: 0 + + - label: "Step 2b: TH sends Set Credential Command to DUT with type PIN" PICS: DRLK.S.F00 && DRLK.S.F08 && DRLK.S.C22.Rsp && DRLK.S.C23.Tx command: "SetCredential" timedInteractionTimeoutMs: 10000 @@ -152,7 +124,7 @@ tests: - name: "Credential" value: { CredentialType: 1, CredentialIndex: 1 } - name: "CredentialData" - value: PINCredentialData + value: CredentialData - name: "UserIndex" value: 1 - name: "UserStatus" diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_6.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_6.yaml index ba265fa99075de..7d3466aec33c91 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_6.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_6.yaml @@ -107,40 +107,38 @@ tests: error: INVALID_COMMAND - label: - "Step 5: TH sends Get Holiday Schedule Command to DUT with Invalid - HolidayIndex as 15" + "Step 5: TH sends GetHolidaySchedule Command to DUT with Invalid + HolidayIndex > number_holiday_sch_supported ." PICS: DRLK.S.F0b && DRLK.S.C12.Rsp && DRLK.S.C12.Tx command: "GetHolidaySchedule" arguments: values: - name: "HolidayIndex" - value: 15 + value: NumberOfHolidaySchedulesSupportedValue + 1 response: values: - - name: "HolidayIndex" - value: 15 - name: "Status" - value: 133 + value: 0x85 - label: - "Step 6: TH sends Get Holiday Schedule Command to DUT with the - HolidayIndex as 10 (value is in the the range of step 1 but Holiday - Schedule entry not available)" + "Step 6: TH sends GetHolidaySchedule Command to DUT with the + HolidayIndex as any value that is different from 1 and value <= + number_holiday_sch_supported" PICS: DRLK.S.F0b && DRLK.S.C12.Rsp && DRLK.S.C12.Tx command: "GetHolidaySchedule" arguments: values: - name: "HolidayIndex" - value: 10 + value: NumberOfHolidaySchedulesSupportedValue response: values: - name: "HolidayIndex" - value: 10 + value: NumberOfHolidaySchedulesSupportedValue - name: "Status" - value: 139 + value: 0x8B - label: - "Step 7: TH send Clear Holiday Schedule Command to DUT with + "Step 7a: TH send Clear Holiday Schedule Command to DUT with HolidayIndex as 1" PICS: DRLK.S.F0b && DRLK.S.C13.Rsp command: "ClearHolidaySchedule" @@ -149,6 +147,18 @@ tests: - name: "HolidayIndex" value: 1 + - label: + "Step 7b: TH send Clear Holiday Schedule Command to DUT with + HolidayIndex as 0" + PICS: DRLK.S.F0b && DRLK.S.C13.Rsp + command: "ClearHolidaySchedule" + arguments: + values: + - name: "HolidayIndex" + value: 0 + response: + error: INVALID_COMMAND + - label: "Step 8: TH sends Get Holiday Schedule Command to DUT with HolidayIndex as 1" diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml index 3cd01cdde0ecf8..892c4ae86ac1c3 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_7.yaml @@ -35,55 +35,6 @@ tests: - name: "nodeId" value: nodeId - - label: "Precondition: Create new user" - command: "SetUser" - timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "OperationType" - value: 0 - - name: "UserIndex" - value: 1 - - name: "UserName" - value: "xxx" - - name: "UserUniqueID" - value: 6452 - - name: "UserStatus" - value: 1 - - name: "UserType" - value: 0 - - name: "CredentialRule" - value: 0 - - - label: "Precondition: Read the user back and verify its fields" - command: "GetUser" - arguments: - values: - - name: "UserIndex" - value: 1 - response: - values: - - name: "UserIndex" - value: 1 - - name: "UserName" - value: "xxx" - - name: "UserUniqueID" - value: 6452 - - name: "UserStatus" - value: 1 - - name: "UserType" - value: 0 - - name: "CredentialRule" - value: 0 - - name: "Credentials" - value: [] - - name: "CreatorFabricIndex" - value: 1 - - name: "LastModifiedFabricIndex" - value: 1 - - name: "NextUserIndex" - value: null - - label: "Step 1: TH reads NumberOfYearDay SchedulesSupportedPerUser attribute and saves for future use" @@ -109,9 +60,34 @@ tests: maxValue: 65534 - label: - "Step 3: TH sends Set Year Day Schedule Command to DUT with the - following values: a)YearDayIndex as 1 b)UserIndex as 1 - c)LocalStartTime as 960 Seconds d)LocalEndTime as 1980 Seconds" + "Step 3a: TH sends SetUser Command to DUT with the following values: + a)OperationType as 0, b)UserIndex as 1, c)UserName as xxx, + c)UserUniqueID as 6452, d)UserStatus as 1, e)UserType as 0, + f)CredentialRule as 0" + PICS: DRLK.S.F08 && DRLK.S.C1a.Rsp + command: "SetUser" + timedInteractionTimeoutMs: 10000 + arguments: + values: + - name: "OperationType" + value: 0 + - name: "UserIndex" + value: 1 + - name: "UserName" + value: "xxx" + - name: "UserUniqueID" + value: 6452 + - name: "UserStatus" + value: 1 + - name: "UserType" + value: 0 + - name: "CredentialRule" + value: 0 + + - label: + "Step 3b: TH sends SetYearDaySchedule Command to DUT with the + following values: a)YearDayIndex as 1, b)UserIndex as 1, + c)LocalStartTime as 960 Seconds, d)LocalEndTime as 1980 Seconds" PICS: DRLK.S.F0a && DRLK.S.C0e.Rsp command: "SetYearDaySchedule" arguments: @@ -196,9 +172,8 @@ tests: constraints: hasValue: false - - label: - "Step 7a: Create a new user with UserIndex as 5 then TH sends Get Year - Day Schedule Command to DUT with" + - label: "Step 7a: Create a new user with UserIndex as 5" + PICS: DRLK.S.F08 && DRLK.S.C1a.Rsp command: "SetUser" timedInteractionTimeoutMs: 10000 arguments: @@ -219,8 +194,9 @@ tests: value: 0 - label: - "Step 7b: YearDayIndex as 10 (value is in the the range of step 1 but - YearDay Schedule entry not available) : UserIndex as 5" + "Step 7b: TH sends Get Year Day Schedule Command to DUT with + YearDayIndex as 10 (value is in the the range of step 1 but YearDay + Schedule entry not available) : UserIndex as 5" PICS: DRLK.S.F0a && DRLK.S.C0f.Rsp && DRLK.S.C0f.Tx command: "GetYearDaySchedule" arguments: @@ -367,28 +343,11 @@ tests: response: error: INVALID_COMMAND - - label: "Clear a year day schedule for the first user" - PICS: DRLK.S.F0a && DRLK.S.C10.Rsp - command: "ClearYearDaySchedule" - arguments: - values: - - name: "YearDayIndex" - value: 1 - - name: "UserIndex" - value: 1 - - - label: "Cleanup the created user with UserIndex 1" - command: "ClearUser" + - label: "Step 14:TH sends ClearUser Command to DUT with the UserIndex as 1" + PICS: DRLK.S.F08 && DRLK.S.C1d.Rsp timedInteractionTimeoutMs: 10000 - arguments: - values: - - name: "UserIndex" - value: 1 - - - label: "Cleanup the created user with UserIndex 5" command: "ClearUser" - timedInteractionTimeoutMs: 10000 arguments: values: - name: "UserIndex" - value: 5 + value: 0xFFFE diff --git a/src/app/tests/suites/certification/Test_TC_DRLK_2_8.yaml b/src/app/tests/suites/certification/Test_TC_DRLK_2_8.yaml index 0204f30727a028..baece9a4d0aa95 100644 --- a/src/app/tests/suites/certification/Test_TC_DRLK_2_8.yaml +++ b/src/app/tests/suites/certification/Test_TC_DRLK_2_8.yaml @@ -206,6 +206,16 @@ tests: - name: "NextUserIndex" value: null + - label: "Step 6c: TH sends Get User Command to DUT with UserIndex as 0" + PICS: DRLK.S.C1a.Rsp && DRLK.S.C1b.Rsp && DRLK.S.C1c.Tx + command: "GetUser" + arguments: + values: + - name: "UserIndex" + value: 0 + response: + error: INVALID_COMMAND + - label: "Step 7: TH sends Set User Command to DUT with the following values: OperationType as 2 UserIndex as 2 UserName as NULL UserUniqueID as diff --git a/src/app/tests/suites/certification/Test_TC_EEVSEM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_EEVSEM_1_2.yaml index 642dc5f09912dd..adfd864b9b4fd7 100644 --- a/src/app/tests/suites/certification/Test_TC_EEVSEM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_EEVSEM_1_2.yaml @@ -24,62 +24,68 @@ config: endpoint: 1 tests: - - label: "Step 1: TH reads from the DUT the SupportedModes attribute" + - label: + "Step 1: Commission DUT to TH (can be skipped if done in a preceding + test)." + verification: | + + disabled: true + + - label: "Step 2: TH reads from the DUT the SupportedModes attribute" PICS: EEVSEM.S.A0000 verification: | ./chip-tool energyevsemode read supported-modes 1 1 - - Verify that the DUT response contains a list of ModeOptionsStruct entries - - Verify that the list has at least 2 and at most 255 entries - - Verify that each ModeOptionsStruct entry has a unique Mode field value - - Verify that each ModeOptionsStruct entry has a unique Label field value - - Verify that each ModeOptionsStruct entry’s ModeTags field has: - at least one entry the values of the Value fields that are not larger than 16 bits - - for each Value field: Is the mode tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster-derived tag value (Manual, Time of Use, (T_SOLAR_CHARGING)) or in the MfgTags (0x8000 to 0xBFFF) range - - for at least one Value field: Is the mode tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a derived cluster value (Bake(0x4000), Convection(0x4001), Grill(0x4002), Roast(0x4003), Clean(0x4004), Convection Bake(0x4005), Convection Roast(0x4006), Warming(0x4007), Proofing(0x4008)) - - if the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 - - Verify that at least one ModeOptionsStruct entry includes the Manual mode tag - - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: + - Verify that the DUT response contains a list of ModeOptionsStruct entries + - Verify that the list has at least 2 and at most 255 entries + - Verify that each ModeOptionsStruct entry has a unique Mode field value + - Verify that each ModeOptionsStruct entry has a unique Label field value + - Verify that each ModeOptionsStruct entry’s ModeTags field has: + at least one entry the values of the Value fields that are not larger than 16 bits + - for each Value field: Is the mode tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster-derived tag value (Manual, Time of Use, (T_SOLAR_CHARGING)) or in the MfgTags (0x8000 to 0xBFFF) range + - for at least one Value field: Is the mode tag value a defined common tag value (Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a derived cluster value (Bake(0x4000), Convection(0x4001), Grill(0x4002), Roast(0x4003), Clean(0x4004), Convection Bake(0x4005), Convection Roast(0x4006), Warming(0x4007), Proofing(0x4008)) + - Verify that at least one ModeOptionsStruct entry includes the Manual mode tag + - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: - [1705995452.973731][7546:7548] CHIP:DMG: } - [1705995452.973843][7546:7548] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_009D Attribute 0x0000_0000 DataVersion: 1324786556 - [1705995452.973865][7546:7548] CHIP:TOO: SupportedModes: 4 entries - [1705995452.973883][7546:7548] CHIP:TOO: [1]: { - [1705995452.973886][7546:7548] CHIP:TOO: Label: Manual - [1705995452.973892][7546:7548] CHIP:TOO: Mode: 0 - [1705995452.973898][7546:7548] CHIP:TOO: ModeTags: 1 entries - [1705995452.973903][7546:7548] CHIP:TOO: [1]: { - [1705995452.973906][7546:7548] CHIP:TOO: Value: 16384 - [1705995452.973909][7546:7548] CHIP:TOO: } - [1705995452.973912][7546:7548] CHIP:TOO: } - [1705995452.973918][7546:7548] CHIP:TOO: [2]: { - [1705995452.973921][7546:7548] CHIP:TOO: Label: Auto-scheduled - [1705995452.973923][7546:7548] CHIP:TOO: Mode: 1 - [1705995452.973926][7546:7548] CHIP:TOO: ModeTags: 1 entries - [1705995452.973930][7546:7548] CHIP:TOO: [1]: { - [1705995452.973933][7546:7548] CHIP:TOO: Value: 16385 - [1705995452.973935][7546:7548] CHIP:TOO: } - [1705995452.973938][7546:7548] CHIP:TOO: } - [1705995452.973943][7546:7548] CHIP:TOO: [3]: { - [1705995452.973946][7546:7548] CHIP:TOO: Label: Solar - [1705995452.973948][7546:7548] CHIP:TOO: Mode: 2 - [1705995452.973951][7546:7548] CHIP:TOO: ModeTags: 1 entries - [1705995452.973955][7546:7548] CHIP:TOO: [1]: { - [1705995452.973957][7546:7548] CHIP:TOO: Value: 16386 - [1705995452.973960][7546:7548] CHIP:TOO: } - [1705995452.973962][7546:7548] CHIP:TOO: } - [1705995452.973968][7546:7548] CHIP:TOO: [4]: { - [1705995452.973971][7546:7548] CHIP:TOO: Label: Auto-scheduled with Solar charging - [1705995452.973973][7546:7548] CHIP:TOO: Mode: 3 - [1705995452.973977][7546:7548] CHIP:TOO: ModeTags: 2 entries - [1705995452.973981][7546:7548] CHIP:TOO: [1]: { - [1705995452.973983][7546:7548] CHIP:TOO: Value: 16385 - [1705995452.973986][7546:7548] CHIP:TOO: } - [1705995452.973989][7546:7548] CHIP:TOO: [2]: { - [1705995452.973992][7546:7548] CHIP:TOO: Value: 16386 - [1705995452.973994][7546:7548] CHIP:TOO: } - [1705995452.973996][7546:7548] CHIP:TOO: } + [1705995452.973731][7546:7548] CHIP:DMG: } + [1705995452.973843][7546:7548] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_009D Attribute 0x0000_0000 DataVersion: 1324786556 + [1705995452.973865][7546:7548] CHIP:TOO: SupportedModes: 4 entries + [1705995452.973883][7546:7548] CHIP:TOO: [1]: { + [1705995452.973886][7546:7548] CHIP:TOO: Label: Manual + [1705995452.973892][7546:7548] CHIP:TOO: Mode: 0 + [1705995452.973898][7546:7548] CHIP:TOO: ModeTags: 1 entries + [1705995452.973903][7546:7548] CHIP:TOO: [1]: { + [1705995452.973906][7546:7548] CHIP:TOO: Value: 16384 + [1705995452.973909][7546:7548] CHIP:TOO: } + [1705995452.973912][7546:7548] CHIP:TOO: } + [1705995452.973918][7546:7548] CHIP:TOO: [2]: { + [1705995452.973921][7546:7548] CHIP:TOO: Label: Auto-scheduled + [1705995452.973923][7546:7548] CHIP:TOO: Mode: 1 + [1705995452.973926][7546:7548] CHIP:TOO: ModeTags: 1 entries + [1705995452.973930][7546:7548] CHIP:TOO: [1]: { + [1705995452.973933][7546:7548] CHIP:TOO: Value: 16385 + [1705995452.973935][7546:7548] CHIP:TOO: } + [1705995452.973938][7546:7548] CHIP:TOO: } + [1705995452.973943][7546:7548] CHIP:TOO: [3]: { + [1705995452.973946][7546:7548] CHIP:TOO: Label: Solar + [1705995452.973948][7546:7548] CHIP:TOO: Mode: 2 + [1705995452.973951][7546:7548] CHIP:TOO: ModeTags: 1 entries + [1705995452.973955][7546:7548] CHIP:TOO: [1]: { + [1705995452.973957][7546:7548] CHIP:TOO: Value: 16386 + [1705995452.973960][7546:7548] CHIP:TOO: } + [1705995452.973962][7546:7548] CHIP:TOO: } + [1705995452.973968][7546:7548] CHIP:TOO: [4]: { + [1705995452.973971][7546:7548] CHIP:TOO: Label: Auto-scheduled with Solar charging + [1705995452.973973][7546:7548] CHIP:TOO: Mode: 3 + [1705995452.973977][7546:7548] CHIP:TOO: ModeTags: 2 entries + [1705995452.973981][7546:7548] CHIP:TOO: [1]: { + [1705995452.973983][7546:7548] CHIP:TOO: Value: 16385 + [1705995452.973986][7546:7548] CHIP:TOO: } + [1705995452.973989][7546:7548] CHIP:TOO: [2]: { + [1705995452.973992][7546:7548] CHIP:TOO: Value: 16386 + [1705995452.973994][7546:7548] CHIP:TOO: } + [1705995452.973996][7546:7548] CHIP:TOO: } disabled: true - label: "Step 2: TH reads from the DUT the CurrentMode attribute" diff --git a/src/app/tests/suites/certification/Test_TC_EEVSEM_2_1.yaml b/src/app/tests/suites/certification/Test_TC_EEVSEM_2_1.yaml index b5f483f62fe2d9..2a238e703637ce 100644 --- a/src/app/tests/suites/certification/Test_TC_EEVSEM_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_EEVSEM_2_1.yaml @@ -147,7 +147,7 @@ tests: - label: "Step 9: Manually put the device in a state from which it will SUCCESSFULLY transition to PIXIT.EEVSEM.MODE_CHANGE_OK" - PICS: PICS_SKIP_SAMPLE_APP + PICS: PICS_SKIP_SAMPLE_APP && EEVSEM.S.M.CAN_MANUALLY_CONTROLLED verification: | Manual operation required cluster: "LogCommands" diff --git a/src/app/tests/suites/certification/Test_TC_ICDM_5_1.yaml b/src/app/tests/suites/certification/Test_TC_ICDM_5_1.yaml deleted file mode 100644 index 0e4e0c6b1e793a..00000000000000 --- a/src/app/tests/suites/certification/Test_TC_ICDM_5_1.yaml +++ /dev/null @@ -1,145 +0,0 @@ -# Copyright (c) 2024 Project CHIP Authors -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default - -name: 217.2.7. [TC-ICDM-5.1] Functionality with DUT as Client - -PICS: - - ICDM.C - -config: - nodeId: 0x12344321 - cluster: "Basic Information" - endpoint: 0 - -tests: - - label: - "Step 1: DUT issues an C_REGISTER_CLIENT command to the Test Harness." - PICS: ICDM.S.C00.Tx - verification: | - From DUT: - ./chip-tool icdmanagement register-client 1 1 hex:1234567890abcdef1234567890abcdef 1 0 --VerificationKey hex:abcdef1234567890abcdef1234567890 - - From TH: lit-icd-app - [1704407463921] [48858:527745] [DMG] InvokeRequestMessage = - [1704407463921] [48858:527745] [DMG] { - [1704407463921] [48858:527745] [DMG] suppressResponse = false, - [1704407463921] [48858:527745] [DMG] timedRequest = false, - [1704407463921] [48858:527745] [DMG] InvokeRequests = - [1704407463921] [48858:527745] [DMG] [ - [1704407463921] [48858:527745] [DMG] CommandDataIB = - [1704407463921] [48858:527745] [DMG] { - [1704407463921] [48858:527745] [DMG] CommandPathIB = - [1704407463921] [48858:527745] [DMG] { - [1704407463921] [48858:527745] [DMG] EndpointId = 0x0, - [1704407463921] [48858:527745] [DMG] ClusterId = 0x46, - [1704407463921] [48858:527745] [DMG] CommandId = 0x0, - [1704407463921] [48858:527745] [DMG] }, - [1704407463921] [48858:527745] [DMG] - [1704407463921] [48858:527745] [DMG] CommandFields = - [1704407463921] [48858:527745] [DMG] { - [1704407463921] [48858:527745] [DMG] 0x0 = 1, - [1704407463921] [48858:527745] [DMG] 0x1 = 1, - [1704407463921] [48858:527745] [DMG] 0x2 = [ - [1704407463921] [48858:527745] [DMG] 0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef, 0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef, - [1704407463921] [48858:527745] [DMG] ] (16 bytes) - [1704407463921] [48858:527745] [DMG] 0x3 = [ - [1704407463921] [48858:527745] [DMG] 0xab, 0xcd, 0xef, 0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef, 0x12, 0x34, 0x56, 0x78, 0x90, - [1704407463921] [48858:527745] [DMG] ] (16 bytes) - [1704407463921] [48858:527745] [DMG] }, - [1704407463921] [48858:527745] [DMG] }, - [1704407463921] [48858:527745] [DMG] - [1704407463921] [48858:527745] [DMG] ], - [1704407463921] [48858:527745] [DMG] - [1704407463921] [48858:527745] [DMG] InteractionModelRevision = 11 - [1704407463921] [48858:527745] [DMG] }, - disabled: true - - - label: - "Step 2: DUT issues an C_UNREGISTER_CLIENT command to the Test - Harness." - PICS: ICDM.S.C02.Tx - verification: | - From DUT: - ./chip-tool icdmanagement unregister-client 1 1 0 --VerificationKey hex:abcdef1234567890abcdef1234567890 - - From TH: lit-icd-app - [1704407560687] [49015:529245] [DMG] InvokeRequestMessage = - [1704407560687] [49015:529245] [DMG] { - [1704407560687] [49015:529245] [DMG] suppressResponse = false, - [1704407560687] [49015:529245] [DMG] timedRequest = false, - [1704407560687] [49015:529245] [DMG] InvokeRequests = - [1704407560687] [49015:529245] [DMG] [ - [1704407560687] [49015:529245] [DMG] CommandDataIB = - [1704407560687] [49015:529245] [DMG] { - [1704407560687] [49015:529245] [DMG] CommandPathIB = - [1704407560687] [49015:529245] [DMG] { - [1704407560687] [49015:529245] [DMG] EndpointId = 0x0, - [1704407560687] [49015:529245] [DMG] ClusterId = 0x46, - [1704407560687] [49015:529245] [DMG] CommandId = 0x2, - [1704407560687] [49015:529245] [DMG] }, - [1704407560687] [49015:529245] [DMG] - [1704407560687] [49015:529245] [DMG] CommandFields = - [1704407560687] [49015:529245] [DMG] { - [1704407560687] [49015:529245] [DMG] 0x0 = 1, - [1704407560687] [49015:529245] [DMG] 0x1 = [ - [1704407560687] [49015:529245] [DMG] 0xab, 0xcd, 0xef, 0x12, 0x34, 0x56, 0x78, 0x90, 0xab, 0xcd, 0xef, 0x12, 0x34, 0x56, 0x78, 0x90, - [1704407560687] [49015:529245] [DMG] ] (16 bytes) - [1704407560687] [49015:529245] [DMG] }, - [1704407560687] [49015:529245] [DMG] }, - [1704407560687] [49015:529245] [DMG] - [1704407560687] [49015:529245] [DMG] ], - [1704407560687] [49015:529245] [DMG] - [1704407560687] [49015:529245] [DMG] InteractionModelRevision = 11 - [1704407560687] [49015:529245] [DMG] }, - disabled: true - - - label: - "Step 3: DUT issues an C_STAY_ACTIVE_REQUEST command to the Test - Harness." - PICS: ICDM.S.C03.Tx - verification: | - From DUT: - ./chip-tool icdmanagement stay-active-request 1 0 - - From TH: lit-icd-app - [1704406259650] [46741:509053] [DMG] InvokeRequestMessage = - [1704406259650] [46741:509053] [DMG] { - [1704406259650] [46741:509053] [DMG] suppressResponse = false, - [1704406259650] [46741:509053] [DMG] timedRequest = false, - [1704406259650] [46741:509053] [DMG] InvokeRequests = - [1704406259650] [46741:509053] [DMG] [ - [1704406259650] [46741:509053] [DMG] CommandDataIB = - [1704406259650] [46741:509053] [DMG] { - [1704406259650] [46741:509053] [DMG] CommandPathIB = - [1704406259650] [46741:509053] [DMG] { - [1704406259650] [46741:509053] [DMG] EndpointId = 0x0, - [1704406259650] [46741:509053] [DMG] ClusterId = 0x46, - [1704406259650] [46741:509053] [DMG] CommandId = 0x3, - [1704406259650] [46741:509053] [DMG] }, - [1704406259650] [46741:509053] [DMG] - [1704406259650] [46741:509053] [DMG] CommandFields = - [1704406259650] [46741:509053] [DMG] { - [1704406259650] [46741:509053] [DMG] }, - [1704406259650] [46741:509053] [DMG] }, - [1704406259650] [46741:509053] [DMG] - [1704406259650] [46741:509053] [DMG] ], - [1704406259650] [46741:509053] [DMG] - [1704406259650] [46741:509053] [DMG] InteractionModelRevision = 11 - [1704406259650] [46741:509053] [DMG] }, - [1704406259650] [46741:509053] [DMG] AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0046 e=0 p=m - [1704406259650] [46741:509053] [DMG] AccessControl: allowed - [1704406259650] [46741:509053] [DMG] Received command for Endpoint=0 Cluster=0x0000_0046 Command=0x0000_0003 - [1704406259650] [46741:509053] [DMG] Endpoint=0 Cluster=0x0000_0046 Command=0x0000_0003 status 0x81 (UNSUPPORTED_COMMAND) (no additional context) - disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_3_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_3_2.yaml index 09982f6851b245..d9b37498847ce7 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_3_2.yaml @@ -24,6 +24,13 @@ config: endpoint: 0 tests: + - label: "Note" + verification: | + 1. The Cluster and Commands should be based on the cluster implementation on the DUT. + 2. The cluster used in the below command is an example, User can use any supported chip cluster/attribute/command. + 3. Test Steps 2, 13, 20, 21, 22 and 23 cannot be executed with V1.0 SDK + disabled: true + - label: "Step 1: TH sends the WriteRequestMessage to the DUT to write one attribute on a given cluster and endpoint. On receipt of this message, @@ -93,7 +100,6 @@ tests: ./chip-tool basicinformation write local-config-disabled 1 1 0 - On TH(chip-tool), verify that DUT sends a WriteResponseMessage with the status set to Success for the data sent in the above command and verify by sending a ReadRequestMessage to read the value that was modified. [1686227392.013866][93552:93554] CHIP:DMG: WriteClient moving to [ResponseRe] [1686227392.013876][93552:93554] CHIP:DMG: WriteResponseMessage = @@ -144,7 +150,6 @@ tests: verification: | The cluster used in the below command is an example, User can use any supported chip cluster/attribute/command. - ./chip-tool basicinformation write node-label new 1 0 On TH(chip-tool), verify that DUT sends a WriteResponseMessage with the status set to Success for the data sent in the above command and veriffy by sending a ReadRequestMessage to read the value that was modified. @@ -195,7 +200,6 @@ tests: verification: | The cluster used in the below command is an example, User can use any supported chip cluster/attribute/command. - ./chip-tool any write-by-id 0x0008 0x0010 1 1 1 On TH(chip-tool), verify that DUT sends a WriteResponseMessage with the status set to Success for the data sent in the above command and verify by sending a ReadRequestMessage to read the value that was modified @@ -252,7 +256,7 @@ tests: verification: | DUT implementation required to verify write an attribute of data type signed integer. - If the Vendor DUT doesn't implement/supported this attribute, Please mark the test step as "\Not Applicable\" + If the Vendor DUT doesn't implement/supported this attribute, Please mark the test step as "Not Applicable" disabled: true - label: @@ -262,7 +266,7 @@ tests: verification: | DUT implementation required to verify write an attribute of data type float - If the Vendor DUT doesn't implement/supported this attribute, Please mark the test step as "\Not Applicable\" + If the Vendor DUT doesn't implement/supported this attribute, Please mark the test step as "Not Applicable" disabled: true - label: @@ -272,7 +276,7 @@ tests: verification: | DUT implementation required to verify write an attribute of data type Octet String - If the Vendor DUT doesn't implement/supported this attribute, Please mark the test step as "\Not Applicable\" + If the Vendor DUT doesn't implement/supported this attribute, Please mark the test step as "Not Applicable" disabled: true - label: @@ -282,7 +286,7 @@ tests: verification: | DUT implementation required to verify write an attribute ofdata type Struct - If the Vendor DUT doesn't implement/supported this attribute, Please mark the test step as "\Not Applicable\" + If the Vendor DUT doesn't implement/supported this attribute, Please mark the test step as "Not Applicable" disabled: true - label: @@ -292,7 +296,7 @@ tests: verification: | DUT implementation required to verify write an attribute of data type List - If the Vendor DUT doesn't implement/supported this attribute, Please mark the test step as "\Not Applicable\" + If the Vendor DUT doesn't implement/supported this attribute, Please mark the test step as "Not Applicable" disabled: true - label: @@ -301,6 +305,7 @@ tests: PICS: MCORE.IDM.S.Attribute_W.DataType_Enum verification: | The cluster used in the below command is an example, User can use any supported chip cluster/attribute/command. + ./chip-tool any write-by-id 0x0204 0 1 1 1 On TH(chip-tool), verify that DUT sends a WriteResponseMessage with the status set to Success for the data sent in the above command and verify by sending a ReadRequestMessage to read the value that was modified. @@ -339,9 +344,7 @@ tests: ./chip-tool any read-by-id 0x0204 0 1 1 On TH(chip-tool), verify the attribute value that was modified in above step - [1686227658.643633][93610:93612] CHIP:DMG: SuppressResponse = true, - [1686227658.643643][93610:93612] CHIP:DMG: InteractionModelRevision = 1 - [1686227658.643651][93610:93612] CHIP:DMG: } + [1686227658.643729][93610:93612] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0204 Attribute 0x0000_0000 DataVersion: 1939013916 [1686227658.643765][93610:93612] CHIP:TOO: TemperatureDisplayMode: 1 [1686227658.643826][93610:93612] CHIP:EM: <<< [E:7325i S:64158 M:55416058 (Ack:52160854)] (S) Msg TX to 1:0000000000000001 [58B9] --- Type 0000:10 (SecureChannel:StandaloneAck) @@ -392,14 +395,10 @@ tests: [1686227690.827552][93615:93617] CHIP:EM: Flushed pending ack for MessageCounter:75613172 on exchange 7166i - ./chip-tool colorcontrol read-by-id 0x000f 1 1 On TH(chip-tool), verify the attribute value that was modified in above step - [1686227710.429709][93622:93624] CHIP:DMG: SuppressResponse = true, - [1686227710.429715][93622:93624] CHIP:DMG: InteractionModelRevision = 1 - [1686227710.429720][93622:93624] CHIP:DMG: } [1686227710.429791][93622:93624] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0300 Attribute 0x0000_000F DataVersion: 861636757 [1686227710.429832][93622:93624] CHIP:TOO: Options: 1 [1686227710.429882][93622:93624] CHIP:EM: <<< [E:4989i S:43440 M:30144210 (Ack:113240090)] (S) Msg TX to 1:0000000000000001 [58B9] --- Type 0000:10 (SecureChannel:StandaloneAck) @@ -468,7 +467,6 @@ tests: On TH(chip-tool), Verify that the DUT sends the status code UNSUPPORTED_CLUSTER for the data sent in the above command - [1686229393.093998][94065:94067] CHIP:EM: Rxd Ack; Removing MessageCounter:56487501 from Retrans Table on exchange 60736i [1686229393.094012][94065:94067] CHIP:DMG: WriteClient moving to [ResponseRe] [1686229393.094033][94065:94067] CHIP:DMG: WriteResponseMessage = @@ -591,11 +589,11 @@ tests: verification: | The cluster used in the below command is an example, User can use any supported chip cluster/attribute/command. - To Setup the TH such that it should not have the privilege for the cluster in the path. , 1st we need to send below mentioned ACL command Here by sending below mentioned ACL command giving only access for ACL cluster(31), So except identify cluster command if try to send any other command will get status as unsupported access. ./chip-tool accesscontrol write acl '[{"fabricIndex": 1, "privilege": 5, "authMode": 2, "subjects":[112233], "targets": [{ "cluster":31, "endpoint":0, "deviceType":null }]}]' 1 0 + On TH(chip-tool), Verify that the DUT sends the status code SUCCESS for the data sent in the above command [1686228784.940429][93932:93934] CHIP:EM: Rxd Ack; Removing MessageCounter:76693936 from Retrans Table on exchange 64135i @@ -696,6 +694,7 @@ tests: The cluster used in the below command is an example, User can use any supported chip cluster/attribute/command. ./chip-tool levelcontrol write on-level 2 1 1 + On TH(chip-tool), verify that DUT sends a Write Response message with a success [1686229097.486513][93998:94000] CHIP:DMG: WriteClient moving to [ResponseRe] [1686229097.486533][93998:94000] CHIP:DMG: WriteResponseMessage = @@ -731,8 +730,9 @@ tests: ./chip-tool levelcontrol read on-level 1 1 + On TH(chip-tool), verify the attribute value that was modified in above step. - [1686229128.655083][94004:94006] CHIP:DMG: } + [1686229128.655203][94004:94006] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0011 DataVersion: 2737039619 [1686229128.655240][94004:94006] CHIP:TOO: OnLevel: 2 [1686229128.655340][94004:94006] CHIP:EM: <<< [E:43327i S:11132 M:58615041 (Ack:232232518)] (S) Msg TX to 1:0000000000000001 [58B9] --- Type 0000:10 (SecureChannel:StandaloneAck) @@ -741,7 +741,9 @@ tests: ./chip-tool levelcontrol write on-level 3 1 1 + Verify on TH(chip-tool) receives WriteResponseMessage with the status set to Success for the data sent in the above command and verify by sending a ReadRequestMessage to read the value that was modified. + [1686229150.157900][94008:94010] CHIP:DMG: WriteClient moving to [ResponseRe] [1686229150.157919][94008:94010] CHIP:DMG: WriteResponseMessage = [1686229150.157927][94008:94010] CHIP:DMG: { @@ -776,6 +778,7 @@ tests: ./chip-tool levelcontrol read on-level 1 1 On TH(chip-tool), verify the attribute value that was modified in above step + [1686229175.161437][94014:94016] CHIP:DMG: InteractionModelRevision = 1 [1686229175.161442][94014:94016] CHIP:DMG: } [1686229175.161512][94014:94016] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0011 DataVersion: 2737039620 @@ -788,6 +791,7 @@ tests: ./chip-tool levelcontrol write on-level 1 1 1 Verify on TH(chip-tool) receives WriteResponseMessage with the status set to Success for the data sent in the above command and verify by sending a ReadRequestMessage to read the value that was modified + [1686229199.082595][94020:94022] CHIP:EM: Rxd Ack; Removing MessageCounter:90418515 from Retrans Table on exchange 55893i [1686229199.082606][94020:94022] CHIP:DMG: WriteClient moving to [ResponseRe] [1686229199.082625][94020:94022] CHIP:DMG: WriteResponseMessage = @@ -823,6 +827,7 @@ tests: ./chip-tool levelcontrol read on-level 1 1 On TH(chip-tool), verify the attribute value that was modified in above step + [1686229224.244504][94026:94028] CHIP:DMG: } [1686229224.244574][94026:94028] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0011 DataVersion: 2737039621 [1686229224.244614][94026:94028] CHIP:TOO: OnLevel: 1 @@ -893,6 +898,7 @@ tests: ./chip-tool levelcontrol write on-level 3 1 1 --data-version 0xc4c9d7ae On TH(chip-tool), verify that DUT sends a Write Response message with a success + [1686229590.858793][94124:94126] CHIP:DMG: WriteClient moving to [ResponseRe] [1686229590.858813][94124:94126] CHIP:DMG: WriteResponseMessage = [1686229590.858821][94124:94126] CHIP:DMG: { @@ -926,6 +932,7 @@ tests: ./chip-tool levelcontrol read on-level 1 1 On TH(chip-tool), verify that TH receives the WriteResponseMessage with the status set to Success for the data sent in the above command and veriy by sending a ReadRequestMessage to read the value that was modified. + [1686229613.307472][94130:94132] CHIP:DMG: } [1686229613.307596][94130:94132] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0011 DataVersion: 2737039622 [1686229613.307632][94130:94132] CHIP:TOO: OnLevel: 3 @@ -945,8 +952,6 @@ tests: verification: | The cluster used in the below command is an example, User can use any supported chip cluster/attribute/command. - - ./chip-tool levelcontrol read on-level 1 1 On TH(chip-tool), Verify that DUT is responds with attribute value @@ -962,7 +967,9 @@ tests: ./chip-tool levelcontrol write on-level 4 1 1 + On TH(chip-tool), DUT send a Write Response message with status code as success + [1686229675.214378][94147:94149] CHIP:DMG: WriteResponseMessage = [1686229675.214386][94147:94149] CHIP:DMG: { [1686229675.214393][94147:94149] CHIP:DMG: AttributeStatusIBs = diff --git a/src/app/tests/suites/certification/Test_TC_IDM_5_2.yaml b/src/app/tests/suites/certification/Test_TC_IDM_5_2.yaml index 534154cb6d7e3c..3a7e8f9360df56 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_5_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_5_2.yaml @@ -80,7 +80,9 @@ tests: By sending a ReadRequest that the Write action was performed correctly. + ./chip-tool levelcontrol read on-level 1 1 + [1655799013.466144][7075:7080] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0008 Attribute 0x0000_0011 DataVersion: 737039642 [1655799013.466237][7075:7080] CHIP:TOO: on level: 1 [1655799013.466336][7075:7080] CHIP:EM: Sending Standalone Ack for MessageCounter:202402347 on exchange 58038i @@ -92,21 +94,27 @@ tests: status response message to be received. Wait for 5 seconds(Timer has expired) and then send the Invoke Request Message to the DUT." verification: | - ./chip-tool onoff on 1 1 --repeat-delay-ms 5000 --timedInteractionTimeoutMs 200 - - If the device being certified is Matter release 1.4 or later, verify DUT sends back a Status response with the TIMEOUT status code. - If the device being certified is Matter release 1.3 or earlier, verify the DUT sends back a Status response with either TIMEOUT or UNSUPPORTED_ACCESS status code. - - [1718641649.158222][1587554:1587556] CHIP:EM: Rxd Ack; Removing MessageCounter:70404585 from Retrans Table on exchange 44026i - [1718641649.158241][1587554:1587556] CHIP:DMG: ICR moving to [ResponseRe] - [1718641649.158261][1587554:1587556] CHIP:DMG: StatusResponseMessage = - [1718641649.158276][1587554:1587556] CHIP:DMG: { - [1718641649.158290][1587554:1587556] CHIP:DMG: Status = 0x94 (TIMEOUT), - [1718641649.158304][1587554:1587556] CHIP:DMG: InteractionModelRevision = 11 - [1718641649.158318][1587554:1587556] CHIP:DMG: } - [1718641649.158332][1587554:1587556] CHIP:IM: Received status response, status is 0x94 (TIMEOUT) - [1718641649.158355][1587554:1587556] CHIP:TOO: Error: IM Error 0x00000594: General error: 0x94 (TIMEOUT) - + On TH(chip-tool), Verify the DUT's response based on Matter release versions: + + For Matter release 1.4 or later, verify that the DUT responds with a status of TIMEOUT (0x94). + For Matter release 1.3 or earlier, verify that the DUT sends back a Status response with either TIMEOUT (0x94) or UNSUPPORTED_ACCESS (0x7e). + + ./chip-tool onoff on 1 1 --repeat-delay-ms 1000 --timedInteractionTimeoutMs 500 + + [1720440076.857] [11806:11808] [EM] Found matching exchange: 17395i, Delegate: 0xffff7c008198 + [1720440076.857] [11806:11808] [EM] CHIP MessageCounter:107413542 not in RetransTable on exchange 17395i + [1720440076.858] [11806:11808] [EM] >>> [E:17395i S:706 M:204574784 (Ack:107413543)] (S) Msg RX from 1:0000000000000001 [67EF] --- Type 0001:01 (IM:StatusResponse) + [1720440076.858] [11806:11808] [EM] Found matching exchange: 17395i, Delegate: 0xffff7c008198 + [1720440076.858] [11806:11808] [EM] Rxd Ack; Removing MessageCounter:107413543 from Retrans Table on exchange 17395i + [1720440076.858] [11806:11808] [DMG] ICR moving to [ResponseRe] + [1720440076.858] [11806:11808] [DMG] StatusResponseMessage = + [1720440076.858] [11806:11808] [DMG] { + [1720440076.858] [11806:11808] [DMG] Status = 0x94 (TIMEOUT), + [1720440076.858] [11806:11808] [DMG] InteractionModelRevision = 11 + [1720440076.858] [11806:11808] [DMG] } + [1720440076.858] [11806:11808] [IM] Received status response, status is 0x94 (TIMEOUT) + [1720440076.858] [11806:11808] [TOO] Error: IM Error 0x00000594: General error: 0x94 (TIMEOUT) + [1720440076.858] [11806:11808] [EM] <<< [E:17395i S:706 M:107413546 (Ack:204574784)] (S) Msg TX to 1:0000000000000001 [67EF] [UDP:[fe80::e65f:1ff:fe49:ae1a%eth0]:5540] --- Type 0001:01 (IM:StatusResponse) disabled: true - label: @@ -115,18 +123,26 @@ tests: status response message to be received. Wait for 5 seconds(Timer has expired) and then send the Write Request Message to the DUT." verification: | - ./chip-tool modeselect write on-mode 0 1 1 --repeat-delay-ms 1000 --timedInteractionTimeoutMs 500 + On TH(chip-tool), Verify the DUT's response based on Matter release versions: - If the device being certified is Matter release 1.4 or later, verify DUT sends back a Status response with the TIMEOUT status code. - If the device being certified is Matter release 1.3 or earlier, verify the DUT sends back a Status response with either TIMEOUT or UNSUPPORTED_ACCESS status code. + For Matter release 1.4 or later, verify that the DUT responds with a status of TIMEOUT (0x94). + For Matter release 1.3 or earlier, verify that the DUT sends back a Status response with either TIMEOUT (0x94) or UNSUPPORTED_ACCESS (0x7e). - [1720104134.620521][3325282:3325284] CHIP:DMG: WriteClient moving to [ResponseRe] - [1720104134.620540][3325282:3325284] CHIP:DMG: StatusResponseMessage = - [1720104134.620555][3325282:3325284] CHIP:DMG: { - [1720104134.620569][3325282:3325284] CHIP:DMG: Status = 0x94 (TIMEOUT), - [1720104134.620583][3325282:3325284] CHIP:DMG: InteractionModelRevision = 11 - [1720104134.620596][3325282:3325284] CHIP:DMG: } - [1720104134.620611][3325282:3325284] CHIP:IM: Received status response, status is 0x94 (TIMEOUT) - [1720104134.620689][3325282:3325284] CHIP:TOO: Error: IM Error 0x00000594: General error: 0x94 (TIMEOUT) + ./chip-tool modeselect write on-mode 0 1 1 --repeat-delay-ms 1000 --timedInteractionTimeoutMs 500 + On TH(chip-tool), Verify we are getting status response and UNSUPPORTED_ACCESS from DUT to TH for above command + + + [1720440084.666] [11810:11812] [EM] Found matching exchange: 22607i, Delegate: 0xffff9000a040 + [1720440084.666] [11810:11812] [EM] Rxd Ack; Removing MessageCounter:200551619 from Retrans Table on exchange 22607i + [1720440084.667] [11810:11812] [DMG] WriteClient moving to [ResponseRe] + [1720440084.667] [11810:11812] [DMG] StatusResponseMessage = + [1720440084.667] [11810:11812] [DMG] { + [1720440084.667] [11810:11812] [DMG] Status = 0x94 (TIMEOUT), + [1720440084.667] [11810:11812] [DMG] InteractionModelRevision = 11 + [1720440084.667] [11810:11812] [DMG] } + [1720440084.667] [11810:11812] [IM] Received status response, status is 0x94 (TIMEOUT) + [1720440084.667] [11810:11812] [TOO] Error: IM Error 0x00000594: General error: 0x94 (TIMEOUT) + [1720440084.667] [11810:11812] [EM] <<< [E:22607i S:23365 M:200551622 (Ack:3244934)] (S) Msg TX to 1:0000000000000001 [67EF] [UDP:[fe80::e65f:1ff:fe49:ae1a%eth0]:5540] --- Type 0001:01 (IM:StatusResponse) + [1720440084.668] [11810:11812] [DMG] WriteClient moving to [AwaitingDe] disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_IDM_6_1.yaml b/src/app/tests/suites/certification/Test_TC_IDM_6_1.yaml index 31339d68e30856..b9ade1e9e42e05 100644 --- a/src/app/tests/suites/certification/Test_TC_IDM_6_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_IDM_6_1.yaml @@ -523,7 +523,6 @@ tests: verification: | ./chip-tool any read-event-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF - On TH(chip-tool) verify that the DUT sends Report Data Message with EventReports [1655986008.400642][4813:4818] CHIP:DMG: } @@ -609,7 +608,7 @@ tests: large event data. For every chunked data message received, DUT sends a status response." verification: | - Try to verify this step in doorlock app, below mentioned wildcard command to read-event from TH to DUT. + Try to verify this step in doorlock app, below mentioned wildcard command to read-event from TH to DUT.(Log may vary based on the reference app) ./chip-tool any read-event-by-id 0xFFFFFFFF 0xFFFFFFFF 1 0xFFFF The message flow can expect as mentioned below diff --git a/src/app/tests/suites/certification/Test_TC_I_2_2.yaml b/src/app/tests/suites/certification/Test_TC_I_2_2.yaml index 09a2d6bd0610ac..3101690e95d318 100644 --- a/src/app/tests/suites/certification/Test_TC_I_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_I_2_2.yaml @@ -54,6 +54,22 @@ tests: - name: "IdentifyTime" value: 60 + - label: + "Verify that the device enters its identification state using the + IdentifyType from Step 1b, in order to indicate to an observer which + of several nodes and/or endpoints it is." + verification: | + Verify that the device enters its identification state using the IdentifyType from step1b, Here the Identifytype is 2(VisibleIndicator) which can be a small led that indicates the device is in identification state. This IdentifyType can vary to device ref: 1.2.5.1 in spec for the IdentifyTypeEnum of the particular DUT + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_USER_PROMPT && I.S.A0001 + arguments: + values: + - name: "message" + value: "Please enter 'y' for success" + - name: "expectedValue" + value: "y" + - label: "Step 2b: TH reads immediately IdentifyTime attribute from DUT" PICS: I.S.A0000 command: "readAttribute" @@ -82,24 +98,8 @@ tests: minValue: 42 maxValue: 58 - # - label: - # "Step 3: TH sends IdentifyQuery command to DUT and Verify - # IdentifyQueryResponse command to TH,with the Timeout field set to a - # value in the range 0x0000 to 0x0032" - # verification: | - # IdentifyQuery is not supported by Matter - # cluster: "LogCommands" - # command: "UserPrompt" - # PICS: PICS_USER_PROMPT && I.S.C01.Rsp && I.S.C00.Tx - # arguments: - # values: - # - name: "message" - # value: "Please enter 'y' for success" - # - name: "expectedValue" - # value: "y" - - label: - "Step 4a: Before 60 seconds expire, TH sends Identify command to DUT, + "Step 3a: Before 60 seconds expire, TH sends Identify command to DUT, with the identify time field set to 0x0000 (stop identifying)." PICS: I.S.C00.Rsp command: "Identify" @@ -108,35 +108,28 @@ tests: - name: "IdentifyTime" value: 0 - - label: "Step 4b: TH reads immediately IdentifyTime attribute from DUT" + - label: "Step 3b: TH reads immediately IdentifyTime attribute from DUT" PICS: I.S.A0000 command: "readAttribute" attribute: "IdentifyTime" response: value: 0 - # disabled due to IdentifyQuery not supported for matter V1.0 - #- label: "Step 5: TH sends IdentifyQuery command to DUT " - # verification: | - # IdentifyQuery is not supported by Matter - # cluster: "LogCommands" - # command: "UserPrompt" - # PICS: PICS_USER_PROMPT && I.S.C01.Rsp && I.S.C00.Tx - # arguments: - # values: - # - name: "message" - # value: "Please enter 'y' for success" - # - name: "expectedValue" - # value: "y" + - label: + "Step 4a: TH writes a value of 0x000f (15s) to IdentifyTime attribute + of DUT" + PICS: I.S.A0000 + command: "writeAttribute" + attribute: "IdentifyTime" + arguments: + value: 15 - label: - "Step 6a: Verify that the device enters its identification state using - the IdentifyType from Step 1b, in order to indicate to an observer - which of several nodes and/or endpoints it is." + "Verify that the device enters its identification state using the + IdentifyType from Step 1b, in order to indicate to an observer which + of several nodes and/or endpoints it is." verification: | - Verify that the device enters its identification state using the IdentifyType from step1b, - Here the Identifytype is 2(VisibleIndicator) which can be a small led that indicates the device is in identification state. - This IdentifyType can vary to device ref: 1.2.5.1 in spec for the IdentifyTypeEnum of the particular DUT + Verify that the device enters its identification state using the IdentifyType from step1b, Here the Identifytype is 2(VisibleIndicator) which can be a small led that indicates the device is in identification state. This IdentifyType can vary to device ref: 1.2.5.1 in spec for the IdentifyTypeEnum of the particular DUT cluster: "LogCommands" command: "UserPrompt" PICS: PICS_USER_PROMPT && I.S.A0001 @@ -147,15 +140,6 @@ tests: - name: "expectedValue" value: "y" - - label: - "Step 6a: TH writes a value of 0x000f (15s) to IdentifyTime attribute - of DUT" - PICS: I.S.A0000 - command: "writeAttribute" - attribute: "IdentifyTime" - arguments: - value: 15 - - label: "Wait 15000ms" cluster: "DelayCommands" command: "WaitForMs" @@ -165,7 +149,7 @@ tests: value: 15000 - label: - "Step 6b: After 15 seconds, the TH reads IdentifyTime attribute from + "Step 4b: After 15 seconds, the TH reads IdentifyTime attribute from DUT" PICS: I.S.A0000 command: "readAttribute" @@ -174,19 +158,3 @@ tests: constraints: minValue: 0 maxValue: 5 - - - label: - "Step 6b: Verify that the device terminates its identification state" - verification: | - Verify that the identification state is terminated in the DUT. - Here the Identifytype is 2(VisibleIndicator) which can be a small led that indicates the device is in identification state. - This IdentifyType can vary to device ref: 1.2.5.1 in spec for the IdentifyTypeEnum of the particular DUT - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_USER_PROMPT && I.S.A0001 - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" diff --git a/src/app/tests/suites/certification/Test_TC_I_3_2.yaml b/src/app/tests/suites/certification/Test_TC_I_3_2.yaml index adedbb3c0566cc..2b3bcd59de0151 100644 --- a/src/app/tests/suites/certification/Test_TC_I_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_I_3_2.yaml @@ -70,15 +70,7 @@ tests: disabled: true - label: - "Step 2: DUT issues an IdentifyQuery command to the Test Harness. - Note: IdentifyQuery is not supported by Matter." - PICS: I.C.C01.Tx - verification: | - IdentifyQuery is not supported by Matter - disabled: true - - - label: - "Step 3: DUT issues an Identify command to the Test Harness, with the + "Step 2: DUT issues an Identify command to the Test Harness, with the IdentifyTime argument set to 0x0000 (Stop)." PICS: I.C.C00.Tx verification: | @@ -116,7 +108,7 @@ tests: disabled: true - label: - "Step 4: DUT sends a TriggerEffect command to the Test Harness, with + "Step 3: DUT sends a TriggerEffect command to the Test Harness, with any supported EffectIdentifier argument and EffectVariant set to 0." PICS: I.C.C40.Tx verification: | diff --git a/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml index 65e5ede6845c2c..9feecfa85f5896 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_4_1.yaml @@ -180,7 +180,7 @@ tests: - label: "Step 4b: After 10 seconds, TH reads CurrentLevel attribute from DUT" - PICS: LVL.S.C01.Rsp && LVL.S.A0000 + PICS: LVL.S.C01.Rsp && LVL.S.A0000 && LVL.S.M.VarRate command: "readAttribute" attribute: "CurrentLevel" response: @@ -199,7 +199,7 @@ tests: - label: "Step 4c: After another 10 seconds, TH reads CurrentLevel attribute from DUT" - PICS: LVL.S.C01.Rsp && LVL.S.A0000 + PICS: LVL.S.C01.Rsp && LVL.S.A0000 && LVL.S.M.VarRate command: "readAttribute" attribute: "CurrentLevel" response: @@ -218,7 +218,7 @@ tests: - label: "Step 4d: After another 10 seconds, TH reads CurrentLevel attribute from DUT" - PICS: LVL.S.C01.Rsp && LVL.S.A0000 + PICS: LVL.S.C01.Rsp && LVL.S.A0000 && LVL.S.M.VarRate command: "readAttribute" attribute: "CurrentLevel" response: diff --git a/src/app/tests/suites/certification/Test_TC_LVL_8_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_8_1.yaml new file mode 100644 index 00000000000000..20fad8de4c7dfc --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_LVL_8_1.yaml @@ -0,0 +1,361 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default + +name: 32.1.9 [TC-LVL-8.1] Verification of commands (DUT as Client)" + +PICS: + - LVL.C + +config: + nodeId: 0x12344321 + cluster: "Basic Information" + endpoint: 0 + +tests: + - label: + "Step 1: TH prompts the operator to make the DUT send one or more + supported commands from the Level Control cluster" + verification: | + The product maker needs to provide instructions on how to trigger the command on the DUT. For comparison, the DUT behavior for this test step can be simulated using chip-tool (when the DUT is a commissioner/Client). + + The DUT should transmit correctly formed commands in any order, with application achievable values that are within the limits allowed by the specification and consistent with the attribute values reported by the TH. Verify this using the TH log of these messages. + + Please send the below command and validate the conditions mentioned above: + + ./chip-tool levelcontrol move-to-level 125 10 0 0 1 1 + on TH (all-clusters-app) log. Verify the move-to-level command is received successfully. + + + [1721131579.026] [3188:3188] [DL] HandlePlatformSpecificBLEEvent 32792 + [1721131579.028] [3188:3188] [EM] >>> [E:39794r S:12010 M:201578598] (S) Msg RX from 1:000000000001B669 [AD70] --- Type 0001:08 (IM:InvokeCommandRequest) + [1721131579.028] [3188:3188] [EM] Handling via exchange: 39794r, Delegate: 0xaaaac95ff3b0 + [1721131579.028] [3188:3188] [DMG] InvokeRequestMessage = + [1721131579.028] [3188:3188] [DMG] { + [1721131579.029] [3188:3188] [DMG] suppressResponse = false, + [1721131579.029] [3188:3188] [DMG] timedRequest = false, + [1721131579.029] [3188:3188] [DMG] InvokeRequests = + [1721131579.029] [3188:3188] [DMG] [ + [1721131579.029] [3188:3188] [DMG] CommandDataIB = + [1721131579.029] [3188:3188] [DMG] { + [1721131579.029] [3188:3188] [DMG] CommandPathIB = + [1721131579.029] [3188:3188] [DMG] { + [1721131579.029] [3188:3188] [DMG] EndpointId = 0x1, + [1721131579.029] [3188:3188] [DMG] ClusterId = 0x8, + [1721131579.029] [3188:3188] [DMG] CommandId = 0x0, + [1721131579.029] [3188:3188] [DMG] }, + [1721131579.029] [3188:3188] [DMG] + [1721131579.029] [3188:3188] [DMG] CommandFields = + [1721131579.029] [3188:3188] [DMG] { + [1721131579.029] [3188:3188] [DMG] 0x0 = 125 (unsigned), + [1721131579.029] [3188:3188] [DMG] 0x1 = 10 (unsigned), + [1721131579.029] [3188:3188] [DMG] 0x2 = 0 (unsigned), + [1721131579.029] [3188:3188] [DMG] 0x3 = 0 (unsigned), + [1721131579.029] [3188:3188] [DMG] }, + [1721131579.029] [3188:3188] [DMG] }, + [1721131579.029] [3188:3188] [DMG] + [1721131579.029] [3188:3188] [DMG] ], + [1721131579.029] [3188:3188] [DMG] + [1721131579.029] [3188:3188] [DMG] InteractionModelRevision = 11 + [1721131579.029] [3188:3188] [DMG] }, + [1721131579.029] [3188:3188] [DMG] AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o + [1721131579.029] [3188:3188] [DMG] AccessControl: allowed + [1721131579.030] [3188:3188] [DMG] Received command for Endpoint=1 Cluster=0x0000_0008 Command=0x0000_0000 + [1721131579.030] [3188:3188] [ZCL] RX level-control: MOVE_TO_LEVEL 7d a 0 0 + [1721131579.030] [3188:3188] [DMG] Command handler moving to [NewRespons] + + + + ./chip-tool levelcontrol move 1 5 0 0 1 1 + on TH (all-clusters-app) log. Verify the move command is received successfully. + + + [1721131607.050] [3188:3188] [EM] Handling via exchange: 48182r, Delegate: 0xaaaac95ff3b0 + [1721131607.050] [3188:3188] [DMG] InvokeRequestMessage = + [1721131607.050] [3188:3188] [DMG] { + [1721131607.050] [3188:3188] [DMG] suppressResponse = false, + [1721131607.050] [3188:3188] [DMG] timedRequest = false, + [1721131607.050] [3188:3188] [DMG] InvokeRequests = + [1721131607.050] [3188:3188] [DMG] [ + [1721131607.050] [3188:3188] [DMG] CommandDataIB = + [1721131607.050] [3188:3188] [DMG] { + [1721131607.050] [3188:3188] [DMG] CommandPathIB = + [1721131607.050] [3188:3188] [DMG] { + [1721131607.050] [3188:3188] [DMG] EndpointId = 0x1, + [1721131607.050] [3188:3188] [DMG] ClusterId = 0x8, + [1721131607.050] [3188:3188] [DMG] CommandId = 0x1, + [1721131607.050] [3188:3188] [DMG] }, + [1721131607.050] [3188:3188] [DMG] + [1721131607.050] [3188:3188] [DMG] CommandFields = + [1721131607.050] [3188:3188] [DMG] { + [1721131607.050] [3188:3188] [DMG] 0x0 = 1 (unsigned), + [1721131607.050] [3188:3188] [DMG] 0x1 = 5 (unsigned), + [1721131607.050] [3188:3188] [DMG] 0x2 = 0 (unsigned), + [1721131607.050] [3188:3188] [DMG] 0x3 = 0 (unsigned), + [1721131607.050] [3188:3188] [DMG] }, + [1721131607.050] [3188:3188] [DMG] }, + [1721131607.050] [3188:3188] [DMG] + [1721131607.050] [3188:3188] [DMG] ], + [1721131607.050] [3188:3188] [DMG] + [1721131607.050] [3188:3188] [DMG] InteractionModelRevision = 11 + [1721131607.050] [3188:3188] [DMG] }, + [1721131607.051] [3188:3188] [DMG] AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o + [1721131607.051] [3188:3188] [DMG] AccessControl: allowed + [1721131607.051] [3188:3188] [DMG] Received command for Endpoint=1 Cluster=0x0000_0008 Command=0x0000_0001 + + + + ./chip-tool levelcontrol step 1 10 0 0 0 1 1 + on TH (all-clusters-app) log. Verify the step command is received successfully. + + [1721131622.700] [3188:3188] [EM] Handling via exchange: 33066r, Delegate: 0xaaaac95ff3b0 + [1721131622.700] [3188:3188] [DMG] InvokeRequestMessage = + [1721131622.700] [3188:3188] [DMG] { + [1721131622.700] [3188:3188] [DMG] suppressResponse = false, + [1721131622.700] [3188:3188] [DMG] timedRequest = false, + [1721131622.700] [3188:3188] [DMG] InvokeRequests = + [1721131622.700] [3188:3188] [DMG] [ + [1721131622.700] [3188:3188] [DMG] CommandDataIB = + [1721131622.700] [3188:3188] [DMG] { + [1721131622.700] [3188:3188] [DMG] CommandPathIB = + [1721131622.700] [3188:3188] [DMG] { + [1721131622.700] [3188:3188] [DMG] EndpointId = 0x1, + [1721131622.700] [3188:3188] [DMG] ClusterId = 0x8, + [1721131622.700] [3188:3188] [DMG] CommandId = 0x2, + [1721131622.700] [3188:3188] [DMG] }, + [1721131622.700] [3188:3188] [DMG] + [1721131622.701] [3188:3188] [DMG] CommandFields = + [1721131622.701] [3188:3188] [DMG] { + [1721131622.701] [3188:3188] [DMG] 0x0 = 1 (unsigned), + [1721131622.701] [3188:3188] [DMG] 0x1 = 10 (unsigned), + [1721131622.701] [3188:3188] [DMG] 0x2 = 0 (unsigned), + [1721131622.701] [3188:3188] [DMG] 0x3 = 0 (unsigned), + [1721131622.701] [3188:3188] [DMG] 0x4 = 0 (unsigned), + [1721131622.701] [3188:3188] [DMG] }, + [1721131622.701] [3188:3188] [DMG] }, + [1721131622.701] [3188:3188] [DMG] + [1721131622.701] [3188:3188] [DMG] ], + [1721131622.701] [3188:3188] [DMG] + [1721131622.701] [3188:3188] [DMG] InteractionModelRevision = 11 + [1721131622.701] [3188:3188] [DMG] }, + [1721131622.701] [3188:3188] [DMG] AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o + [1721131622.701] [3188:3188] [DMG] AccessControl: allowed + + + + + ./chip-tool levelcontrol stop 0 0 1 1 + on TH (all-clusters-app) log. Verify the stop command is received successfully. + + [1721131637.910] [3188:3188] [EM] >>> [E:64966r S:12013 M:241263255] (S) Msg RX from 1:000000000001B669 [AD70] --- Type 0001:08 (IM:InvokeCommandRequest) + [1721131637.910] [3188:3188] [EM] Handling via exchange: 64966r, Delegate: 0xaaaac95ff3b0 + [1721131637.910] [3188:3188] [DMG] InvokeRequestMessage = + [1721131637.910] [3188:3188] [DMG] { + [1721131637.910] [3188:3188] [DMG] suppressResponse = false, + [1721131637.910] [3188:3188] [DMG] timedRequest = false, + [1721131637.910] [3188:3188] [DMG] InvokeRequests = + [1721131637.910] [3188:3188] [DMG] [ + [1721131637.910] [3188:3188] [DMG] CommandDataIB = + [1721131637.910] [3188:3188] [DMG] { + [1721131637.910] [3188:3188] [DMG] CommandPathIB = + [1721131637.910] [3188:3188] [DMG] { + [1721131637.910] [3188:3188] [DMG] EndpointId = 0x1, + [1721131637.910] [3188:3188] [DMG] ClusterId = 0x8, + [1721131637.910] [3188:3188] [DMG] CommandId = 0x3, + [1721131637.910] [3188:3188] [DMG] }, + [1721131637.910] [3188:3188] [DMG] + [1721131637.910] [3188:3188] [DMG] CommandFields = + [1721131637.910] [3188:3188] [DMG] { + [1721131637.910] [3188:3188] [DMG] 0x0 = 0 (unsigned), + [1721131637.910] [3188:3188] [DMG] 0x1 = 0 (unsigned), + [1721131637.910] [3188:3188] [DMG] }, + [1721131637.910] [3188:3188] [DMG] }, + [1721131637.910] [3188:3188] [DMG] + [1721131637.911] [3188:3188] [DMG] ], + [1721131637.911] [3188:3188] [DMG] + [1721131637.911] [3188:3188] [DMG] InteractionModelRevision = 11 + [1721131637.911] [3188:3188] [DMG] }, + [1721131637.911] [3188:3188] [DMG] AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o + [1721131637.911] [3188:3188] [DMG] AccessControl: allowed + [1721131637.911] [3188:3188] [DMG] Received command for Endpoint=1 Cluster=0x0000_0008 Command=0x0000_0003 + + + + ./chip-tool levelcontrol move-to-level-with-on-off 1 0 0 0 1 1 + on TH (all-clusters-app) log. Verify the move-to-level-with-on-off command is received successfully. + + [1721131651.510] [3188:3188] [EM] >>> [E:42083r S:12014 M:199867058] (S) Msg RX from 1:000000000001B669 [AD70] --- Type 0001:08 (IM:InvokeCommandRequest) + [1721131651.510] [3188:3188] [EM] Handling via exchange: 42083r, Delegate: 0xaaaac95ff3b0 + [1721131651.510] [3188:3188] [DMG] InvokeRequestMessage = + [1721131651.510] [3188:3188] [DMG] { + [1721131651.510] [3188:3188] [DMG] suppressResponse = false, + [1721131651.510] [3188:3188] [DMG] timedRequest = false, + [1721131651.510] [3188:3188] [DMG] InvokeRequests = + [1721131651.510] [3188:3188] [DMG] [ + [1721131651.510] [3188:3188] [DMG] CommandDataIB = + [1721131651.510] [3188:3188] [DMG] { + [1721131651.511] [3188:3188] [DMG] CommandPathIB = + [1721131651.511] [3188:3188] [DMG] { + [1721131651.511] [3188:3188] [DMG] EndpointId = 0x1, + [1721131651.511] [3188:3188] [DMG] ClusterId = 0x8, + [1721131651.511] [3188:3188] [DMG] CommandId = 0x4, + [1721131651.511] [3188:3188] [DMG] }, + [1721131651.511] [3188:3188] [DMG] + [1721131651.511] [3188:3188] [DMG] CommandFields = + [1721131651.511] [3188:3188] [DMG] { + [1721131651.511] [3188:3188] [DMG] 0x0 = 1 (unsigned), + [1721131651.511] [3188:3188] [DMG] 0x1 = 0 (unsigned), + [1721131651.511] [3188:3188] [DMG] 0x2 = 0 (unsigned), + [1721131651.511] [3188:3188] [DMG] 0x3 = 0 (unsigned), + [1721131651.511] [3188:3188] [DMG] }, + [1721131651.511] [3188:3188] [DMG] }, + [1721131651.511] [3188:3188] [DMG] + [1721131651.511] [3188:3188] [DMG] ], + [1721131651.511] [3188:3188] [DMG] + [1721131651.511] [3188:3188] [DMG] InteractionModelRevision = 11 + [1721131651.511] [3188:3188] [DMG] }, + [1721131651.512] [3188:3188] [DMG] AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o + [1721131651.512] [3188:3188] [DMG] AccessControl: allowed + [1721131651.512] [3188:3188] [DMG] Received command for Endpoint=1 Cluster=0x0000_0008 Command=0x0000_0004 + + + + + ./chip-tool levelcontrol move-with-on-off 1 5 0 0 1 1 + on TH (all-clusters-app) log. Verify the move-with-on-off command is received successfully. + + + [1721131674.036] [3188:3188] [DL] HandlePlatformSpecificBLEEvent 32792 + [1721131674.039] [3188:3188] [EM] >>> [E:21646r S:12015 M:111324533] (S) Msg RX from 1:000000000001B669 [AD70] --- Type 0001:08 (IM:InvokeCommandRequest) + [1721131674.039] [3188:3188] [EM] Handling via exchange: 21646r, Delegate: 0xaaaac95ff3b0 + [1721131674.039] [3188:3188] [DMG] InvokeRequestMessage = + [1721131674.039] [3188:3188] [DMG] { + [1721131674.039] [3188:3188] [DMG] suppressResponse = false, + [1721131674.039] [3188:3188] [DMG] timedRequest = false, + [1721131674.039] [3188:3188] [DMG] InvokeRequests = + [1721131674.039] [3188:3188] [DMG] [ + [1721131674.039] [3188:3188] [DMG] CommandDataIB = + [1721131674.039] [3188:3188] [DMG] { + [1721131674.039] [3188:3188] [DMG] CommandPathIB = + [1721131674.039] [3188:3188] [DMG] { + [1721131674.039] [3188:3188] [DMG] EndpointId = 0x1, + [1721131674.039] [3188:3188] [DMG] ClusterId = 0x8, + [1721131674.039] [3188:3188] [DMG] CommandId = 0x5, + [1721131674.039] [3188:3188] [DMG] }, + [1721131674.039] [3188:3188] [DMG] + [1721131674.039] [3188:3188] [DMG] CommandFields = + [1721131674.039] [3188:3188] [DMG] { + [1721131674.039] [3188:3188] [DMG] 0x0 = 1 (unsigned), + [1721131674.039] [3188:3188] [DMG] 0x1 = 5 (unsigned), + [1721131674.039] [3188:3188] [DMG] 0x2 = 0 (unsigned), + [1721131674.039] [3188:3188] [DMG] 0x3 = 0 (unsigned), + [1721131674.040] [3188:3188] [DMG] }, + [1721131674.040] [3188:3188] [DMG] }, + [1721131674.040] [3188:3188] [DMG] + [1721131674.040] [3188:3188] [DMG] ], + [1721131674.040] [3188:3188] [DMG] + [1721131674.040] [3188:3188] [DMG] InteractionModelRevision = 11 + [1721131674.040] [3188:3188] [DMG] }, + [1721131674.040] [3188:3188] [DMG] AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o + [1721131674.040] [3188:3188] [DMG] AccessControl: allowed + [1721131674.040] [3188:3188] [DMG] Received command for Endpoint=1 Cluster=0x0000_0008 Command=0x0000_0005 + [1721131674.040] [3188:3188] [ZCL] RX level-control: MOVE_WITH_ON_OFF 1 5 0 0 + [1721131674.040] [3188:3188] [ZCL] Setting on/off to OFF due to level change + [1721131674.040] [3188:3188] [ZCL] Endpoint 1 On/off already set to new value + + + + + ./chip-tool levelcontrol step-with-on-off 1 15 123 0 0 1 1 + on TH (all-clusters-app) log. Verify the step-with-on-off command is received successfully. + + + [1721131696.543] [3188:3188] [EM] >>> [E:11849r S:12016 M:155492710] (S) Msg RX from 1:000000000001B669 [AD70] --- Type 0001:08 (IM:InvokeCommandRequest) + [1721131696.543] [3188:3188] [EM] Handling via exchange: 11849r, Delegate: 0xaaaac95ff3b0 + [1721131696.543] [3188:3188] [DMG] InvokeRequestMessage = + [1721131696.543] [3188:3188] [DMG] { + [1721131696.543] [3188:3188] [DMG] suppressResponse = false, + [1721131696.543] [3188:3188] [DMG] timedRequest = false, + [1721131696.543] [3188:3188] [DMG] InvokeRequests = + [1721131696.543] [3188:3188] [DMG] [ + [1721131696.543] [3188:3188] [DMG] CommandDataIB = + [1721131696.543] [3188:3188] [DMG] { + [1721131696.543] [3188:3188] [DMG] CommandPathIB = + [1721131696.543] [3188:3188] [DMG] { + [1721131696.543] [3188:3188] [DMG] EndpointId = 0x1, + [1721131696.543] [3188:3188] [DMG] ClusterId = 0x8, + [1721131696.543] [3188:3188] [DMG] CommandId = 0x6, + [1721131696.543] [3188:3188] [DMG] }, + [1721131696.544] [3188:3188] [DMG] + [1721131696.544] [3188:3188] [DMG] CommandFields = + [1721131696.544] [3188:3188] [DMG] { + [1721131696.544] [3188:3188] [DMG] 0x0 = 1 (unsigned), + [1721131696.544] [3188:3188] [DMG] 0x1 = 15 (unsigned), + [1721131696.544] [3188:3188] [DMG] 0x2 = 123 (unsigned), + [1721131696.544] [3188:3188] [DMG] 0x3 = 0 (unsigned), + [1721131696.544] [3188:3188] [DMG] 0x4 = 0 (unsigned), + [1721131696.544] [3188:3188] [DMG] }, + [1721131696.544] [3188:3188] [DMG] }, + [1721131696.544] [3188:3188] [DMG] + [1721131696.544] [3188:3188] [DMG] ], + [1721131696.544] [3188:3188] [DMG] + [1721131696.544] [3188:3188] [DMG] InteractionModelRevision = 11 + [1721131696.544] [3188:3188] [DMG] }, + [1721131696.544] [3188:3188] [DMG] AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o + [1721131696.544] [3188:3188] [DMG] AccessControl: allowed + [1721131696.544] [3188:3188] [DMG] Received command for Endpoint=1 Cluster=0x0000_0008 Command=0x0000_0006 + [1721131696.544] [3188:3188] [ZCL] RX level-control: STEP_WITH_ON_OFF 1 f 7b 0 0 + [1721131696.544] [3188:3188] [ZCL] Setting on/off to OFF due to level change + [1721131696.544] [3188:3188] [ZCL] Endpoint 1 On/off already set to new value + [1721131696.544] [3188:3188] [DMG] Command handler moving to [NewRespons] + + + ./chip-tool levelcontrol stop-with-on-off 0 0 1 1 + on TH (all-clusters-app) log. Verify the stop-with-on-off command is received successfully. + + [1721131714.456] [3188:3188] [EM] >>> [E:55346r S:12017 M:234822330] (S) Msg RX from 1:000000000001B669 [AD70] --- Type 0001:08 (IM:InvokeCommandRequest) + [1721131714.456] [3188:3188] [EM] Handling via exchange: 55346r, Delegate: 0xaaaac95ff3b0 + [1721131714.457] [3188:3188] [DMG] InvokeRequestMessage = + [1721131714.457] [3188:3188] [DMG] { + [1721131714.457] [3188:3188] [DMG] suppressResponse = false, + [1721131714.457] [3188:3188] [DMG] timedRequest = false, + [1721131714.457] [3188:3188] [DMG] InvokeRequests = + [1721131714.457] [3188:3188] [DMG] [ + [1721131714.457] [3188:3188] [DMG] CommandDataIB = + [1721131714.457] [3188:3188] [DMG] { + [1721131714.457] [3188:3188] [DMG] CommandPathIB = + [1721131714.457] [3188:3188] [DMG] { + [1721131714.457] [3188:3188] [DMG] EndpointId = 0x1, + [1721131714.457] [3188:3188] [DMG] ClusterId = 0x8, + [1721131714.457] [3188:3188] [DMG] CommandId = 0x7, + [1721131714.457] [3188:3188] [DMG] }, + [1721131714.457] [3188:3188] [DMG] + [1721131714.457] [3188:3188] [DMG] CommandFields = + [1721131714.457] [3188:3188] [DMG] { + [1721131714.457] [3188:3188] [DMG] 0x0 = 0 (unsigned), + [1721131714.457] [3188:3188] [DMG] 0x1 = 0 (unsigned), + [1721131714.457] [3188:3188] [DMG] }, + [1721131714.457] [3188:3188] [DMG] }, + [1721131714.457] [3188:3188] [DMG] + [1721131714.457] [3188:3188] [DMG] ], + [1721131714.457] [3188:3188] [DMG] + [1721131714.457] [3188:3188] [DMG] InteractionModelRevision = 11 + [1721131714.457] [3188:3188] [DMG] }, + [1721131714.457] [3188:3188] [DMG] AccessControl: checking f=1 a=c s=0x000000000001B669 t= c=0x0000_0008 e=1 p=o + [1721131714.457] [3188:3188] [DMG] AccessControl: allowed + [1721131714.457] [3188:3188] [DMG] Received command for Endpoint=1 Cluster=0x0000_0008 Command=0x0000_0007 + [1721131714.457] [3188:3188] [ZCL] RX level-control: STOP_WITH_ON_OFF + [1721131714.457] [3188:3188] [DMG] Command handler moving to [NewRespons] + [1721131714.458] [3188:3188] [DMG] Command handler moving to [ Preparing] + disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_LVL_9_1.yaml b/src/app/tests/suites/certification/Test_TC_LVL_9_1.yaml index 36da12403f5e9d..6e63953d262143 100644 --- a/src/app/tests/suites/certification/Test_TC_LVL_9_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_LVL_9_1.yaml @@ -58,9 +58,9 @@ tests: } - label: - "Step 0b: TH binds GroupIds 0x0001 and 0x0002 with GroupKeySetID - 0x01a1 in the GroupKeyMap attribute list on GroupKeyManagement cluster - by writing the GroupKeyMap attribute with two entries as follows:" + "Step 0b: TH binds GroupIds 0x0001 with GroupKeySetID 0x01a1 in the + GroupKeyMap attribute list on GroupKeyManagement cluster by writing + the GroupKeyMap attribute with two entries as follows:" cluster: "Group Key Management" endpoint: 0 command: "writeAttribute" @@ -122,8 +122,17 @@ tests: - name: "SceneList" value: [] + - label: "Step 2a: TH reads the MinLevel attribute from the DUT" + cluster: "Level Control" + command: "readAttribute" + attribute: "MinLevel" + response: + saveAs: MinLevelValue + constraints: + type: int8u + - label: - "Step 2a: TH sends a MoveToLevel command to DUT, with Level =0 and + "Step 2b: TH sends a MoveToLevel command to DUT, with Level =0 and TransitionTime =0 (immediate)" cluster: "Level Control" command: "MoveToLevel" @@ -138,15 +147,6 @@ tests: - name: "OptionsOverride" value: 1 - - label: "Step 2b: TH reads the MinLevel attribute from the DUT" - cluster: "Level Control" - command: "readAttribute" - attribute: "MinLevel" - response: - saveAs: MinLevelValue - constraints: - type: int8u - - label: "Step 2c: TH reads the CurrentLevel attribute from DUT" cluster: "Level Control" command: "readAttribute" @@ -236,7 +236,7 @@ tests: - name: "SceneID" value: 0x01 - - label: "Step 6c: TH reads the CurrentLevel attribute from DUT" + - label: "Step 6b: TH reads the CurrentLevel attribute from DUT" cluster: "Level Control" command: "readAttribute" attribute: "CurrentLevel" diff --git a/src/app/tests/suites/certification/Test_TC_LWM_1_2.yaml b/src/app/tests/suites/certification/Test_TC_LWM_1_2.yaml index fc9a0211fb7caf..52310a3cc86cf3 100644 --- a/src/app/tests/suites/certification/Test_TC_LWM_1_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_LWM_1_2.yaml @@ -40,7 +40,6 @@ tests: - Verify that the list has at least 2 and at most 255 entries - Verify that each ModeOptionsStruct entry has a unique Mode field value and Label field value - If ModeOptionsStruct entry’s ModeTags field is not empty, then Verify the values of the Value fields that are not larger than 16 bits, for each Value field: Is the mode tag value a defined common tag value ( Auto(0x0000), Quick(0x0001), Quiet(0x0002), LowNoise(0x0003), LowEnergy(0x0004), Vacation(0x0005), Min(0x0006), Max(0x0007), Night(0x0008), Day(0x0009)) or a defined cluster derived tag value ( Normal, Delicate, Heavy, Whites) or in the MfgTags (0x8000 to 0xBFFF) range - - If the Value field is in the MfgTags (0x8000 to 0xBFFF) range, the TagName field is a string with a length between 1 and 64 - Verify that at least one ModeOptionsStruct entry includes the Normal mode tag - Save the Mode field values as supported_modes_dut on the TH (Chip-tool) and below is the sample log provided for the raspi platform: diff --git a/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml b/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml index b2c5355ece71eb..51f389b6afaffc 100644 --- a/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_MOD_1_3.yaml @@ -251,6 +251,36 @@ tests: time in a manufacturer specific order" PICS: MOD.C.AO-READ verification: | + ./chip-tool modeselect read on-mode 1 1 + + Verify the "OnMode response" on the TH (all-cluster-app) log: + + [1666940828.515256][9718:9718] CHIP:DMG: ReportDataMessage = + [1666940828.515259][9718:9718] CHIP:DMG: { + [1666940828.515261][9718:9718] CHIP:DMG: AttributeReportIBs = + [1666940828.515265][9718:9718] CHIP:DMG: [ + [1666940828.515267][9718:9718] CHIP:DMG: AttributeReportIB = + [1666940828.515272][9718:9718] CHIP:DMG: { + [1666940828.515275][9718:9718] CHIP:DMG: AttributeDataIB = + [1666940828.515277][9718:9718] CHIP:DMG: { + [1666940828.515280][9718:9718] CHIP:DMG: DataVersion = 0xb4a9126f, + [1666940828.515282][9718:9718] CHIP:DMG: AttributePathIB = + [1666940828.515285][9718:9718] CHIP:DMG: { + [1666940828.515288][9718:9718] CHIP:DMG: Endpoint = 0x1, + [1666940828.515290][9718:9718] CHIP:DMG: Cluster = 0x50, + [1666940828.515293][9718:9718] CHIP:DMG: Attribute = 0x0000_0005, + [1666940828.515295][9718:9718] CHIP:DMG: } + [1666940828.515298][9718:9718] CHIP:DMG: + [1666940828.515301][9718:9718] CHIP:DMG: Data = NULL + [1666940828.515304][9718:9718] CHIP:DMG: }, + [1666940828.515307][9718:9718] CHIP:DMG: + [1666940828.515309][9718:9718] CHIP:DMG: }, + [1666940828.515312][9718:9718] CHIP:DMG: + [1666940828.515314][9718:9718] CHIP:DMG: ], + [1666940828.515317][9718:9718] CHIP:DMG: + [1666940828.515320][9718:9718] CHIP:DMG: SuppressResponse = true, + [1666940828.515322][9718:9718] CHIP:DMG: InteractionModelRevision = 1 + ./chip-tool modeselect read start-up-mode 1 1 Verify the "StartUpMode response" on the TH (all-cluster-app) log: diff --git a/src/app/tests/suites/certification/Test_TC_OO_2_6.yaml b/src/app/tests/suites/certification/Test_TC_OO_2_6.yaml new file mode 100644 index 00000000000000..b133e1f77541b9 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_OO_2_6.yaml @@ -0,0 +1,58 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: 4.1.6. [TC-OO-2.6] OffOnly Feature with DUT as Server + +PICS: + - OO.S + - OO.S.F02 + +config: + nodeId: 0x12344321 + cluster: "On/Off" + endpoint: 1 + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: "DelayCommands" + command: "WaitForCommissionee" + arguments: + values: + - name: "nodeId" + value: nodeId + + - label: "Step 1: TH reads the FeatureMap attribute from DUT" + PICS: OO.S.F02 + command: "readAttribute" + attribute: "FeatureMap" + response: + constraints: + type: bitmap32 + hasMasksSet: [0x4] + + - label: + "Step 2: TH sends On command to the On/Off Cluster of DUT on + PIXIT.OO.ENDPOINT" + PICS: OO.S.F02 && OO.S.C01.Rsp + command: "On" + response: + error: UNSUPPORTED_COMMAND + + - label: + "Step 3: TH sends Toggle command to the On/Off Cluster of DUT on + PIXIT.OO.ENDPOINT" + PICS: OO.S.F02 && OO.S.C02.Rsp + command: "Toggle" + response: + error: UNSUPPORTED_COMMAND diff --git a/src/app/tests/suites/certification/Test_TC_PWRTL_1_1.yaml b/src/app/tests/suites/certification/Test_TC_PWRTL_1_1.yaml index ad4fb3aaa031ca..5d64bedf47ebb3 100644 --- a/src/app/tests/suites/certification/Test_TC_PWRTL_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_PWRTL_1_1.yaml @@ -11,7 +11,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -# Auto-generated scripts for harness use only, please review before automation. The endpoints and cluster names are currently set to default name: 44.1.1. [TC-PWRTL-1.1] Global Attributes with DUT as Server @@ -88,7 +87,7 @@ tests: hasMasksSet: [0x4, 0x8] - label: "Step 4a: TH reads AttributeList from DUT" - PICS: "!PWRTL.S.F02 && !PWRTL.S.F03" + PICS: " !PWRTL.S.F02 && !PWRTL.S.F03 " command: "readAttribute" attribute: "AttributeList" response: @@ -99,7 +98,7 @@ tests: - label: "Step 4b: TH reads feature dependent attribute(AvailableEndpoints) AttributeList from DUT" - PICS: "PWRTL.S.F02 && !PWRTL.S.F03" + PICS: PWRTL.S.F02 command: "readAttribute" attribute: "AttributeList" response: diff --git a/src/app/tests/suites/certification/Test_TC_SWTCH_3_2.yaml b/src/app/tests/suites/certification/Test_TC_SWTCH_3_2.yaml index be4f2a4683de38..1a2009c320365e 100644 --- a/src/app/tests/suites/certification/Test_TC_SWTCH_3_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_SWTCH_3_2.yaml @@ -28,6 +28,17 @@ tests: - label: "Note" verification: | For DUT as client test cases, Chip-tool command used below are an example to verify the functionality. For certification test, we expect DUT should have a capability or way to run the equivalent command. + + Execute the below mentioned command to put TH(Reference app) into a commissionable state in RPI platform, Pls use equivalent command on the respective platform + ./chip-all-clusters-app --trace_decode 1 + + Once TH reach the commissionable state pls send below mentioned command on DUT(chip-tool) in RPI platform. Pls use equivalent command on the respective platform + + ./chip-tool pairing onnetwork 1 20202021 --trace_decode 1 + + Verify the commissioning completed with success on DUT(Chip-tool) + + [1650455358.501816][4366:4371] CHIP:TOO: Device commissioning completed with success disabled: true - label: "Note" @@ -99,6 +110,14 @@ tests: no messages needed, TH checks consistency of PICS flags disabled: true + - label: + "Step 0h: FAIL the test - when supporting SWTCH.C.F02(MSR) the + SWTCH.C.F05(AS) must not be supported" + PICS: SWTCH.C.F02 && SWTCH.C.F05 + verification: | + no messages needed, TH checks consistency of PICS flags + disabled: true + - label: "Step 1a: Commission DUT to TH. Use client mechanism to set it up so switch state can be observed (e.g. UI shows state of switch) and/or @@ -230,83 +249,42 @@ tests: [1659621148.832380][8590:8590] CHIP:ZCL: SwitchServer: OnSwitchLatch [1659621148.832494][8590:8590] CHIP:EVL: LogEvent event number: 0x0000000000000007 priority: 1, endpoint id: 0x1 cluster id: 0x0000_003B event id: 0x0 Sys timestamp: 0x00000000022D0CBB - In parallel to this Check the CurrentPosition value. + DUT Reads the CurrentPosition value. ./chip-tool switch read current-position 1 1 - Verify CurrentPosition value is 1 on TH (all-cluster-app) logs - - [1686292319.379553][30986:30986] CHIP:DMG: ReportDataMessage = - [1686292319.379564][30986:30986] CHIP:DMG: { - [1686292319.379572][30986:30986] CHIP:DMG: AttributeReportIBs = - [1686292319.379590][30986:30986] CHIP:DMG: [ - [1686292319.379599][30986:30986] CHIP:DMG: AttributeReportIB = - [1686292319.379616][30986:30986] CHIP:DMG: { - [1686292319.379625][30986:30986] CHIP:DMG: AttributeDataIB = - [1686292319.379637][30986:30986] CHIP:DMG: { - [1686292319.379648][30986:30986] CHIP:DMG: DataVersion = 0xbae40564, - [1686292319.379659][30986:30986] CHIP:DMG: AttributePathIB = - [1686292319.379670][30986:30986] CHIP:DMG: { - [1686292319.379682][30986:30986] CHIP:DMG: Endpoint = 0x1, - [1686292319.379695][30986:30986] CHIP:DMG: Cluster = 0x3b, - [1686292319.379707][30986:30986] CHIP:DMG: Attribute = 0x0000_0001, - [1686292319.379717][30986:30986] CHIP:DMG: } - [1686292319.379731][30986:30986] CHIP:DMG: - [1686292319.379744][30986:30986] CHIP:DMG: Data = 1, - [1686292319.379754][30986:30986] CHIP:DMG: }, - [1686292319.379769][30986:30986] CHIP:DMG: - [1686292319.379778][30986:30986] CHIP:DMG: }, - [1686292319.379794][30986:30986] CHIP:DMG: - [1686292319.379803][30986:30986] CHIP:DMG: ], - [1686292319.379819][30986:30986] CHIP:DMG: - [1686292319.379829][30986:30986] CHIP:DMG: SuppressResponse = true, - [1686292319.379839][30986:30986] CHIP:DMG: InteractionModelRevision = 1 - [1686292319.379847][30986:30986] CHIP:DMG: } - - - TH simulates operation of the switch by changing state (attribute CurrentPosition) from 1 to 0 and read the CurrentPosition attribute + Verify CurrentPosition value is 1 on DUT (chip-tool) : + + [1722927679.396] [30503:30505] [DMG] } + [1722927679.396] [30503:30505] [TOO] Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001 DataVersion: 1761848624 + [1722927679.397] [30503:30505] [TOO] CurrentPosition: 1 + + + TH simulates operation of the switch by changing state (attribute CurrentPosition) from 1 to 0 and DUT reads the CurrentPosition attribute After 10 seconds, repeat the command with /tmp/chip_all_clusters_fifo using with value 0 as position echo '{"Name":"SwitchLatched","NewPosition":0}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + Verify SwitchLatched event with NewPosition set to 0 on TH(all-cluster-app) log: + [1686292713.872327][30986:30989] CHIP:-: Received payload: "{"Name":"SwitchLatched","NewPosition":0}" [1686292713.872583][30986:30986] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to bae40566 [1686292713.872617][30986:30986] CHIP:-: The latching switch is moved to a new position:0 [1686292713.872629][30986:30986] CHIP:ZCL: SwitchServer: OnSwitchLatch + DUT Reads the CurrentPosition value. + ./chip-tool switch read current-position 1 1 - Verify CurrentPosition value is 0 on TH (all-cluster-app) logs - - [1686293150.796547][30986:30986] CHIP:DMG: ReportDataMessage = - [1686293150.796549][30986:30986] CHIP:DMG: { - [1686293150.796551][30986:30986] CHIP:DMG: AttributeReportIBs = - [1686293150.796555][30986:30986] CHIP:DMG: [ - [1686293150.796557][30986:30986] CHIP:DMG: AttributeReportIB = - [1686293150.796561][30986:30986] CHIP:DMG: { - [1686293150.796564][30986:30986] CHIP:DMG: AttributeDataIB = - [1686293150.796567][30986:30986] CHIP:DMG: { - [1686293150.796570][30986:30986] CHIP:DMG: DataVersion = 0xbae40566, - [1686293150.796572][30986:30986] CHIP:DMG: AttributePathIB = - [1686293150.796575][30986:30986] CHIP:DMG: { - [1686293150.796578][30986:30986] CHIP:DMG: Endpoint = 0x1, - [1686293150.796581][30986:30986] CHIP:DMG: Cluster = 0x3b, - [1686293150.796584][30986:30986] CHIP:DMG: Attribute = 0x0000_0001, - [1686293150.796587][30986:30986] CHIP:DMG: } - [1686293150.796590][30986:30986] CHIP:DMG: - [1686293150.796594][30986:30986] CHIP:DMG: Data = 0, - [1686293150.796597][30986:30986] CHIP:DMG: }, - [1686293150.796601][30986:30986] CHIP:DMG: - [1686293150.796603][30986:30986] CHIP:DMG: }, - [1686293150.796607][30986:30986] CHIP:DMG: - [1686293150.796609][30986:30986] CHIP:DMG: ], - [1686293150.796613][30986:30986] CHIP:DMG: - [1686293150.796616][30986:30986] CHIP:DMG: SuppressResponse = true, - [1686293150.796618][30986:30986] CHIP:DMG: InteractionModelRevision = 1 - [1686293150.796620][30986:30986] CHIP:DMG: } - - Repeat the above Steps over 1 minute period of time + Verify CurrentPosition value is 0 on DUT (chip-tool) : + + [1722927891.728] [30554:30556] [DMG] } + [1722927891.728] [30554:30556] [TOO] Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001 DataVersion: 1761848625 + [1722927891.729] [30554:30556] [TOO] CurrentPosition: 0 + + + Repeat the above Steps over 1 minute period of time by changing the New Position 1 to 0 and 0 to 1. AND DUT reads Current position value regularly. disabled: true - label: @@ -329,32 +307,99 @@ tests: [1659621148.832494][8590:8590] CHIP:EVL: LogEvent event number: 0x0000000000000007 priority: 1, endpoint id: 0x1 cluster id: 0x0000_003B event id: 0x0 Sys timestamp: 0x00000000022D0CBB Send the SwitchLatched event on every change of position + ./chip-tool switch read-event switch-latched 1 1 - Verify SwitchLatched Position is changing for 0 to 1 on DUT(chip-tool) Log: - - [1659680091.150093][2592:2597] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 - [1659680091.150114][2592:2597] CHIP:TOO: Event number: 6 - [1659680091.150135][2592:2597] CHIP:TOO: Priority: Info - [1659680091.150155][2592:2597] CHIP:TOO: Timestamp: 2402459 - [1659680091.150180][2592:2597] CHIP:TOO: SwitchLatched: { - [1659680091.150202][2592:2597] CHIP:TOO: NewPosition: 1 - [1659680091.150222][2592:2597] CHIP:TOO: } - [1659680091.150302][2592:2597] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 - [1659680091.150324][2592:2597] CHIP:TOO: Event number: 7 - [1659680091.150345][2592:2597] CHIP:TOO: Priority: Info - [1659680091.150365][2592:2597] CHIP:TOO: Timestamp: 2431571 - [1659680091.150390][2592:2597] CHIP:TOO: SwitchLatched: { - [1659680091.150411][2592:2597] CHIP:TOO: NewPosition: 0 - [1659680091.150432][2592:2597] CHIP:TOO: } - [1659680091.150509][2592:2597] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 - [1659680091.150531][2592:2597] CHIP:TOO: Event number: 8 - [1659680091.150551][2592:2597] CHIP:TOO: Priority: Info - [1659680091.150572][2592:2597] CHIP:TOO: Timestamp: 2456884 - [1659680091.150597][2592:2597] CHIP:TOO: SwitchLatched: { - [1659680091.150630][2592:2597] CHIP:TOO: NewPosition: 1 <= this value will change for every change in position of simulated switch + Verify SwitchLatched event with NewPosition is changing for 0 to 1 on DUT(chip-tool) Log: + + [1722928087.971] [30606:30608] [DMG] SuppressResponse = true, + [1722928087.971] [30606:30608] [DMG] InteractionModelRevision = 11 + [1722928087.972] [30606:30608] [DMG] } + [1722928087.972] [30606:30608] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 + [1722928087.972] [30606:30608] [TOO] Event number: 65540 + [1722928087.973] [30606:30608] [TOO] Priority: Info + [1722928087.973] [30606:30608] [TOO] Timestamp: 1722927614282 + [1722928087.973] [30606:30608] [TOO] SwitchLatched: { + [1722928087.973] [30606:30608] [TOO] NewPosition: 0 + [1722928087.973] [30606:30608] [TOO] } + [1722928087.973] [30606:30608] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 + [1722928087.974] [30606:30608] [TOO] Event number: 65541 + [1722928087.974] [30606:30608] [TOO] Priority: Info + [1722928087.974] [30606:30608] [TOO] Timestamp: 1722927671837 + [1722928087.974] [30606:30608] [TOO] SwitchLatched: { + [1722928087.974] [30606:30608] [TOO] NewPosition: 1 + [1722928087.974] [30606:30608] [TOO] } + [1722928087.974] [30606:30608] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 + [1722928087.974] [30606:30608] [TOO] Event number: 65542 + [1722928087.974] [30606:30608] [TOO] Priority: Info + [1722928087.975] [30606:30608] [TOO] Timestamp: 1722927866804 + [1722928087.975] [30606:30608] [TOO] SwitchLatched: { + [1722928087.975] [30606:30608] [TOO] NewPosition: 0 + [1722928087.975] [30606:30608] [TOO] } + [1722928087.975] [30606:30608] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 + [1722928087.975] [30606:30608] [TOO] Event number: 65543 + [1722928087.975] [30606:30608] [TOO] Priority: Info + [1722928087.975] [30606:30608] [TOO] Timestamp: 1722928067383 + [1722928087.975] [30606:30608] [TOO] SwitchLatched: { + [1722928087.976] [30606:30608] [TOO] NewPosition: 1 + [1722928087.976] [30606:30608] [TOO] } + After 10 seconds, Send the above commands with NewPosition set to 0 + + echo '{"Name":"SwitchLatched","NewPosition":0}' > /tmp/chip_all_clusters_fifo_ + + Verify SwitchLatched event with NewPosition set to 0 on TH(all-cluster-app) log: + + [1722602668.258] [211132:211134] [-] Received payload: "{"Name":"SwitchLatched","NewPosition":0}" + [1722602668.258] [211132:211132] [-] The latching switch is moved to a new position:0 + [1722602668.258] [211132:211132] [ZCL] SwitchServer: OnSwitchLatch + + ./chip-tool switch read-event switch-latched 1 1 + + Verify SwitchLatched event with NewPosition is changing for 1 to 0 on DUT(chip-tool) Log: + + [1722928245.303] [30654:30656] [DMG] SuppressResponse = true, + [1722928245.303] [30654:30656] [DMG] InteractionModelRevision = 11 + [1722928245.303] [30654:30656] [DMG] } + [1722928245.304] [30654:30656] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 + [1722928245.304] [30654:30656] [TOO] Event number: 65540 + [1722928245.304] [30654:30656] [TOO] Priority: Info + [1722928245.304] [30654:30656] [TOO] Timestamp: 1722927614282 + [1722928245.305] [30654:30656] [TOO] SwitchLatched: { + [1722928245.305] [30654:30656] [TOO] NewPosition: 0 + [1722928245.305] [30654:30656] [TOO] } + [1722928245.305] [30654:30656] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 + [1722928245.305] [30654:30656] [TOO] Event number: 65541 + [1722928245.305] [30654:30656] [TOO] Priority: Info + [1722928245.305] [30654:30656] [TOO] Timestamp: 1722927671837 + [1722928245.306] [30654:30656] [TOO] SwitchLatched: { + [1722928245.306] [30654:30656] [TOO] NewPosition: 1 + [1722928245.306] [30654:30656] [TOO] } + [1722928245.306] [30654:30656] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 + [1722928245.306] [30654:30656] [TOO] Event number: 65542 + [1722928245.306] [30654:30656] [TOO] Priority: Info + [1722928245.306] [30654:30656] [TOO] Timestamp: 1722927866804 + [1722928245.306] [30654:30656] [TOO] SwitchLatched: { + [1722928245.307] [30654:30656] [TOO] NewPosition: 0 + [1722928245.307] [30654:30656] [TOO] } + [1722928245.307] [30654:30656] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 + [1722928245.307] [30654:30656] [TOO] Event number: 65543 + [1722928245.307] [30654:30656] [TOO] Priority: Info + [1722928245.307] [30654:30656] [TOO] Timestamp: 1722928067383 + [1722928245.307] [30654:30656] [TOO] SwitchLatched: { + [1722928245.307] [30654:30656] [TOO] NewPosition: 1 + [1722928245.307] [30654:30656] [TOO] } + [1722928245.308] [30654:30656] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 + [1722928245.308] [30654:30656] [TOO] Event number: 65544 + [1722928245.308] [30654:30656] [TOO] Priority: Info + [1722928245.308] [30654:30656] [TOO] Timestamp: 1722928209578 + [1722928245.308] [30654:30656] [TOO] SwitchLatched: { + [1722928245.308] [30654:30656] [TOO] NewPosition: 0 + [1722928245.308] [30654:30656] [TOO] } + + + Repeat above Steps back every 10 seconds (over a 1 minute period) by changing the New Position 1 to 0 and 0 to 1 disabled: true @@ -375,13 +420,12 @@ tests: - label: "Step 3b: DUT reads global attribute FeatureMap" PICS: SWTCH.C.F01 verification: | - Note : Please skip this step if LATCH SWITCH feature is implemented, because a device can support either a latching switch(LS) or MS, MSR, MSL, MSM. - - In Raspi platform LS feature is implemented, So below mentioned log is for reference only + Note : Please skip this step if LATCH SWITCH feature is implemented, because a device can support either a latching switch(LS) or MS, MSR, MSL, MSM or MS, MSL, MSM, AS ./chip-tool switch read feature-map 1 1 - Verify FeatureMap value is 30 On TH (all-clusters-app) log + Verify FeatureMap value is 30 If (MS, MSR, MSL, MSM) features are supported or + Value is 58 If (MS, MSL, MSM, AS) feature are supported On TH (all-clusters-app) log CHIP:DMG: ReportDataMessage = [1671450600.457719][8426:8426] CHIP:DMG: { @@ -399,7 +443,7 @@ tests: [1671450600.458108][8426:8426] CHIP:DMG: Attribute = 0x0000_FFFC, [1671450600.458122][8426:8426] CHIP:DMG: } [1671450600.458137][8426:8426] CHIP:DMG: - [1671450600.458151][8426:8426] CHIP:DMG: Data = 30, + [1671450600.458151][8426:8426] CHIP:DMG: Data = 58, [1671450600.458161][8426:8426] CHIP:DMG: }, [1671450600.458179][8426:8426] CHIP:DMG: [1671450600.458188][8426:8426] CHIP:DMG: }, @@ -416,7 +460,7 @@ tests: verification: | ./chip-tool switch read number-of-positions 1 1 - Verify NumberOfPositions value is 2 in TH (all-clusters-app) log + Verify NumberOfPositions value is 2 On TH (all-clusters-app) log DMG: ReportDataMessage = [1671450651.817816][8426:8426] CHIP:DMG: { @@ -447,9 +491,8 @@ tests: disabled: true - label: - "Step 3d: DUT sets up eventing (InitialPress and ShortRelease; if - SWTCH.C.F03(MSL) also LongPress and LongRelease) so it will receive - events when the switch is operated" + "Step 3d: DUT subscribes to all switch events on the endpoint, so it + will receive events when the switch is operated" PICS: SWTCH.C.F01 && SWTCH.C.M.SwitchStateEventing verification: | Note : Please skip this step if LATCH SWITCH feature is implemented, because a device can support either a latching switch or a momentary switch. @@ -469,78 +512,89 @@ tests: Verify InitialPress event with NewPosition set to 0 on DUT(chip-tool) log: - [1659683181.743214][2829:2835] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 - [1659683181.743251][2829:2835] CHIP:TOO: Event number: 10 - [1659683181.743285][2829:2835] CHIP:TOO: Priority: Info - [1659683181.743319][2829:2835] CHIP:TOO: Timestamp: 4066882 - [1659683181.743419][2829:2835] CHIP:TOO: InitialPress: { - [1659683181.743470][2829:2835] CHIP:TOO: NewPosition: 0 - [1659683181.743506][2829:2835] CHIP:TOO: } + [1722928508.108] [30722:30724] [DMG] SuppressResponse = true, + [1722928508.108] [30722:30724] [DMG] InteractionModelRevision = 11 + [1722928508.108] [30722:30724] [DMG] } + [1722928508.109] [30722:30724] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 + [1722928508.109] [30722:30724] [TOO] Event number: 65545 + [1722928508.109] [30722:30724] [TOO] Priority: Info + [1722928508.109] [30722:30724] [TOO] Timestamp: 1722928471541 + [1722928508.110] [30722:30724] [TOO] InitialPress: { + [1722928508.110] [30722:30724] [TOO] NewPosition: 0 + [1722928508.110] [30722:30724] [TOO] } echo '{"Name":"ShortRelease","PreviousPosition":0}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) Verify ShortRelease event with PreviousPosition set to 0 on TH(all-cluster-app) log: - [1659683678.805455][2530:2538] CHIP:-: Received payload: "{"Name":"ShortRelease","PreviousPosition":0}" - [1659683678.805739][2530:2530] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to ee5e7715 - [1659683678.805777][2530:2530] CHIP:-: The the previous value of the CurrentPosition when the momentary switch has been released:1 - [1659683678.805858][2530:2530] CHIP:ZCL: SwitchServer: OnShortRelease + [1722928571.190] [29970:29972] [-] Received payload: "{"Name":"ShortRelease","PreviousPosition":0}" + [1722928571.191] [29970:29970] [-] The the previous value of the CurrentPosition when the momentary switch has been released:0 + [1722928571.191] [29970:29970] [ZCL] SwitchServer: OnShortRelease ./chip-tool switch read-event short-release 1 1 Verify ShortRelease event with PreviousPosition set to 0 on DUT(chip-tool) log: - [1659683195.217253][2838:2843] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0003 - [1659683195.217275][2838:2843] CHIP:TOO: Event number: 11 - [1659683195.217294][2838:2843] CHIP:TOO: Priority: Info - [1659683195.217313][2838:2843] CHIP:TOO: Timestamp: 4137135 - [1659683195.217377][2838:2843] CHIP:TOO: ShortRelease: { - [1659683195.217411][2838:2843] CHIP:TOO: PreviousPosition: 0 - [1659683195.217432][2838:2843] CHIP:TOO: } + [1722928663.399] [30761:30763] [DMG] SuppressResponse = true, + [1722928663.399] [30761:30763] [DMG] InteractionModelRevision = 11 + [1722928663.399] [30761:30763] [DMG] } + [1722928663.400] [30761:30763] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0003 + [1722928663.400] [30761:30763] [TOO] Event number: 65546 + [1722928663.400] [30761:30763] [TOO] Priority: Info + [1722928663.400] [30761:30763] [TOO] Timestamp: 1722928571191 + [1722928663.400] [30761:30763] [TOO] ShortRelease: { + [1722928663.400] [30761:30763] [TOO] PreviousPosition: 0 + [1722928663.400] [30761:30763] [TOO] } - if SWTCH.C.F03, also: echo '{"Name":"LongPress","NewPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) Verify LongPress event with NewPosition set to 1 on TH(all-cluster-app) log: - [1686294416.290491][30986:30989] CHIP:-: Received payload: "{"Name":"LongPress","NewPosition":1}" - [1686294416.290729][30986:30986] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to bae40568 - [1686294416.290761][30986:30986] CHIP:-: The new position when the momentary switch has been pressed for a long time:1 - [1686294416.290775][30986:30986] CHIP:ZCL: SwitchServer: OnLongPress + [1722928724.336] [29970:29972] [-] Received payload: "{"Name":"LongPress","NewPosition":1}" + [1722928724.336] [29970:29970] [DMG] Endpoint 1, Cluster 0x0000_003B update version to 6903ad34 + [1722928724.337] [29970:29970] [-] The new position when the momentary switch has been pressed for a long time:1 + [1722928724.337] [29970:29970] [ZCL] SwitchServer: OnLongPress ./chip-tool switch read-event long-press 1 1 - Verify LongPress event with NewPosition set to 1 on TH(chip-tool) log: + Verify LongPress event with NewPosition set to 1 on DUT(chip-tool) log: - [1659527630.476706][4774:4779] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 - [1659527630.476742][4774:4779] CHIP:TOO: Event number: 5 - [1659527630.476771][4774:4779] CHIP:TOO: Priority: Info - [1659527630.476799][4774:4779] CHIP:TOO: Timestamp: 29687750 - [1659527630.476887][4774:4779] CHIP:TOO: LongPress: { - [1659527630.476934][4774:4779] CHIP:TOO: NewPosition: 1 - [1659527630.476969][4774:4779] CHIP:TOO: } + [1722928792.354] [30803:30805] [DMG] SuppressResponse = true, + [1722928792.354] [30803:30805] [DMG] InteractionModelRevision = 11 + [1722928792.354] [30803:30805] [DMG] } + [1722928792.354] [30803:30805] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0002 + [1722928792.354] [30803:30805] [TOO] Event number: 65547 + [1722928792.355] [30803:30805] [TOO] Priority: Info + [1722928792.355] [30803:30805] [TOO] Timestamp: 1722928724337 + [1722928792.355] [30803:30805] [TOO] LongPress: { + [1722928792.355] [30803:30805] [TOO] NewPosition: 1 + [1722928792.355] [30803:30805] [TOO] } echo '{"Name":"LongRelease","PreviousPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) Verify LongRelease event with PreviousPosition set to 1 on TH(all-cluster-app) log: - [1686294209.671991][30986:30989] CHIP:-: Received payload: "{"Name":"LongRelease","PreviousPosition":1}" - [1686294209.672192][30986:30986] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to bae40567 - [1686294209.672219][30986:30986] CHIP:-: The the previous value of the CurrentPosition when the momentary switch has been released after having been pressed for a long time:1 - [1686294209.672229][30986:30986] CHIP:ZCL: SwitchServer: OnLongRelease + [1722928835.353] [29970:29972] [-] Received payload: "{"Name":"LongRelease","PreviousPosition":1}" + [1722928835.354] [29970:29970] [DMG] Endpoint 1, Cluster 0x0000_003B update version to 6903ad35 + [1722928835.354] [29970:29970] [-] The the previous value of the CurrentPosition when the momentary switch has been released after having been pressed for a long time:1 + [1722928835.354] [29970:29970] [ZCL] SwitchServer: OnLongRelease + ./chip-tool switch read-event long-release 1 1 Verify LongRelease event with PreviousPosition set to 1 on DUT(chip-tool) log: - [1659527630.476706][4774:4779] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 - [1659527630.476742][4774:4779] CHIP:TOO: Event number: 6 - [1659527630.476771][4774:4779] CHIP:TOO: Priority: Info - [1659527630.476799][4774:4779] CHIP:TOO: Timestamp: 296889750 - [1659527630.476887][4774:4779] CHIP:TOO: LongRelease: { - [1659527630.476934][4774:4779] CHIP:TOO: PreviousPosition: 1 - [1659527630.476969][4774:4779] CHIP:TOO: } + [1722928919.331] [30840:30842] [DMG] SuppressResponse = true, + [1722928919.331] [30840:30842] [DMG] InteractionModelRevision = 11 + [1722928919.331] [30840:30842] [DMG] } + [1722928919.332] [30840:30842] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0004 + [1722928919.332] [30840:30842] [TOO] Event number: 65550 + [1722928919.332] [30840:30842] [TOO] Priority: Info + [1722928919.332] [30840:30842] [TOO] Timestamp: 1722928835354 + [1722928919.332] [30840:30842] [TOO] LongRelease: { + [1722928919.332] [30840:30842] [TOO] PreviousPosition: 1 + [1722928919.332] [30840:30842] [TOO] } disabled: true - label: @@ -555,96 +609,51 @@ tests: On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) - change state from 0 to 1 + Change the Current Position from 0 to 1 echo '{"Name":"InitialPress","NewPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) Verify InitialPress event with NewPosition set to 1 on TH(all-cluster-app) log: - [1659624126.646996][8590:8596] CHIP:-: Received payload: "{"Name":"InitialPress","NewPosition":1}" - [1659624126.647380][8590:8590] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to 4be58f55 - [1659624126.647438][8590:8590] CHIP:-: The new position when the momentary switch starts to be pressed:1 - [1659624126.647480][8590:8590] CHIP:ZCL: SwitchServer: OnInitialPress + [1722929050.475] [29970:29972] [-] Received payload: "{"Name":"InitialPress","NewPosition":1}" + [1722929050.476] [29970:29970] [DMG] Endpoint 1, Cluster 0x0000_003B update version to 6903ad36 + [1722929050.476] [29970:29970] [-] The new position when the momentary switch starts to be pressed:1 + [1722929050.476] [29970:29970] [ZCL] SwitchServer: OnInitialPress - wait 10 seconds, Read the CurrentPosition attribute + DUT Reads the CurrentPosition attribute ./chip-tool switch read current-position 1 1 - Verify CurrentPosition value is 1 On TH(all-cluster-app) log - - [1686294581.633942][30986:30986] CHIP:DMG: ReportDataMessage = - [1686294581.633954][30986:30986] CHIP:DMG: { - [1686294581.633961][30986:30986] CHIP:DMG: AttributeReportIBs = - [1686294581.633979][30986:30986] CHIP:DMG: [ - [1686294581.633987][30986:30986] CHIP:DMG: AttributeReportIB = - [1686294581.634004][30986:30986] CHIP:DMG: { - [1686294581.634014][30986:30986] CHIP:DMG: AttributeDataIB = - [1686294581.634025][30986:30986] CHIP:DMG: { - [1686294581.634038][30986:30986] CHIP:DMG: DataVersion = 0xbae40569, - [1686294581.634048][30986:30986] CHIP:DMG: AttributePathIB = - [1686294581.634059][30986:30986] CHIP:DMG: { - [1686294581.634071][30986:30986] CHIP:DMG: Endpoint = 0x1, - [1686294581.634083][30986:30986] CHIP:DMG: Cluster = 0x3b, - [1686294581.634095][30986:30986] CHIP:DMG: Attribute = 0x0000_0001, - [1686294581.634119][30986:30986] CHIP:DMG: } - [1686294581.634124][30986:30986] CHIP:DMG: - [1686294581.634127][30986:30986] CHIP:DMG: Data = 1, - [1686294581.634130][30986:30986] CHIP:DMG: }, - [1686294581.634134][30986:30986] CHIP:DMG: - [1686294581.634136][30986:30986] CHIP:DMG: }, - [1686294581.634141][30986:30986] CHIP:DMG: - [1686294581.634143][30986:30986] CHIP:DMG: ], - [1686294581.634147][30986:30986] CHIP:DMG: - [1686294581.634150][30986:30986] CHIP:DMG: SuppressResponse = true, - [1686294581.634152][30986:30986] CHIP:DMG: InteractionModelRevision = 1 - [1686294581.634154][30986:30986] CHIP:DMG: } + Verify CurrentPosition value is 1 On DUT(Chip-tool) log - After 0.2 seconds, send this command + [1722929078.688] [30886:30888] [DMG] } + [1722929078.688] [30886:30888] [TOO] Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001 DataVersion: 1761848630 + [1722929078.689] [30886:30888] [TOO] CurrentPosition: 1 - echo '{"Name":"ShortRelease","PreviousPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + Wait 0.2 seconds, send this command - Verify ShortRelease event with PreviousPosition set to 1 on TH(all-cluster-app) log: + echo '{"Name":"InitialPress","NewPosition":0}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + + Verify InitialPress event with NewPosition set to 0 on TH(all-cluster-app) log: - [1659683678.805455][2530:2538] CHIP:-: Received payload: "{"Name":"ShortRelease","PreviousPosition":1}" - [1659683678.805739][2530:2530] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to ee5e7715 - [1659683678.805777][2530:2530] CHIP:-: The the previous value of the CurrentPosition when the momentary switch has been released:1 - [1659683678.805858][2530:2530] CHIP:ZCL: SwitchServer: OnShortRelease + [1722929478.278] [29970:29972] [-] Received payload: "{"Name":"InitialPress","NewPosition":0}" + [1722929478.279] [29970:29970] [-] The new position when the momentary switch starts to be pressed:0 + [1722929478.279] [29970:29970] [ZCL] SwitchServer: OnInitialPress - wait 10 seconds, Read the CurrentPosition attribute + DUT Reads the CurrentPosition attribute ./chip-tool switch read current-position 1 1 - Verify CurrentPosition value is 0 On TH(all-cluster-app) log - - [1686294592.640335][30986:30986] CHIP:DMG: ReportDataMessage = - [1686294592.640348][30986:30986] CHIP:DMG: { - [1686294592.640360][30986:30986] CHIP:DMG: AttributeReportIBs = - [1686294592.640386][30986:30986] CHIP:DMG: [ - [1686294592.640397][30986:30986] CHIP:DMG: AttributeReportIB = - [1686294592.640425][30986:30986] CHIP:DMG: { - [1686294592.640440][30986:30986] CHIP:DMG: AttributeDataIB = - [1686294592.640456][30986:30986] CHIP:DMG: { - [1686294592.640474][30986:30986] CHIP:DMG: DataVersion = 0xbae4056a, - [1686294592.640490][30986:30986] CHIP:DMG: AttributePathIB = - [1686294592.640507][30986:30986] CHIP:DMG: { - [1686294592.640525][30986:30986] CHIP:DMG: Endpoint = 0x1, - [1686294592.640543][30986:30986] CHIP:DMG: Cluster = 0x3b, - [1686294592.640563][30986:30986] CHIP:DMG: Attribute = 0x0000_0001, - [1686294592.640580][30986:30986] CHIP:DMG: } - [1686294592.640602][30986:30986] CHIP:DMG: - [1686294592.640619][30986:30986] CHIP:DMG: Data = 0, - [1686294592.640633][30986:30986] CHIP:DMG: }, - [1686294592.640658][30986:30986] CHIP:DMG: - [1686294592.640668][30986:30986] CHIP:DMG: }, - [1686294592.640690][30986:30986] CHIP:DMG: - [1686294592.640702][30986:30986] CHIP:DMG: ], - [1686294592.640726][30986:30986] CHIP:DMG: - [1686294592.640739][30986:30986] CHIP:DMG: SuppressResponse = true, - [1686294592.640755][30986:30986] CHIP:DMG: InteractionModelRevision = 1 - [1686294592.640768][30986:30986] CHIP:DMG: } - - - Repeat above steps over 1 minute period of time + Verify CurrentPosition value is 0 On DUT(Chip-tool) log + + [1722929193.246] [30917:30919] [DMG] } + [1722929193.247] [30917:30919] [TOO] Endpoint: 1 Cluster: 0x0000_003B Attribute 0x0000_0001 DataVersion: 1761848631 + [1722929193.247] [30917:30919] [TOO] CurrentPosition: 0 + + + Wait 10 seconds + + Repeat above steps over 1 minute period of time and DUT reads attribute CurrentPosition regularly. disabled: true - label: @@ -664,22 +673,32 @@ tests: Verify InitialPress event with NewPosition set to 1 on TH(all-cluster-app) log: - [1659624126.646996][8590:8596] CHIP:-: Received payload: "{"Name":"InitialPress","NewPosition":1}" - [1659624126.647380][8590:8590] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to 4be58f55 - [1659624126.647438][8590:8590] CHIP:-: The new position when the momentary switch starts to be pressed:1 - [1659624126.647480][8590:8590] CHIP:ZCL: SwitchServer: OnInitialPress + [1722929575.814] [29970:29972] [-] Received payload: "{"Name":"InitialPress","NewPosition":1}" + [1722929575.815] [29970:29970] [DMG] Endpoint 1, Cluster 0x0000_003B update version to 6903ad38 + [1722929575.815] [29970:29970] [-] The new position when the momentary switch starts to be pressed:1 + [1722929575.815] [29970:29970] [ZCL] SwitchServer: OnInitialPress ./chip-tool switch read-event initial-press 1 1 Verify InitialPress event with NewPosition set to 1 on DUT(chip-tool) log: - [1659527630.476706][4774:4779] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 - [1659527630.476742][4774:4779] CHIP:TOO: Event number: 4 - [1659527630.476771][4774:4779] CHIP:TOO: Priority: Info - [1659527630.476799][4774:4779] CHIP:TOO: Timestamp: 29687894 - [1659527630.476887][4774:4779] CHIP:TOO: InitialPress: { - [1659527630.476934][4774:4779] CHIP:TOO: NewPosition: 1 - [1659527630.476969][4774:4779] CHIP:TOO: } + [1722929640.653] [31031:31033] [DMG] SuppressResponse = true, + [1722929640.653] [31031:31033] [DMG] InteractionModelRevision = 11 + [1722929640.653] [31031:31033] [DMG] } + [1722929640.655] [31031:31033] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 + [1722929640.655] [31031:31033] [TOO] Event number: 65553 + [1722929640.655] [31031:31033] [TOO] Priority: Info + [1722929640.655] [31031:31033] [TOO] Timestamp: 1722929478279 + [1722929640.655] [31031:31033] [TOO] InitialPress: { + [1722929640.655] [31031:31033] [TOO] NewPosition: 0 + [1722929640.655] [31031:31033] [TOO] } + [1722929640.655] [31031:31033] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 + [1722929640.655] [31031:31033] [TOO] Event number: 65554 + [1722929640.655] [31031:31033] [TOO] Priority: Info + [1722929640.655] [31031:31033] [TOO] Timestamp: 1722929575815 + [1722929640.655] [31031:31033] [TOO] InitialPress: { + [1722929640.656] [31031:31033] [TOO] NewPosition: 1 + [1722929640.656] [31031:31033] [TOO] } After 0.2 seconds, send this command @@ -687,23 +706,45 @@ tests: Verify ShortRelease event with PreviousPosition set to 1 on TH(all-cluster-app) log: - [1659684051.064329][2530:2538] CHIP:-: Received payload: "{"Name":"ShortRelease","PreviousPosition":1}" - [1659684051.064820][2530:2530] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to ee5e7716 - [1659684051.064904][2530:2530] CHIP:-: The the previous value of the CurrentPosition when the momentary switch has been released:1 - [1659684051.064994][2530:2530] CHIP:ZCL: SwitchServer: OnShortRelease + [1722929693.191] [29970:29972] [-] Received payload: "{"Name":"ShortRelease","PreviousPosition":1}" + [1722929693.192] [29970:29970] [DMG] Endpoint 1, Cluster 0x0000_003B update version to 6903ad39 + [1722929693.192] [29970:29970] [-] The the previous value of the CurrentPosition when the momentary switch has been released:1 + [1722929693.192] [29970:29970] [ZCL] SwitchServer: OnShortRelease + ./chip-tool switch read-event short-release 1 1 Verify ShortRelease event with PreviousPosition set to 1 on DUT(chip-tool) log: - [1659527630.476706][4774:4779] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 - [1659527630.476742][4774:4779] CHIP:TOO: Event number: 5 - [1659527630.476771][4774:4779] CHIP:TOO: Priority: Info - [1659527630.476799][4774:4779] CHIP:TOO: Timestamp: 29688000 - [1659527630.476887][4774:4779] CHIP:TOO: ShortRelease: { - [1659527630.476934][4774:4779] CHIP:TOO: PreviousPosition: 1 - [1659527630.476969][4774:4779] CHIP:TOO: } - Repeat above steps over a 1 minute period of time + [1722929736.542] [31062:31064] [DMG] SuppressResponse = true, + [1722929736.542] [31062:31064] [DMG] InteractionModelRevision = 11 + [1722929736.542] [31062:31064] [DMG] } + [1722929736.542] [31062:31064] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0003 + [1722929736.542] [31062:31064] [TOO] Event number: 65546 + [1722929736.542] [31062:31064] [TOO] Priority: Info + [1722929736.542] [31062:31064] [TOO] Timestamp: 1722928571191 + [1722929736.543] [31062:31064] [TOO] ShortRelease: { + [1722929736.543] [31062:31064] [TOO] PreviousPosition: 0 + [1722929736.543] [31062:31064] [TOO] } + [1722929736.543] [31062:31064] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0003 + [1722929736.543] [31062:31064] [TOO] Event number: 65552 + [1722929736.543] [31062:31064] [TOO] Priority: Info + [1722929736.543] [31062:31064] [TOO] Timestamp: 1722929159932 + [1722929736.543] [31062:31064] [TOO] ShortRelease: { + [1722929736.543] [31062:31064] [TOO] PreviousPosition: 1 + [1722929736.543] [31062:31064] [TOO] } + [1722929736.544] [31062:31064] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0003 + [1722929736.544] [31062:31064] [TOO] Event number: 65555 + [1722929736.544] [31062:31064] [TOO] Priority: Info + [1722929736.544] [31062:31064] [TOO] Timestamp: 1722929693192 + [1722929736.544] [31062:31064] [TOO] ShortRelease: { + [1722929736.544] [31062:31064] [TOO] PreviousPosition: 1 + [1722929736.544] [31062:31064] [TOO] } + + + Wait 10 Seconds + + Repeat above steps over a 1 minute period of time. disabled: true - label: @@ -724,68 +765,445 @@ tests: Verify InitialPress event with NewPosition set to 1 on TH(all-cluster-app) log: - [1686295316.319181][30986:30989] CHIP:-: Received payload: "{"Name":"InitialPress","NewPosition":1}" - [1686295316.319478][30986:30986] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to bae4056b - [1686295316.319509][30986:30986] CHIP:-: The new position when the momentary switch starts to be pressed:1 - [1686295316.319518][30986:30986] CHIP:ZCL: SwitchServer: OnInitialPress + [1722929829.295] [29970:29972] [-] Received payload: "{"Name":"InitialPress","NewPosition":1}" + [1722929829.296] [29970:29970] [DMG] Endpoint 1, Cluster 0x0000_003B update version to 6903ad3a + [1722929829.296] [29970:29970] [-] The new position when the momentary switch starts to be pressed:1 + [1722929829.296] [29970:29970] [ZCL] SwitchServer: OnInitialPress ./chip-tool switch read-event initial-press 1 1 - Verify InitialPress event with NewPosition set to 1 on TH(chip-tool) log: - - [1659527630.476706][4774:4779] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 - [1659527630.476742][4774:4779] CHIP:TOO: Event number: 4 - [1659527630.476771][4774:4779] CHIP:TOO: Priority: Info - [1659527630.476799][4774:4779] CHIP:TOO: Timestamp: 29687000 - [1659527630.476887][4774:4779] CHIP:TOO: InitialPress: { - [1659527630.476934][4774:4779] CHIP:TOO: NewPosition: 1 - [1659527630.476969][4774:4779] CHIP:TOO: } + Verify InitialPress event with NewPosition set to 1 on DUT(chip-tool) log: - After 0.75 seconds, send this command + [1722929860.240] [31102:31104] [DMG] SuppressResponse = true, + [1722929860.240] [31102:31104] [DMG] InteractionModelRevision = 11 + [1722929860.240] [31102:31104] [DMG] } + [1722929860.242] [31102:31104] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 + [1722929860.242] [31102:31104] [TOO] Event number: 65553 + [1722929860.242] [31102:31104] [TOO] Priority: Info + [1722929860.242] [31102:31104] [TOO] Timestamp: 1722929478279 + [1722929860.242] [31102:31104] [TOO] InitialPress: { + [1722929860.242] [31102:31104] [TOO] NewPosition: 0 + [1722929860.242] [31102:31104] [TOO] } + [1722929860.243] [31102:31104] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 + [1722929860.243] [31102:31104] [TOO] Event number: 65554 + [1722929860.243] [31102:31104] [TOO] Priority: Info + [1722929860.243] [31102:31104] [TOO] Timestamp: 1722929575815 + [1722929860.243] [31102:31104] [TOO] InitialPress: { + [1722929860.243] [31102:31104] [TOO] NewPosition: 1 + [1722929860.243] [31102:31104] [TOO] } + [1722929860.243] [31102:31104] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 + [1722929860.243] [31102:31104] [TOO] Event number: 65557 + [1722929860.243] [31102:31104] [TOO] Priority: Info + [1722929860.243] [31102:31104] [TOO] Timestamp: 1722929829296 + [1722929860.243] [31102:31104] [TOO] InitialPress: { + [1722929860.243] [31102:31104] [TOO] NewPosition: 1 + [1722929860.243] [31102:31104] [TOO] } + + After 0.75 seconds, send below command echo '{"Name":"LongPress","NewPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) Verify LongPress event with NewPosition set to 1 on TH(all-cluster-app) log: + [1722929918.639] [29970:29972] [-] Received payload: "{"Name":"LongPress","NewPosition":1}" + [1722929918.640] [29970:29970] [-] The new position when the momentary switch has been pressed for a long time:1 + [1722929918.640] [29970:29970] [ZCL] SwitchServer: OnLongPress + + + ./chip-tool switch read-event long-press 1 1 + + Verify LongPress event with NewPosition set to 1 on DUT(chip-tool) log: + + [1722929958.750] [31129:31132] [DMG] SuppressResponse = true, + [1722929958.750] [31129:31132] [DMG] InteractionModelRevision = 11 + [1722929958.750] [31129:31132] [DMG] } + [1722929958.751] [31129:31132] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0002 + [1722929958.751] [31129:31132] [TOO] Event number: 65547 + [1722929958.751] [31129:31132] [TOO] Priority: Info + [1722929958.751] [31129:31132] [TOO] Timestamp: 1722928724337 + [1722929958.751] [31129:31132] [TOO] LongPress: { + [1722929958.751] [31129:31132] [TOO] NewPosition: 1 + [1722929958.751] [31129:31132] [TOO] } + [1722929958.751] [31129:31132] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0002 + [1722929958.752] [31129:31132] [TOO] Event number: 65558 + [1722929958.752] [31129:31132] [TOO] Priority: Info + [1722929958.752] [31129:31132] [TOO] Timestamp: 1722929918640 + [1722929958.752] [31129:31132] [TOO] LongPress: { + [1722929958.752] [31129:31132] [TOO] NewPosition: 1 + [1722929958.752] [31129:31132] [TOO] } + + After 2 seconds, send below command + + echo '{"Name":"LongRelease","PreviousPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + + Verify LonglRelease event with PreviousPosition set to 1 on TH(all-cluster-app) log: + + [1722930012.664] [29970:29972] [-] Received payload: "{"Name":"LongRelease","PreviousPosition":1}" + [1722930012.664] [29970:29970] [DMG] Endpoint 1, Cluster 0x0000_003B update version to 6903ad3b + [1722930012.664] [29970:29970] [-] The the previous value of the CurrentPosition when the momentary switch has been released after having been pressed for a long time:1 + [1722930012.664] [29970:29970] [ZCL] SwitchServer: OnLongRelease + + + ./chip-tool switch read-event long-release 1 1 + + Verify LonglRelease event with PreviousPosition set to 1 on DUT(chip-tool) log: + + [1722930054.350] [31160:31162] [DMG] SuppressResponse = true, + [1722930054.351] [31160:31162] [DMG] InteractionModelRevision = 11 + [1722930054.351] [31160:31162] [DMG] } + [1722930054.351] [31160:31162] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0004 + [1722930054.351] [31160:31162] [TOO] Event number: 65550 + [1722930054.351] [31160:31162] [TOO] Priority: Info + [1722930054.351] [31160:31162] [TOO] Timestamp: 1722928835354 + [1722930054.352] [31160:31162] [TOO] LongRelease: { + [1722930054.352] [31160:31162] [TOO] PreviousPosition: 1 + [1722930054.352] [31160:31162] [TOO] } + [1722930054.352] [31160:31162] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0004 + [1722930054.352] [31160:31162] [TOO] Event number: 65561 + [1722930054.352] [31160:31162] [TOO] Priority: Info + [1722930054.352] [31160:31162] [TOO] Timestamp: 1722930012664 + [1722930054.352] [31160:31162] [TOO] LongRelease: { + [1722930054.352] [31160:31162] [TOO] PreviousPosition: 1 + [1722930054.352] [31160:31162] [TOO] } + + + Wait 8 seconds + + Repeat above steps Over a 1 minute period of time + disabled: true + + - label: + "Step 4d: TH simulates operation of the switch by repeating these + steps (over a 1 minute period) change state (field CurrentPosition) + from 0 to 1, and send the event InitialPress (with field + NewPosition=1) wait 0.2 seconds change state (attribute + CurrentPosition) from 1 to 0, and send the event ShortRelease (with + field PreviousPosition=1) wait 0.2 seconds change state (field + CurrentPosition) from 0 to 1, and send the event InitialPress (with + field NewPosition=1) and event MultiPressOngoing(with field + NewPosition=1 and CurrentNumberOfPressesCounted=2) wait 0.2 seconds + change state (field CurrentPosition) from 1 to 0, and send the event + ShortRelease (with field PreviousPosition=1) wait 2 seconds send the + event MultiPressComplete (with field PreviousPosition=1 and + TotalNumberOfPressesCounted=2)" + PICS: + " SWTCH.C.F01 && SWTCH.C.F04 && !SWTCH.C.F05 && + SWTCH.C.M.SwitchStateEventing " + verification: | + On Raspi platform to trigger the event give the below command by opening an another terminal in DUT (Below is the example command developed in all-clusters-app to generate the event, Vendor DUT should have capability to generate this event) + + echo '{"Name":"InitialPress","NewPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + + Verify InitialPress event with NewPosition set to 1 on TH(all-cluster-app) log: + [1686295316.319181][30986:30989] CHIP:-: Received payload: "{"Name":"InitialPress","NewPosition":1}" [1686295316.319478][30986:30986] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to bae4056b [1686295316.319509][30986:30986] CHIP:-: The new position when the momentary switch starts to be pressed:1 [1686295316.319518][30986:30986] CHIP:ZCL: SwitchServer: OnInitialPress - ./chip-tool switch read-event long-press 1 1 + ./chip-tool switch read-event initial-press 1 1 - Verify LongPress event with NewPosition set to 1 on TH(chip-tool) log: + Verify InitialPress event with NewPosition set to 1 on DUT(chip-tool) log: - [1659527630.476706][4774:4779] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 - [1659527630.476742][4774:4779] CHIP:TOO: Event number: 5 - [1659527630.476771][4774:4779] CHIP:TOO: Priority: Info - [1659527630.476799][4774:4779] CHIP:TOO: Timestamp: 29687750 - [1659527630.476887][4774:4779] CHIP:TOO: LongPress: { - [1659527630.476934][4774:4779] CHIP:TOO: NewPosition: 1 - [1659527630.476969][4774:4779] CHIP:TOO: } + [1722930199.094] [31214:31216] [DMG] SuppressResponse = true, + [1722930199.094] [31214:31216] [DMG] InteractionModelRevision = 11 + [1722930199.094] [31214:31216] [DMG] } + [1722930199.098] [31214:31216] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 + [1722930199.098] [31214:31216] [TOO] Event number: 65562 + [1722930199.098] [31214:31216] [TOO] Priority: Info + [1722930199.098] [31214:31216] [TOO] Timestamp: 1722930190865 + [1722930199.098] [31214:31216] [TOO] InitialPress: { + [1722930199.098] [31214:31216] [TOO] NewPosition: 1 + [1722930199.098] [31214:31216] [TOO] } - After 2 seconds, send this command - echo '{"Name":"LongRelease","PreviousPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + wait 0.2 seconds - Verify LonglRelease event with PreviousPosition set to 1 on TH(all-cluster-app) log: + echo '{"Name":"ShortRelease","PreviousPosition":1}' > /tmp/chip_all_clusters_fifo_ - [1686295393.569670][30986:30989] CHIP:-: Received payload: "{"Name":"LongRelease","PreviousPosition":1}" - [1686295393.569925][30986:30986] CHIP:DMG: Endpoint 1, Cluster 0x0000_003B update version to bae4056d - [1686295393.569959][30986:30986] CHIP:-: The the previous value of the CurrentPosition when the momentary switch has been released after having been pressed for a long time:1 - [1686295393.569976][30986:30986] CHIP:ZCL: SwitchServer: OnLongRelease + Verify ShortRelease event with PreviousPosition set to 1 on TH(all-cluster-app) log: - ./chip-tool switch read-event long-release 1 1 + [1722930266.048] [29970:29972] [-] Received payload: "{"Name":"ShortRelease","PreviousPosition":1}" + [1722930266.049] [29970:29970] [DMG] Endpoint 1, Cluster 0x0000_003B update version to 6903ad3d + [1722930266.049] [29970:29970] [-] The the previous value of the CurrentPosition when the momentary switch has been released:1 + [1722930266.049] [29970:29970] [ZCL] SwitchServer: OnShortRelease - Verify LonglRelease event with PreviousPosition set to 1 on TH(chip-tool) log: - [1659527630.476706][4774:4779] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0000 - [1659527630.476742][4774:4779] CHIP:TOO: Event number: 6 - [1659527630.476771][4774:4779] CHIP:TOO: Priority: Info - [1659527630.476799][4774:4779] CHIP:TOO: Timestamp: 296889750 - [1659527630.476887][4774:4779] CHIP:TOO: LongRelease: { - [1659527630.476934][4774:4779] CHIP:TOO: PreviousPosition: 1 - [1659527630.476969][4774:4779] CHIP:TOO: } + ./chip-tool switch read-event short-release 1 1 - Repeat above steps Over a 1 minute period of time + Verify ShortRelease event with PreviousPosition set to 1 on DUT(Chip-tool) log: + + [1722930314.978] [31255:31258] [DMG] SuppressResponse = true, + [1722930314.978] [31255:31258] [DMG] InteractionModelRevision = 11 + [1722930314.978] [31255:31258] [DMG] } + [1722930314.982] [31255:31258] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0003 + [1722930314.982] [31255:31258] [TOO] Event number: 65563 + [1722930314.982] [31255:31258] [TOO] Priority: Info + [1722930314.982] [31255:31258] [TOO] Timestamp: 1722930266049 + [1722930314.982] [31255:31258] [TOO] ShortRelease: { + [1722930314.983] [31255:31258] [TOO] PreviousPosition: 1 + [1722930314.983] [31255:31258] [TOO] } + + + wait 0.2 seconds + + echo '{"Name":"InitialPress","NewPosition":1}' > /tmp/chip_all_clusters_fifo_ (PID of DUT) + + Verify InitialPress event with NewPosition set to 1 on TH(all-cluster-app) log: + + [1722930385.505] [29970:29972] [-] Received payload: "{"Name":"InitialPress","NewPosition":1}" + [1722930385.505] [29970:29970] [DMG] Endpoint 1, Cluster 0x0000_003B update version to 6903ad3e + [1722930385.505] [29970:29970] [-] The new position when the momentary switch starts to be pressed:1 + [1722930385.505] [29970:29970] [ZCL] SwitchServer: OnInitialPress + + ./chip-tool switch read-event initial-press 1 1 + + Verify InitialPress event with NewPosition set to 1 on DUT(chip-tool) log: + + [1722930430.195] [31290:31292] [DMG] SuppressResponse = true, + [1722930430.195] [31290:31292] [DMG] InteractionModelRevision = 11 + [1722930430.195] [31290:31292] [DMG] } + [1722930430.200] [31290:31292] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 + [1722930430.200] [31290:31292] [TOO] Event number: 65564 + [1722930430.200] [31290:31292] [TOO] Priority: Info + [1722930430.200] [31290:31292] [TOO] Timestamp: 1722930385505 + [1722930430.200] [31290:31292] [TOO] InitialPress: { + [1722930430.200] [31290:31292] [TOO] NewPosition: 1 + [1722930430.200] [31290:31292] [TOO] } + + + echo '{"Name":"MultiPressOngoing","NewPosition":1,"CurrentNumberOfPressesCounted":2}' > /tmp/chip_all_clusters_fifo_ + + Verify MultiPressOngoing event with NewPosition set to 1 and CurrentNumberOfPressesCounted is 2 on TH(all-cluster-app) log: + + [1722930734.450] [29970:29972] [-] Received payload: "{"Name":"MultiPressOngoing","NewPosition":1,"CurrentNumberOfPressesCounted":2}" + [1722930734.450] [29970:29970] [-] The new position when the momentary switch has been pressed in a multi-press sequence:1 + [1722930734.451] [29970:29970] [-] 2 times the momentary switch has been pressed + [1722930734.451] [29970:29970] [ZCL] SwitchServer: OnMultiPressOngoing + + + ./chip-tool switch read-event multi-press-ongoing 1 1 + + Verify MultiPressOngoing event with NewPosition set to 1 and CurrentNumberOfPressesCounted is 2 on DUT(Chip-tool) log: + + [1722930652.716] [31360:31362] [DMG] SuppressResponse = true, + [1722930652.716] [31360:31362] [DMG] InteractionModelRevision = 11 + [1722930652.716] [31360:31362] [DMG] } + [1722930652.717] [31360:31362] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0005 + [1722930652.717] [31360:31362] [TOO] Event number: 65565 + [1722930652.717] [31360:31362] [TOO] Priority: Info + [1722930652.717] [31360:31362] [TOO] Timestamp: 1722930534106 + [1722930652.717] [31360:31362] [TOO] MultiPressOngoing: { + [1722930652.717] [31360:31362] [TOO] NewPosition: 1 + [1722930652.717] [31360:31362] [TOO] CurrentNumberOfPressesCounted: 2 + [1722930652.717] [31360:31362] [TOO] } + + + wait 0.2 seconds + + echo '{"Name":"ShortRelease","PreviousPosition":1}' > /tmp/chip_all_clusters_fifo_ + + Verify ShortRelease event with PreviousPosition set to 1 on TH(all-cluster-app) log: + + [1722930799.722] [29970:29972] [-] Received payload: "{"Name":"ShortRelease","PreviousPosition":1}" + [1722930799.723] [29970:29970] [DMG] Endpoint 1, Cluster 0x0000_003B update version to 6903ad3f + [1722930799.723] [29970:29970] [-] The the previous value of the CurrentPosition when the momentary switch has been released:1 + [1722930799.723] [29970:29970] [ZCL] SwitchServer: OnShortRelease + + + ./chip-tool switch read-event short-release 1 1 + + Verify ShortRelease event with PreviousPosition set to 1 on DUT(chip-tool) log: + + [1722930819.997] [31413:31415] [DMG] SuppressResponse = true, + [1722930819.997] [31413:31415] [DMG] InteractionModelRevision = 11 + [1722930820.000] [31413:31415] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0003 + [1722930820.000] [31413:31415] [TOO] Event number: 65567 + [1722930820.000] [31413:31415] [TOO] Priority: Info + [1722930820.000] [31413:31415] [TOO] Timestamp: 1722930799723 + [1722930820.001] [31413:31415] [TOO] ShortRelease: { + [1722930820.001] [31413:31415] [TOO] PreviousPosition: 1 + [1722930820.001] [31413:31415] [TOO] } + + + wait 2 seconds + + echo '{"Name":"MultiPressComplete","PreviousPosition":1,"TotalNumberOfPressesCounted":2}' > /tmp/chip_all_clusters_fifo_ + + Verify MultiPressComplete event with PreviousPosition set to 1 AND TotalNumberOfPressesCounted is 2 on TH(all-cluster-app) log: + + [1722930879.026] [29970:29972] [-] Received payload: "{"Name":"MultiPressComplete","PreviousPosition":1,"TotalNumberOfPressesCounted":2}" + [1722930879.027] [29970:29970] [-] The previous position when the momentary switch has been pressed in a multi-press sequence:1 + [1722930879.027] [29970:29970] [-] 2 times the momentary switch has been pressed + [1722930879.027] [29970:29970] [ZCL] SwitchServer: OnMultiPressComplete + + + ./chip-tool switch read-event multi-press-complete 1 1 + + Verify MultiPressComplete event with PreviousPosition set to 1 AND TotalNumberOfPressesCounted is 2 on DUT(Chip-tool) log: + + [1722930909.990] [31442:31444] [DMG] SuppressResponse = true, + [1722930909.990] [31442:31444] [DMG] InteractionModelRevision = 11 + [1722930909.990] [31442:31444] [DMG] } + [1722930909.991] [31442:31444] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0006 + [1722930909.991] [31442:31444] [TOO] Event number: 65568 + [1722930909.991] [31442:31444] [TOO] Priority: Info + [1722930909.991] [31442:31444] [TOO] Timestamp: 1722930879027 + [1722930909.991] [31442:31444] [TOO] MultiPressComplete: { + [1722930909.991] [31442:31444] [TOO] PreviousPosition: 1 + [1722930909.992] [31442:31444] [TOO] TotalNumberOfPressesCounted: 2 + [1722930909.992] [31442:31444] [TOO] } + disabled: true + + - label: + "Step 4f: TH simulates operation of the switch by repeating these + steps (over a 1 minute period) change state (field CurrentPosition) + from 0 to 1, and send the event InitialPress (with field + NewPosition=1) wait 0.2 seconds change state (attribute + CurrentPosition) from 1 to 0 wait 0.2 seconds change state (field + CurrentPosition) from 0 to 1 wait 0.2 seconds change state (field + CurrentPosition) from 1 to 0 wait 2 seconds send the event + MultiPressComplete (with field PreviousPosition=1 and + TotalNumberOfPressesCounted=2)" + PICS: + " SWTCH.C.F01 && SWTCH.C.F04 && SWTCH.C.F05 && + SWTCH.C.M.SwitchStateEventing " + verification: | + echo '{"Name":"InitialPress","NewPosition":1}' > /tmp/chip_all_clusters_fifo_ + + Verify InitialPress event with NewPosition set to 1 on TH(all-cluster-app) log: + + [1722931100.930] [29970:29972] [-] Received payload: "{"Name":"InitialPress","NewPosition":1}" + [1722931100.931] [29970:29970] [DMG] Endpoint 1, Cluster 0x0000_003B update version to 6903ad40 + [1722931100.931] [29970:29970] [-] The new position when the momentary switch starts to be pressed:1 + [1722931100.931] [29970:29970] [ZCL] SwitchServer: OnInitialPress + + ./chip-tool switch read-event initial-press 1 1 + + Verify InitialPress event with NewPosition set to 1 on DUT(chip-tool) log: + + [1722931135.211] [31498:31500] [DMG] SuppressResponse = true, + [1722931135.211] [31498:31500] [DMG] InteractionModelRevision = 11 + [1722931135.211] [31498:31500] [DMG] } + [1722931135.215] [31498:31500] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 + [1722931135.216] [31498:31500] [TOO] Event number: 65569 + [1722931135.216] [31498:31500] [TOO] Priority: Info + [1722931135.216] [31498:31500] [TOO] Timestamp: 1722931100931 + [1722931135.216] [31498:31500] [TOO] InitialPress: { + [1722931135.216] [31498:31500] [TOO] NewPosition: 1 + [1722931135.216] [31498:31500] [TOO] } + + wait 0.2 seconds + + echo '{"Name":"InitialPress","NewPosition":0}' > /tmp/chip_all_clusters_fifo_ + + Verify InitialPress event with NewPosition set to 0 on TH(all-cluster-app) log: + + [1722931220.012] [29970:29972] [-] Received payload: "{"Name":"InitialPress","NewPosition":0}" + [1722931220.013] [29970:29970] [DMG] Endpoint 1, Cluster 0x0000_003B update version to 6903ad41 + [1722931220.013] [29970:29970] [-] The new position when the momentary switch starts to be pressed:0 + [1722931220.013] [29970:29970] [ZCL] SwitchServer: OnInitialPress + + ./chip-tool switch read-event initial-press 1 1 + + Verify InitialPress event with NewPosition set to 0 on DUT(chip-tool) log: + + [1722931271.359] [31540:31542] [DMG] SuppressResponse = true, + [1722931271.359] [31540:31542] [DMG] InteractionModelRevision = 11 + [1722931271.364] [31540:31542] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 + [1722931271.364] [31540:31542] [TOO] Event number: 65570 + [1722931271.364] [31540:31542] [TOO] Priority: Info + [1722931271.364] [31540:31542] [TOO] Timestamp: 1722931220013 + [1722931271.364] [31540:31542] [TOO] InitialPress: { + [1722931271.364] [31540:31542] [TOO] NewPosition: 0 + [1722931271.365] [31540:31542] [TOO] } + + wait 0.2 seconds + + echo '{"Name":"InitialPress","NewPosition":1}' > /tmp/chip_all_clusters_fifo_ + + Verify InitialPress event with NewPosition set to 1 on TH(all-cluster-app) log: + + [1722931350.252] [29970:29972] [-] Received payload: "{"Name":"InitialPress","NewPosition":1}" + [1722931350.253] [29970:29970] [DMG] Endpoint 1, Cluster 0x0000_003B update version to 6903ad42 + [1722931350.253] [29970:29970] [-] The new position when the momentary switch starts to be pressed:1 + [1722931350.253] [29970:29970] [ZCL] SwitchServer: OnInitialPress + + ./chip-tool switch read-event initial-press 1 1 + + Verify InitialPress event with NewPosition set to 1 on DUT(chip-tool) log: + + [1722931407.399] [31584:31586] [DMG] SuppressResponse = true, + [1722931407.399] [31584:31586] [DMG] InteractionModelRevision = 11 + [1722931407.399] [31584:31586] [DMG] } + [1722931407.406] [31584:31586] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 + [1722931407.406] [31584:31586] [TOO] Event number: 65571 + [1722931407.406] [31584:31586] [TOO] Priority: Info + [1722931407.406] [31584:31586] [TOO] Timestamp: 1722931350253 + [1722931407.407] [31584:31586] [TOO] InitialPress: { + [1722931407.407] [31584:31586] [TOO] NewPosition: 1 + [1722931407.407] [31584:31586] [TOO] } + + + wait 0.2 seconds + + echo '{"Name":"InitialPress","NewPosition":0}' > /tmp/chip_all_clusters_fifo_ + + Verify InitialPress event with NewPosition set to 0 on TH(all-cluster-app) log: + + [1722931466.389] [29970:29972] [-] Received payload: "{"Name":"InitialPress","NewPosition":0}" + [1722931466.390] [29970:29970] [DMG] Endpoint 1, Cluster 0x0000_003B update version to 6903ad43 + [1722931466.390] [29970:29970] [-] The new position when the momentary switch starts to be pressed:0 + [1722931466.390] [29970:29970] [ZCL] SwitchServer: OnInitialPress + + + ./chip-tool switch read-event initial-press 1 1 + + Verify InitialPress event with NewPosition set to 0 on DUT(chip-tool) log: + + [1722931577.478] [31634:31636] [DMG] SuppressResponse = true, + [1722931577.478] [31634:31636] [DMG] InteractionModelRevision = 11 + [1722931577.478] [31634:31636] [DMG] } + [1722931577.486] [31634:31636] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0001 + [1722931577.486] [31634:31636] [TOO] Event number: 65572 + [1722931577.486] [31634:31636] [TOO] Priority: Info + [1722931577.486] [31634:31636] [TOO] Timestamp: 1722931466390 + [1722931577.486] [31634:31636] [TOO] InitialPress: { + [1722931577.486] [31634:31636] [TOO] NewPosition: 0 + [1722931577.486] [31634:31636] [TOO] } + + wait 2 seconds + + echo '{"Name":"MultiPressComplete","PreviousPosition":1,"TotalNumberOfPressesCounted":2}' > /tmp/chip_all_clusters_fifo_ + + Verify MultiPressComplete event with PreviousPosition set to 1 AND TotalNumberOfPressesCounted is 2 on TH(all-cluster-app) log: + + [1722931627.894] [29970:29972] [-] Received payload: "{"Name":"MultiPressComplete","PreviousPosition":1,"TotalNumberOfPressesCounted":2}" + [1722931627.894] [29970:29970] [-] The previous position when the momentary switch has been pressed in a multi-press sequence:1 + [1722931627.894] [29970:29970] [-] 2 times the momentary switch has been pressed + [1722931627.894] [29970:29970] [ZCL] SwitchServer: OnMultiPressComplete + + ./chip-tool switch read-event multi-press-complete 1 1 + + Verify MultiPressComplete event with PreviousPosition set to 1 AND TotalNumberOfPressesCounted is 2 on DUT(Chip-tool) log: + + [1722931657.607] [31658:31660] [DMG] SuppressResponse = true, + [1722931657.607] [31658:31660] [DMG] InteractionModelRevision = 11 + [1722931657.607] [31658:31660] [DMG] } + [1722931657.608] [31658:31660] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0006 + [1722931657.608] [31658:31660] [TOO] Event number: 65568 + [1722931657.608] [31658:31660] [TOO] Priority: Info + [1722931657.608] [31658:31660] [TOO] Timestamp: 1722930879027 + [1722931657.608] [31658:31660] [TOO] MultiPressComplete: { + [1722931657.608] [31658:31660] [TOO] PreviousPosition: 1 + [1722931657.608] [31658:31660] [TOO] TotalNumberOfPressesCounted: 2 + [1722931657.608] [31658:31660] [TOO] } + [1722931657.609] [31658:31660] [TOO] Endpoint: 1 Cluster: 0x0000_003B Event 0x0000_0006 + [1722931657.609] [31658:31660] [TOO] Event number: 65573 + [1722931657.609] [31658:31660] [TOO] Priority: Info + [1722931657.609] [31658:31660] [TOO] Timestamp: 1722931627894 + [1722931657.609] [31658:31660] [TOO] MultiPressComplete: { + [1722931657.609] [31658:31660] [TOO] PreviousPosition: 1 + [1722931657.609] [31658:31660] [TOO] TotalNumberOfPressesCounted: 2 + [1722931657.609] [31658:31660] [TOO] } disabled: true diff --git a/src/app/tests/suites/certification/Test_TC_S_2_2.yaml b/src/app/tests/suites/certification/Test_TC_S_2_2.yaml index 7e5121680ceffd..95005e30c40e42 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_2.yaml @@ -451,6 +451,20 @@ tests: response: error: CONSTRAINT_ERROR + - label: + "Step 4f: TH sends a RecallScene command to DUT with the GroupID field + set to GI (Where GI is a group currently absent from the group table) + and the SceneID field set to 0x01." + command: "RecallScene" + arguments: + values: + - name: "GroupID" + value: GI + - name: "SceneID" + value: 0x01 + response: + error: INVALID_COMMAND + - label: "Step 5a: TH sends a ViewScene command to DUT with the GroupID field set to G1 and the SceneID field set to 0x01." @@ -843,6 +857,78 @@ tests: - name: "SceneID" value: 0xFF + - label: + "Step 8g: TH sends a AddScene command to DUT with the GroupID field + set to G1, the SceneID field set to 0x01, the TransitionTime field set + to 1000 (1s) and extension field sets holding an invalid + ExtensionField (Unscenable attribute ID for given cluster). This + should fail and return a status of 0x85 (INVALID_COMMAND)." + ## TODO: Change test to test for an existing bu non scenable attribute ID once scenability check is possible, see issue: https://github.com/project-chip/connectedhomeip/issues/24177 + PICS: S.S.C00.Rsp && PICS_SDK_CI_ONLY + command: "AddScene" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x01 + - name: "TransitionTime" + value: 1000 + - name: "SceneName" + value: "Scene1" + - name: "ExtensionFieldSets" + value: + [ + { + ClusterID: 0x0006, + AttributeValueList: + [{ AttributeID: 0x4011, ValueUnsigned8: 0x01 }], + }, + ] + response: + values: + - name: "Status" + value: 0x85 + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x01 + + - label: + "Step 8g: TH sends a AddScene command to DUT with the GroupID field + set to G1, the SceneID field set to 0x01, the TransitionTime field set + to 1000 (1s) and extension field sets holding an invalid + ExtensionField (Unscenable attribute ID for given cluster). This + should fail and return a status of 0x85 (INVALID_COMMAND)." + ## TODO: Change test to test for an existing bu non scenable attribute ID once scenability check is possible, see issue: https://github.com/project-chip/connectedhomeip/issues/24177 + verification: | + ./chip-tool scenesmanagement add-scene 0x0001 0x01 1000 "scene name" '[{"clusterID": "0x006", "attributeValueList":[{"attributeID": "0x4001", "attributeValue": "0x01"}]}]' 1 1 + + Verify DUT sends a AddSceneResponse command to TH with the Status field set to 0x85 (INVALID_COMMAND), the GroupID field set to G1 and the SceneID field set to 0x01 on the TH(Chip-tool) + Log and below is the sample log provided for the raspi platform: + + [1706763610.675038][4232:4234] CHIP:DMG: }, + [1706763610.675108][4232:4234] CHIP:DMG: Received Command Response Data, Endpoint=1 Cluster=0x0000_0062 Command=0x0000_0000 + [1706763610.675134][4232:4234] CHIP:TOO: Endpoint: 1 Cluster: 0x0000_0062 Command 0x0000_0000 + [1706763610.675187][4232:4234] CHIP:TOO: AddSceneResponse: { + [1706763610.675215][4232:4234] CHIP:TOO: status: 133 + [1706763610.675229][4232:4234] CHIP:TOO: groupID: 1 + [1706763610.675244][4232:4234] CHIP:TOO: sceneID: 1 + [1706763610.675258][4232:4234] CHIP:TOO: } + cluster: "LogCommands" + command: "UserPrompt" + PICS: PICS_SKIP_SAMPLE_APP + arguments: + values: + - name: "message" + value: + "Please execute the add scene command with an invalid + extensionfieldsets due to a non sceneable attribute not in + an extensionfieldset on DUT and enter 'y' if the command + returned a status of 0x85 (INVALID_COMMAND)" + - name: "expectedValue" + value: "y" + - label: "Step 9a: TH sends a RemoveScene command to DUT with the GroupID field set to G1 and the SceneID field set to 0x01." diff --git a/src/app/tests/suites/certification/Test_TC_S_2_3.yaml b/src/app/tests/suites/certification/Test_TC_S_2_3.yaml index 817ab532bad66c..1e66f4c803834d 100644 --- a/src/app/tests/suites/certification/Test_TC_S_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_2_3.yaml @@ -676,6 +676,81 @@ tests: - name: "SceneID" value: 0x03 + - label: + "Step 6f: TH sends a StoreScene command to to group G1 with the + GroupID field set to G1 and the SceneID field set to 0x03." + PICS: S.S.C04.Rsp + command: "StoreScene" + groupId: G1 + arguments: + values: + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x03 + + - label: + "Step 6g: TH sends a ViewScene command to DUT with the GroupID field + set to G1 and the SceneID field set to 0x03." + PICS: S.S.C01.Rsp + command: "ViewScene" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x03 + response: + values: + - name: "Status" + value: 0x00 + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x03 + + - label: + "Step 6h: TH sends a RemoveScene command to group G1 with the GroupID + field set to G1 and the SceneID field set to 0x03." + PICS: S.S.C02.Rsp + command: "RemoveScene" + groupId: G1 + arguments: + values: + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x03 + + - label: "Wait 1+ s to give CI time to process the RemoveScene command." + PICS: PICS_SDK_CI_ONLY + cluster: "DelayCommands" + command: "WaitForMs" + arguments: + values: + - name: "ms" + value: 1250 + + - label: + "Step 6i: TH sends a ViewScene command to DUT with the GroupID field + set to G1 and the SceneID field set to 0x03." + PICS: S.S.C01.Rsp + command: "ViewScene" + arguments: + values: + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x03 + response: + values: + - name: "Status" + value: 0x8b + - name: "GroupID" + value: G1 + - name: "SceneID" + value: 0x03 + - label: "Step 7a: TH sends a CopyScene command to DUT with the mode field set to 0x00, the group identifier from field set to G1, the scene diff --git a/src/app/tests/suites/certification/Test_TC_S_3_1.yaml b/src/app/tests/suites/certification/Test_TC_S_3_1.yaml index ffb3023c67b862..f6100fac544629 100644 --- a/src/app/tests/suites/certification/Test_TC_S_3_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_S_3_1.yaml @@ -225,7 +225,7 @@ tests: - label: "Step 1: DUT issues a C_ADD_SCENE command to the Test Harness." PICS: S.C.C00.Tx verification: | - ./chip-tool scenesmanagement add-scene 0x0001 0x01 20 "scene name" '[{"clusterID": "0x0300", "attributeValueList":[{"attributeID": "0x4001", "attributeValue": "0x01"}]}]' 1 1 + ./chip-tool scenesmanagement add-scene 0x0001 0x01 20 "scene name" '[{"clusterID": "0x0300", "attributeValueList":[{"attributeID": "0x4000", "valueUnsigned16": "0x01"}]}]' 1 1 Verify TH recieves "AddScene(0x0)" command with following parameters: - ID 0 (GroupID): the type is a group-id. diff --git a/src/app/tests/suites/certification/Test_TC_TBRM_2_2.yaml b/src/app/tests/suites/certification/Test_TC_TBRM_2_2.yaml index 852e18a73adc8a..a6b54026729c8f 100644 --- a/src/app/tests/suites/certification/Test_TC_TBRM_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_TBRM_2_2.yaml @@ -41,19 +41,21 @@ tests: values: - name: nodeId value: nodeId - + # Step 1 - label: "TH reads the ActiveDatasetTimestamp attribute from the DUT" command: readAttribute attribute: ActiveDatasetTimestamp response: value: null + # Step 2 - label: "TH reads the PendingDatasetTimestamp attribute from the DUT" command: readAttribute attribute: PendingDatasetTimestamp response: value: null + # Step 3 - label: "TH sends a valid ActiveDatasetRequest command to the DUT without having armed the fail-safe" @@ -65,6 +67,7 @@ tests: response: error: FAILSAFE_REQUIRED + # Step 4 - label: "TH sends ArmFailSafe command to the DUT" cluster: General Commissioning command: ArmFailSafe @@ -75,7 +78,12 @@ tests: value: 60 - name: Breadcrumb value: 1 + response: + values: + - name: ErrorCode + value: CommissioningErrorEnum.OK + # Step 5 - label: "TH sends an invalid ActiveDatasetRequest command to the DUT" command: SetActiveDatasetRequest arguments: @@ -85,6 +93,7 @@ tests: response: error: INVALID_COMMAND + # Step 6 - label: "TH sends a valid ActiveDatasetRequest command to the DUT" command: SetActiveDatasetRequest arguments: @@ -92,12 +101,20 @@ tests: - name: ActiveDataset value: PIXIT.TBRM.THREAD_ACTIVE_DATASET + # Step 7 + - label: "TH sends CommissioningComplete command to the DUT" + cluster: General Commissioning + command: CommissioningComplete + endpoint: 0 + + # Step 8 - label: "TH reads the InterfaceEnabled attribute from the DUT" command: readAttribute attribute: InterfaceEnabled response: value: true + # Step 9 - label: "TH reads the ActiveDatasetTimestamp attribute from the DUT" command: readAttribute attribute: ActiveDatasetTimestamp @@ -106,7 +123,8 @@ tests: constraints: type: int64u - - label: "TH sends a valid GetActiveDatasetRequest command to the DUT" + # Step 10 + - label: "TH send a GetActiveDatasetRequest command to the DUT" command: GetActiveDatasetRequest response: values: diff --git a/src/app/tests/suites/certification/Test_TC_TBRM_2_3.yaml b/src/app/tests/suites/certification/Test_TC_TBRM_2_3.yaml index 7a55191f471f0b..a0ecd11693ef8d 100644 --- a/src/app/tests/suites/certification/Test_TC_TBRM_2_3.yaml +++ b/src/app/tests/suites/certification/Test_TC_TBRM_2_3.yaml @@ -49,7 +49,7 @@ tests: constraints: type: int64u - - label: "If the ActiveDatasetTimestamp attribute not null, go to step 4" + - label: "If the ActiveDatasetTimestamp attribute not null, go to step 5" cluster: EqualityCommands command: UnsignedNumberEquals arguments: @@ -75,6 +75,10 @@ tests: value: 60 - name: Breadcrumb value: 1 + response: + values: + - name: ErrorCode + value: CommissioningErrorEnum.OK # Step 3 - label: "TH sends a valid ActiveDatasetRequest command to the DUT" @@ -86,6 +90,13 @@ tests: value: PIXIT.TBRM.THREAD_ACTIVE_DATASET # Step 4 + - label: "TH sends CommissioningComplete command to the DUT" + runIf: noActiveDataset + cluster: General Commissioning + command: CommissioningComplete + endpoint: 0 + + # Step 5 - label: "TH reads the PendingDatasetTimestamp attribute from the DUT" command: readAttribute attribute: PendingDatasetTimestamp @@ -94,7 +105,7 @@ tests: constraints: type: int64u - # Step 5 + # Step 6 - label: "TH sends a SetPendingDatasetRequest command to the DUT" command: SetPendingDatasetRequest arguments: @@ -102,7 +113,7 @@ tests: - name: PendingDataset value: PIXIT.TBRM.THREAD_PENDING_DATASET - # Step 6 + # Step 7 - label: "TH sends a GetPendingDatasetRequest command to the DUT" command: GetPendingDatasetRequest response: @@ -112,7 +123,7 @@ tests: type: octet_string # TODO: This should be PIXIT.TBRM.THREAD_PENDING_DATASET but ignoring the Delay Timer element if present - # Step 7 + # Step 8 - label: "TH reads the PendingDatasetTimestamp attribute from the DUT" command: readAttribute attribute: PendingDatasetTimestamp @@ -121,7 +132,7 @@ tests: type: int64u notValue: initialPendingTimestamp - # Step 8 + # Step 9 - label: "TH subscribes to the ActiveDatasetTimestamp attribute from the DUT" command: subscribeAttribute @@ -141,15 +152,15 @@ tests: constraints: hasValue: true - # Step 9 + # Step 10 - label: "TH reads the PendingDatasetTimestamp attribute from the DUT" command: readAttribute attribute: PendingDatasetTimestamp response: value: null - # Step 10 - - label: "TH sends a valid GetActiveDatasetRequest command to the DUT" + # Step 11 + - label: "TH sends a GetActiveDatasetRequest command to the DUT" command: GetActiveDatasetRequest response: values: @@ -158,7 +169,7 @@ tests: constraints: type: octet_string - # Step 11 + # Step 12 - label: "TH reads the InterfaceEnabled attribute from the DUT" command: readAttribute attribute: InterfaceEnabled diff --git a/src/app/tests/suites/certification/Test_TC_TBRM_2_4.yaml b/src/app/tests/suites/certification/Test_TC_TBRM_2_4.yaml new file mode 100644 index 00000000000000..d1483c1c5a930a --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_TBRM_2_4.yaml @@ -0,0 +1,86 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: + "[TC-TBRM-2.4] Verify that getting Active or Pending Dataset in the PASE + session results in unsupported access" + +PICS: + - TBRM.S + +config: + nodeId: 0x12344321 + + payload: "MT:-24J0AFN00KA0648G00" + discriminator: 3840 + PakeVerifier: + type: octet_string + defaultValue: "hex:b96170aae803346884724fe9a3b287c30330c2a660375d17bb205a8cf1aecb350457f8ab79ee253ab6a8e46bb09e543ae422736de501e3db37d441fe344920d09548e4c18240630c4ff4913c53513839b7c07fcc0627a1b8573a149fcd1fa466cf" + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: DelayCommands + command: WaitForCommissionee + arguments: + values: + - name: nodeId + value: nodeId + + - label: "Open Commissioning Window" + endpoint: 0 + cluster: Administrator Commissioning + command: OpenCommissioningWindow + timedInteractionTimeoutMs: 2000 + arguments: + values: + - name: CommissioningTimeout + value: 180 + - name: PAKEPasscodeVerifier + value: PakeVerifier + - name: Discriminator + value: discriminator + - name: Iterations + value: 1000 + - name: Salt + value: "SPAKE2P Key Salt" + + - label: "TH2 establishes a PASE session with the DUT" + identity: beta + cluster: CommissionerCommands + endpoint: 0 + command: EstablishPASESession + arguments: + values: + - name: nodeId + value: nodeId + - name: payload + value: payload + + - label: + "TH2 send GetActiveDatasetRequest command to the DUT in PASE session" + identity: beta + cluster: Thread Border Router Management + endpoint: 1 + command: GetActiveDatasetRequest + response: + error: UNSUPPORTED_ACCESS + + - label: + "TH2 send GetPendingDatasetRequest command to the DUT in PASE session" + identity: beta + cluster: Thread Border Router Management + endpoint: 1 + command: GetPendingDatasetRequest + response: + error: UNSUPPORTED_ACCESS diff --git a/src/app/tests/suites/certification/Test_TC_TBRM_3_1_Simulated.yaml b/src/app/tests/suites/certification/Test_TC_TBRM_3_1_Simulated.yaml new file mode 100644 index 00000000000000..095711a0fcee95 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_TBRM_3_1_Simulated.yaml @@ -0,0 +1,44 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: "[TC-TBRM-3.1] Functionality with client as DUT" + +PICS: + - TBRM.C + +config: + nodeId: 0x12344321 + cluster: Thread Border Router Management + endpoint: 1 + +tests: + # Step 1 + - label: "DUT send SetActiveDatasetRequest to TH" + PICS: TBRM.C.C03.Tx + wait: "SetActiveDatasetRequest" + + # Step 2 + - label: "DUT send SetPendingDatasetRequest to TH" + PICS: TBRM.C.C04.Tx + wait: "SetPendingDatasetRequest" + + # Step 3 + - label: "DUT send GetActiveDatasetRequest to TH" + PICS: TBRM.C.C00.Tx + wait: "GetActiveDatasetRequest" + + # Step 4 + - label: "DUT send GetPendingDatasetRequest to TH" + PICS: TBRM.C.C01.Tx + wait: "GetPendingDatasetRequest" diff --git a/src/app/tests/suites/certification/Test_TC_THNETDIR_2_1.yaml b/src/app/tests/suites/certification/Test_TC_THNETDIR_2_1.yaml index 3a2925dc424175..fc5129295adf84 100644 --- a/src/app/tests/suites/certification/Test_TC_THNETDIR_2_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_THNETDIR_2_1.yaml @@ -47,5 +47,4 @@ tests: response: constraints: type: int8u - minValue: 10 # assume 5 supported fabrics - # python: value >= 2 * supportedFabrics + python: value >= 2 * supportedFabrics diff --git a/src/app/tests/suites/certification/Test_TC_THNETDIR_2_2.yaml b/src/app/tests/suites/certification/Test_TC_THNETDIR_2_2.yaml index be0ec89952d25e..a485a302f2127b 100644 --- a/src/app/tests/suites/certification/Test_TC_THNETDIR_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_THNETDIR_2_2.yaml @@ -25,13 +25,16 @@ config: # Note: TestNetwork* values need to match what's encoded in TestNetworkDataset TestNetworkDataset: type: octet_string - defaultValue: "hex:0e080000000000000001000300000f350407fff800020839758ec8144b07fb0708fdf1f1add0797dc00510f366cec7a446bab978d90d27abe38f23030f4f70656e5468726561642d353933380102593804103ca67c969efb0d0c74a4d8ee923b576c0c0402a0f7f8" + defaultValue: "hex:0e0800000000000c0001000300000f350407fff800020839758ec8144b07fb0708fdf1f1add0797dc00510f366cec7a446bab978d90d27abe38f23030f4f70656e5468726561642d353933380102593804103ca67c969efb0d0c74a4d8ee923b576c0c0402a0f7f8" TestNetworkExtendedPanId: type: octet_string defaultValue: "hex:39758ec8144b07fb" TestNetworkName: "OpenThread-5938" TestNetworkChannel: 15 - TestNetworkActiveTimestamp: 1 + TestNetworkActiveTimestamp: 0xc0001 + TestNetworkUpdatedDataset: + type: octet_string + defaultValue: "hex:0e0800000000000d0001000300000f350407fff800020839758ec8144b07fb0708fdf1f1add0797dc00510f366cec7a446bab978d90d27abe38f23030f4f70656e5468726561642d353933380102593804103ca67c969efb0d0c74a4d8ee923b576c0c0402a0f7f8" tests: - label: "Wait for the commissioned device to be retrieved" @@ -90,15 +93,15 @@ tests: response: error: NOT_FOUND - # TODO: Currently fails with darwin-framework-tool because it automatically performs a timed invoke - # - label: "TH sends AddNetwork command to DUT without a timed interaction" - # command: AddNetwork - # arguments: - # values: - # - name: OperationalDataset - # value: TestNetworkDataset - # response: - # error: NEEDS_TIMED_INTERACTION + # Note: Unsupported with darwin-framework-tool because it automatically performs a timed invoke + - label: "TH sends AddNetwork command to DUT without a timed interaction" + command: AddNetwork + arguments: + values: + - name: OperationalDataset + value: TestNetworkDataset + response: + error: NEEDS_TIMED_INTERACTION - label: "TH sends AddNetwork command to DUT with TestNetwork dataset" command: AddNetwork @@ -116,18 +119,43 @@ tests: response: constraints: type: list - # python: | - # # Split the list into test (our TestNetwork) and rest (everything else) - # test = next((n for n in value if n['ExtendedPanID'] == TestNetworkExtendedPanId), None) - # rest = [n for n in value if n != test] - # # Check test has the expected values and rest == initialNetworks (ignoring order) - # return (test is not None and - # test['NetworkName'] == TestNetworkName and - # test['Channel'] == TestNetworkChannel and - # test['ActiveTimestamp'] == TestNetworkActiveTimestamp and - # len(value) == len(initialNetworks) + 1 and - # len(rest) == len(initialNetworks) and - # all(n in initialNetworks for n in rest)) + python: | + # Split the list into test (our TestNetwork) and rest (everything else) + test = next((n for n in value if n['ExtendedPanID'] == TestNetworkExtendedPanId), None) + rest = [n for n in value if n != test] + # Check test has the expected values and rest == initialNetworks (ignoring order) + return (test is not None and + test['NetworkName'] == TestNetworkName and + test['Channel'] == TestNetworkChannel and + test['ActiveTimestamp'] == TestNetworkActiveTimestamp and + len(value) == len(initialNetworks) + 1 and + len(rest) == len(initialNetworks) and + all(n in initialNetworks for n in rest)) + + - label: + "TH sends GetOperationalDataset command to DUT with ExtendedPanID from + TestNetwork" + command: GetOperationalDataset + arguments: + values: + - name: ExtendedPanID + value: TestNetworkExtendedPanId + response: + values: + - name: OperationalDataset + value: TestNetworkDataset + + - label: + "TH sends AddNetwork command to DUT with TestNetwork dataset matching + existing Active Timestamp" + command: AddNetwork + timedInteractionTimeoutMs: 2000 + arguments: + values: + - name: OperationalDataset + value: TestNetworkDataset + response: + error: INVALID_IN_STATE - label: "TH sends GetOperationalDataset command to DUT with ExtendedPanID from @@ -142,6 +170,53 @@ tests: - name: OperationalDataset value: TestNetworkDataset + - label: + "TH sends AddNetwork command to DUT with updated TestNetwork dataset + with larger Active Timestamp" + command: AddNetwork + timedInteractionTimeoutMs: 2000 + arguments: + values: + - name: OperationalDataset + value: TestNetworkUpdatedDataset + + - label: + "TH sends GetOperationalDataset command to DUT with ExtendedPanID from + TestNetwork" + command: GetOperationalDataset + arguments: + values: + - name: ExtendedPanID + value: TestNetworkExtendedPanId + response: + values: + - name: OperationalDataset + value: TestNetworkUpdatedDataset + + - label: + "TH sends AddNetwork command to DUT with original TestNetwork dataset" + command: AddNetwork + timedInteractionTimeoutMs: 2000 + arguments: + values: + - name: OperationalDataset + value: TestNetworkDataset + response: + error: INVALID_IN_STATE + + - label: + "TH sends GetOperationalDataset command to DUT with ExtendedPanID from + TestNetwork" + command: GetOperationalDataset + arguments: + values: + - name: ExtendedPanID + value: TestNetworkExtendedPanId + response: + values: + - name: OperationalDataset + value: TestNetworkUpdatedDataset + - label: "TH writes ExtendedPanID from TestNetwork to PreferredExtendedPanID on DUT" @@ -158,15 +233,15 @@ tests: response: value: TestNetworkExtendedPanId - # TODO: Currently fails with darwin-framework-tool because it automatically performs a timed invoke - # - label: "TH sends RemoveNetwork command to DUT without a timed interaction" - # command: RemoveNetwork - # arguments: - # values: - # - name: ExtendedPanID - # value: TestNetworkExtendedPanId - # response: - # error: NEEDS_TIMED_INTERACTION + # Note: Unsupported with darwin-framework-tool because it automatically performs a timed invoke + - label: "TH sends RemoveNetwork command to DUT without a timed interaction" + command: RemoveNetwork + arguments: + values: + - name: ExtendedPanID + value: TestNetworkExtendedPanId + response: + error: NEEDS_TIMED_INTERACTION - label: "TH sends RemoveNetwork command to DUT with ExtendedPanID of @@ -212,10 +287,10 @@ tests: response: constraints: type: list - # python: | - # # value == initialNetworks (ignoring order) - # return (len(value) == len(initialNetworks) and - # all(n in initialNetworks for n in value)) + python: | + # value == initialNetworks (ignoring order) + return (len(value) == len(initialNetworks) and + all(n in initialNetworks for n in value)) - label: "TH writes PreferredExtendedPanID to DUT, restoring the initial value" diff --git a/src/app/tests/suites/certification/Test_TC_THNETDIR_2_3.yaml b/src/app/tests/suites/certification/Test_TC_THNETDIR_2_3.yaml new file mode 100644 index 00000000000000..f0b5b9bf2288ba --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_THNETDIR_2_3.yaml @@ -0,0 +1,85 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: + "[TC-THNETDIR-2.3] Verify CASE session requirement for GetOperationalDataset" + +PICS: + - THNETDIR.S + +config: + nodeId: 0x12344321 + cluster: Thread Network Directory + endpoint: 1 + + TestNetworkExtendedPanId: + type: octet_string + defaultValue: "hex:39758ec8144b07fb" + + payload: "MT:-24J0AFN00KA0648G00" + discriminator: 3840 + PakeVerifier: + type: octet_string + defaultValue: "hex:b96170aae803346884724fe9a3b287c30330c2a660375d17bb205a8cf1aecb350457f8ab79ee253ab6a8e46bb09e543ae422736de501e3db37d441fe344920d09548e4c18240630c4ff4913c53513839b7c07fcc0627a1b8573a149fcd1fa466cf" + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: DelayCommands + command: WaitForCommissionee + arguments: + values: + - name: nodeId + value: nodeId + + - label: "Open Commissioning Window" + endpoint: 0 + cluster: Administrator Commissioning + command: OpenCommissioningWindow + timedInteractionTimeoutMs: 2000 + arguments: + values: + - name: CommissioningTimeout + value: 180 + - name: PAKEPasscodeVerifier + value: PakeVerifier + - name: Discriminator + value: discriminator + - name: Iterations + value: 1000 + - name: Salt + value: "SPAKE2P Key Salt" + + - label: "TH2 establishes a PASE session with the DUT" + identity: beta + endpoint: 0 + cluster: CommissionerCommands + command: EstablishPASESession + arguments: + values: + - name: nodeId + value: nodeId + - name: payload + value: payload + + - label: + "TH2 sends GetOperationalDataset command to the DUT over the PASE + session" + identity: beta + command: GetOperationalDataset + arguments: + values: + - name: ExtendedPanID + value: TestNetworkExtendedPanId + response: + error: UNSUPPORTED_ACCESS diff --git a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml index 35da0e04be380f..ef8f688bf5e89c 100644 --- a/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml +++ b/src/app/tests/suites/certification/Test_TC_TSTAT_1_1.yaml @@ -606,17 +606,7 @@ tests: contains: [1, 2, 3] - label: - "Step 6c: TH reads the optional (GetRelayStatusLog) command in - AcceptedCommandList" - PICS: TSTAT.S.C04.Rsp - command: "readAttribute" - attribute: "AcceptedCommandList" - response: - constraints: - type: list - contains: [4] - - label: - "Step 6d: TH reads Feature dependent(TSTAT.S.F08(PRES)) commands in + "Step 6c: TH reads Feature dependent(TSTAT.S.F08(PRES)) commands in AcceptedCommandList" PICS: TSTAT.S.F08 command: "readAttribute" @@ -627,17 +617,7 @@ tests: contains: [6, 254] - label: - "Step 7a: TH reads from the DUT the GeneratedCommandList attribute." - PICS: " !TSTAT.S.C04.Rsp && !TSTAT.S.C02.Rsp " - command: "readAttribute" - attribute: "GeneratedCommandList" - response: - value: [0xFD] # AtomicResponse - constraints: - type: list - - - label: - "Step 7b: TH reads Feature dependent(TSTAT.S.F03(SCH)) commands in + "Step 7a: TH reads Feature dependent(TSTAT.S.F03(SCH)) commands in GeneratedCommandList" PICS: TSTAT.S.F03 command: "readAttribute" @@ -648,12 +628,12 @@ tests: contains: [0] - label: - "Step 7c: TH reads optional command (GetRelayStatusLogResponse) in - GeneratedCommandList" - PICS: TSTAT.S.C04.Rsp + "Step 7b: TH reads Feature dependent(TSTAT.S.F08(PRES)) commands in + the GeneratedCommandList attribute." + PICS: TSTAT.S.F08 & TSTAT.S.Cfe.Rsp command: "readAttribute" attribute: "GeneratedCommandList" response: + value: [0xFD] # AtomicResponse constraints: type: list - contains: [1] diff --git a/src/app/tests/suites/certification/Test_TC_WASHERCTRL_2_2.yaml b/src/app/tests/suites/certification/Test_TC_WASHERCTRL_2_2.yaml index be22b8bc5e4121..c1089959ad0b32 100644 --- a/src/app/tests/suites/certification/Test_TC_WASHERCTRL_2_2.yaml +++ b/src/app/tests/suites/certification/Test_TC_WASHERCTRL_2_2.yaml @@ -27,7 +27,7 @@ config: defaultValue: 1 unsupportedNumberOfRinsesValue: type: enum8 - defaultValue: 5 + defaultValue: 4 tests: - label: "Step 1: Commission DUT to TH" @@ -83,23 +83,10 @@ tests: response: value: NumberOfRinsesValue - - label: "Step 6: Operate device to set the condition to read only" - verification: | - Manual operation required - cluster: "LogCommands" - command: "UserPrompt" - PICS: PICS_SKIP_SAMPLE_APP && WASHERCTRL.S.M.ManuallyControlled - arguments: - values: - - name: "message" - value: "Please enter 'y' for success" - - name: "expectedValue" - value: "y" - - label: - "Step 7: TH writes an unsupported NumberOfRinses attribute to DUT + "Step 6: TH writes an unsupported NumberOfRinses attribute to DUT while DUT is not in a valid state." - PICS: WASHERCTRL.S.M.ManuallyControlled && WASHERCTRL.S.A0002 + PICS: WASHERCTRL.S.A0002 command: "writeAttribute" attribute: "NumberOfRinses" arguments: diff --git a/src/app/tests/suites/certification/Test_TC_WIFINM_2_2.yaml b/src/app/tests/suites/certification/Test_TC_WIFINM_2_2.yaml new file mode 100644 index 00000000000000..3aaa04996681c8 --- /dev/null +++ b/src/app/tests/suites/certification/Test_TC_WIFINM_2_2.yaml @@ -0,0 +1,82 @@ +# Copyright (c) 2024 Project CHIP Authors +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +name: + "[TC-WIFINM-2.2] Verify CASE session requirement for + NetworkPassphraseRequest" + +PICS: + - WIFINM.S + +config: + nodeId: 0x12344321 + cluster: WiFi Network Management + endpoint: 1 + + TestNetworkExtendedPanId: + type: octet_string + defaultValue: "hex:39758ec8144b07fb" + + payload: "MT:-24J0AFN00KA0648G00" + discriminator: 3840 + PakeVerifier: + type: octet_string + defaultValue: "hex:b96170aae803346884724fe9a3b287c30330c2a660375d17bb205a8cf1aecb350457f8ab79ee253ab6a8e46bb09e543ae422736de501e3db37d441fe344920d09548e4c18240630c4ff4913c53513839b7c07fcc0627a1b8573a149fcd1fa466cf" + +tests: + - label: "Wait for the commissioned device to be retrieved" + cluster: DelayCommands + command: WaitForCommissionee + arguments: + values: + - name: nodeId + value: nodeId + + - label: "Open Commissioning Window" + endpoint: 0 + cluster: Administrator Commissioning + command: OpenCommissioningWindow + timedInteractionTimeoutMs: 2000 + arguments: + values: + - name: CommissioningTimeout + value: 180 + - name: PAKEPasscodeVerifier + value: PakeVerifier + - name: Discriminator + value: discriminator + - name: Iterations + value: 1000 + - name: Salt + value: "SPAKE2P Key Salt" + + - label: "TH2 establishes a PASE session with the DUT" + identity: beta + endpoint: 0 + cluster: CommissionerCommands + command: EstablishPASESession + arguments: + values: + - name: nodeId + value: nodeId + - name: payload + value: payload + + - label: + "TH2 sends the NetworkPassphraseRequest command to the DUT over the + PASE session" + identity: beta + command: NetworkPassphraseRequest + response: + error: UNSUPPORTED_ACCESS diff --git a/src/app/tests/suites/certification/ci-pics-values b/src/app/tests/suites/certification/ci-pics-values index 9109f30bec4d73..892961a965bae4 100644 --- a/src/app/tests/suites/certification/ci-pics-values +++ b/src/app/tests/suites/certification/ci-pics-values @@ -1989,6 +1989,7 @@ TSTAT.S.A004a=1 TSTAT.S.A004e=1 TSTAT.S.A0050=1 TSTAT.S.A0051=0 +TSTAT.S.A0052=0 TSTAT.S.M.MinSetpointDeadBandWritable=1 TSTAT.S.M.HVACSystemTypeConfigurationWritable=0 @@ -1999,9 +2000,10 @@ TSTAT.S.C01.Rsp=0 TSTAT.S.C02.Rsp=0 TSTAT.S.C03.Rsp=0 TSTAT.S.C04.Rsp=0 +TSTAT.S.C05.Rsp=0 TSTAT.S.C06.Rsp=1 TSTAT.S.Cfe.Rsp=1 -TSTAT.S.CFD.Tx=1 +TSTAT.S.Cfd.Tx=1 # Client TSTAT.C=0 @@ -2016,6 +2018,7 @@ TSTAT.C.C02.Tx=0 TSTAT.C.C03.Tx=0 TSTAT.S.C00.Tx=0 TSTAT.S.C01.Tx=0 +TSTAT.C.C05.Tx=0 TSTAT.C.C06.Tx=1 TSTAT.C.Cfe.Tx=1 diff --git a/src/app/tests/suites/ciTests.json b/src/app/tests/suites/ciTests.json index d976d7623244fd..4e054643456b03 100644 --- a/src/app/tests/suites/ciTests.json +++ b/src/app/tests/suites/ciTests.json @@ -112,7 +112,6 @@ "Test_TC_OTCCM_3_3" ], "LaundryDryerControl": ["Test_TC_DRYERCTRL_2_1"], - "MediaControl": [ "Test_TC_LOWPOWER_2_1", "Test_TC_KEYPADINPUT_3_2", @@ -149,6 +148,7 @@ "Test_TC_OO_2_1", "Test_TC_OO_2_2", "Test_TC_OO_2_4", + "Test_TC_OO_2_6", "Test_TC_OO_2_7" ], "PowerSource": ["Test_TC_PS_2_1"], diff --git a/src/app/tests/suites/manualTests.json b/src/app/tests/suites/manualTests.json index 8048c7b3be6e22..3b0b354840e1c6 100644 --- a/src/app/tests/suites/manualTests.json +++ b/src/app/tests/suites/manualTests.json @@ -117,7 +117,7 @@ "GeneralCommissioning": ["Test_TC_CGEN_2_2"], "GeneralDiagnostics": ["Test_TC_DGGEN_2_2"], "Identify": ["Test_TC_I_3_2"], - "IcdManagement": ["Test_TC_ICDM_4_1", "Test_TC_ICDM_5_1"], + "IcdManagement": [], "IlluminanceMeasurement": [], "InteractionDataModel": [ "Test_TC_IDM_1_1", diff --git a/src/app/util/af-types.h b/src/app/util/af-types.h index bd5b5ed68ce4bb..04275a2515c23c 100644 --- a/src/app/util/af-types.h +++ b/src/app/util/af-types.h @@ -32,6 +32,7 @@ #include // EmberAfAttributeMetadata +#include #include #include #include @@ -314,5 +315,15 @@ enum class MarkAttributeDirty kYes, }; +/// Notification object of a specific path being changed +class AttributesChangedListener +{ +public: + virtual ~AttributesChangedListener() = default; + + /// Called when the set of attributes identified by AttributePathParams (which may contain wildcards) is to be considered dirty. + virtual void MarkDirty(const AttributePathParams & path) = 0; +}; + } // namespace app } // namespace chip diff --git a/src/app/util/attribute-metadata.h b/src/app/util/attribute-metadata.h index a380599a8f48b6..5be6916438d48a 100644 --- a/src/app/util/attribute-metadata.h +++ b/src/app/util/attribute-metadata.h @@ -17,8 +17,8 @@ #pragma once +#include #include - #include /** @@ -158,6 +158,21 @@ struct EmberAfAttributeMetadata */ EmberAfAttributeMask mask; + /** + * Check wether this attribute is a boolean based on its type according to the spec. + */ + bool IsBoolean() const { return attributeType == ZCL_BOOLEAN_ATTRIBUTE_TYPE; } + + /** + * Check wether this attribute is signed based on its type according to the spec. + */ + bool IsSignedIntegerAttribute() const { return chip::app::IsSignedAttributeType(attributeType); } + + /** + * Check whether this attribute has a define min and max. + */ + bool HasMinMax() const { return mask & ATTRIBUTE_MASK_MIN_MAX; } + /** * Check whether this attribute is nullable. */ diff --git a/src/app/util/attribute-storage-null-handling.h b/src/app/util/attribute-storage-null-handling.h index 8db72a2321bf7b..826e5aff531a98 100644 --- a/src/app/util/attribute-storage-null-handling.h +++ b/src/app/util/attribute-storage-null-handling.h @@ -127,6 +127,39 @@ struct NumericAttributeTraits // Utility that lets consumers treat a StorageType instance as a uint8_t* // for writing to the attribute store. static uint8_t * ToAttributeStoreRepresentation(StorageType & value) { return reinterpret_cast(&value); } + + // Min and max values for the type. + static WorkingType MinValue(bool isNullable) + { + if constexpr (!std::is_signed_v) + { + return 0; + } + + if (isNullable) + { + // Smallest negative value is excluded for nullable signed types. + return static_cast(std::numeric_limits::min() + 1); + } + + return std::numeric_limits::min(); + } + + static WorkingType MaxValue(bool isNullable) + { + if constexpr (std::is_signed_v) + { + return std::numeric_limits::max(); + } + + if (isNullable) + { + // Largest value is excluded for nullable unsigned types. + return static_cast(std::numeric_limits::max() - 1); + } + + return std::numeric_limits::max(); + } }; template @@ -209,6 +242,10 @@ struct NumericAttributeTraits static uint8_t * ToAttributeStoreRepresentation(StorageType & value) { return reinterpret_cast(&value); } + static uint8_t MinValue(bool isNullable) { return 0; } + + static uint8_t MaxValue(bool isNullable) { return 1; } + private: static constexpr StorageType kNullValue = 0xFF; }; diff --git a/src/app/util/attribute-storage.cpp b/src/app/util/attribute-storage.cpp index b9d54fceb85fb5..7247031b071042 100644 --- a/src/app/util/attribute-storage.cpp +++ b/src/app/util/attribute-storage.cpp @@ -64,7 +64,7 @@ uint8_t attributeData[ACTUAL_ATTRIBUTE_SIZE]; // ----- internal-only methods, not part of the external API ----- // Loads the attributes from built-in default and storage. -static void emAfLoadAttributeDefaults(chip::EndpointId endpoint, chip::Optional = chip::NullOptional); +static void emAfLoadAttributeDefaults(EndpointId endpoint, Optional = NullOptional); static bool emAfMatchCluster(const EmberAfCluster * cluster, const EmberAfAttributeSearchRecord * attRecord); static bool emAfMatchAttribute(const EmberAfCluster * cluster, const EmberAfAttributeMetadata * am, @@ -80,7 +80,7 @@ static uint8_t emberAfClusterCountByIndex(uint16_t endpointIndex, bool server); // Check whether there is an endpoint defined with the given endpoint id that is // enabled. -static bool emberAfEndpointIsEnabled(chip::EndpointId endpoint); +static bool emberAfEndpointIsEnabled(EndpointId endpoint); namespace { @@ -116,12 +116,12 @@ GENERATED_FUNCTION_ARRAYS #endif #ifdef GENERATED_COMMANDS -constexpr const chip::CommandId generatedCommands[] = GENERATED_COMMANDS; +constexpr const CommandId generatedCommands[] = GENERATED_COMMANDS; #define ZAP_GENERATED_COMMANDS_INDEX(index) (&generatedCommands[index]) #endif // GENERATED_COMMANDS #if (defined(GENERATED_EVENTS) && (GENERATED_EVENT_COUNT > 0)) -constexpr const chip::EventId generatedEvents[] = GENERATED_EVENTS; +constexpr const EventId generatedEvents[] = GENERATED_EVENTS; #define ZAP_GENERATED_EVENTS_INDEX(index) (&generatedEvents[index]) #endif // GENERATED_EVENTS @@ -262,8 +262,8 @@ uint16_t emberAfGetDynamicIndexFromEndpoint(EndpointId id) } CHIP_ERROR emberAfSetDynamicEndpoint(uint16_t index, EndpointId id, const EmberAfEndpointType * ep, - const chip::Span & dataVersionStorage, - chip::Span deviceTypeList, EndpointId parentEndpointId) + const Span & dataVersionStorage, Span deviceTypeList, + EndpointId parentEndpointId) { auto realIndex = index + FIXED_ENDPOINT_COUNT; @@ -351,7 +351,7 @@ bool emberAfEndpointIndexIsEnabled(uint16_t index) } // This function is used to call the per-cluster attribute changed callback -void emAfClusterAttributeChangedCallback(const app::ConcreteAttributePath & attributePath) +void emAfClusterAttributeChangedCallback(const ConcreteAttributePath & attributePath) { const EmberAfCluster * cluster = emberAfFindServerCluster(attributePath.mEndpointId, attributePath.mClusterId); if (cluster != nullptr) @@ -365,7 +365,7 @@ void emAfClusterAttributeChangedCallback(const app::ConcreteAttributePath & attr } // This function is used to call the per-cluster pre-attribute changed callback -Status emAfClusterPreAttributeChangedCallback(const app::ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, +Status emAfClusterPreAttributeChangedCallback(const ConcreteAttributePath & attributePath, EmberAfAttributeType attributeType, uint16_t size, uint8_t * value) { const EmberAfCluster * cluster = emberAfFindServerCluster(attributePath.mEndpointId, attributePath.mClusterId); @@ -686,7 +686,7 @@ Status emAfReadOrWriteAttribute(const EmberAfAttributeSearchRecord * attRecord, return Status::UnsupportedEndpoint; // Sorry, endpoint was not found. } -const EmberAfEndpointType * emberAfFindEndpointType(chip::EndpointId endpointId) +const EmberAfEndpointType * emberAfFindEndpointType(EndpointId endpointId) { uint16_t ep = emberAfIndexFromEndpoint(endpointId); if (ep == kEmberInvalidEndpointIndex) @@ -918,7 +918,7 @@ bool emberAfEndpointEnableDisable(EndpointId endpoint, bool enable) if (enable) { initializeEndpoint(&(emAfEndpoints[index])); - MatterReportingAttributeChangeCallback(endpoint); + emberAfEndpointChanged(endpoint, emberAfGlobalInteractionModelAttributesChangedListener()); } else { @@ -929,8 +929,8 @@ bool emberAfEndpointEnableDisable(EndpointId endpoint, bool enable) EndpointId parentEndpointId = emberAfParentEndpointFromIndex(index); while (parentEndpointId != kInvalidEndpointId) { - MatterReportingAttributeChangeCallback(parentEndpointId, app::Clusters::Descriptor::Id, - app::Clusters::Descriptor::Attributes::PartsList::Id); + emberAfAttributeChanged(parentEndpointId, Clusters::Descriptor::Id, Clusters::Descriptor::Attributes::PartsList::Id, + emberAfGlobalInteractionModelAttributesChangedListener()); uint16_t parentIndex = emberAfIndexFromEndpoint(parentEndpointId); if (parentIndex == kEmberInvalidEndpointIndex) { @@ -940,8 +940,8 @@ bool emberAfEndpointEnableDisable(EndpointId endpoint, bool enable) parentEndpointId = emberAfParentEndpointFromIndex(parentIndex); } - MatterReportingAttributeChangeCallback(/* endpoint = */ 0, app::Clusters::Descriptor::Id, - app::Clusters::Descriptor::Attributes::PartsList::Id); + emberAfAttributeChanged(/* endpoint = */ 0, Clusters::Descriptor::Id, Clusters::Descriptor::Attributes::PartsList::Id, + emberAfGlobalInteractionModelAttributesChangedListener()); } return true; @@ -1005,10 +1005,10 @@ uint8_t emberAfGetClusterCountForEndpoint(EndpointId endpoint) return emAfEndpoints[index].endpointType->clusterCount; } -chip::Span emberAfDeviceTypeListFromEndpoint(chip::EndpointId endpoint, CHIP_ERROR & err) +Span emberAfDeviceTypeListFromEndpoint(EndpointId endpoint, CHIP_ERROR & err) { uint16_t endpointIndex = emberAfIndexFromEndpoint(endpoint); - chip::Span ret; + Span ret; if (endpointIndex == 0xFFFF) { @@ -1136,14 +1136,14 @@ void emAfLoadAttributeDefaults(EndpointId endpoint, Optional clusterI uint8_t * ptr; uint16_t epCount = emberAfEndpointCount(); uint8_t attrData[ATTRIBUTE_LARGEST]; - auto * attrStorage = app::GetAttributePersistenceProvider(); + auto * attrStorage = GetAttributePersistenceProvider(); // Don't check whether we actually have an attrStorage here, because it's OK // to have one if none of our attributes have NVM storage. for (ep = 0; ep < epCount; ep++) { EmberAfDefinedEndpoint * de; - if (endpoint != chip::kInvalidEndpointId) + if (endpoint != kInvalidEndpointId) { ep = emberAfIndexFromEndpoint(endpoint); if (ep == kEmberInvalidEndpointIndex) @@ -1182,8 +1182,8 @@ void emAfLoadAttributeDefaults(EndpointId endpoint, Optional clusterI { VerifyOrDieWithMsg(attrStorage != nullptr, Zcl, "Attribute persistence needs a persistence provider"); MutableByteSpan bytes(attrData); - CHIP_ERROR err = attrStorage->ReadValue( - app::ConcreteAttributePath(de->endpoint, cluster->clusterId, am->attributeId), am, bytes); + CHIP_ERROR err = + attrStorage->ReadValue(ConcreteAttributePath(de->endpoint, cluster->clusterId, am->attributeId), am, bytes); if (err == CHIP_NO_ERROR) { ptr = attrData; @@ -1264,7 +1264,7 @@ void emAfLoadAttributeDefaults(EndpointId endpoint, Optional clusterI } } } - if (endpoint != chip::kInvalidEndpointId) + if (endpoint != kInvalidEndpointId) { break; } @@ -1306,10 +1306,10 @@ void emAfSaveAttributeToStorageIfNeeded(uint8_t * data, EndpointId endpoint, Clu dataSize = metadata->size; } - auto * attrStorage = app::GetAttributePersistenceProvider(); + auto * attrStorage = GetAttributePersistenceProvider(); if (attrStorage) { - attrStorage->WriteValue(app::ConcreteAttributePath(endpoint, clusterId, metadata->attributeId), ByteSpan(data, dataSize)); + attrStorage->WriteValue(ConcreteAttributePath(endpoint, clusterId, metadata->attributeId), ByteSpan(data, dataSize)); } else { @@ -1403,15 +1403,14 @@ bool IsTreeCompositionForEndpoint(EndpointId endpoint) } // namespace app } // namespace chip -uint16_t emberAfGetServerAttributeCount(chip::EndpointId endpoint, chip::ClusterId cluster) +uint16_t emberAfGetServerAttributeCount(EndpointId endpoint, ClusterId cluster) { const EmberAfCluster * clusterObj = emberAfFindServerCluster(endpoint, cluster); VerifyOrReturnError(clusterObj != nullptr, 0); return clusterObj->attributeCount; } -uint16_t emberAfGetServerAttributeIndexByAttributeId(chip::EndpointId endpoint, chip::ClusterId cluster, - chip::AttributeId attributeId) +uint16_t emberAfGetServerAttributeIndexByAttributeId(EndpointId endpoint, ClusterId cluster, AttributeId attributeId) { const EmberAfCluster * clusterObj = emberAfFindServerCluster(endpoint, cluster); VerifyOrReturnError(clusterObj != nullptr, UINT16_MAX); @@ -1436,7 +1435,7 @@ Optional emberAfGetServerAttributeIdByIndex(EndpointId endpoint, Cl return Optional(clusterObj->attributes[attributeIndex].attributeId); } -DataVersion * emberAfDataVersionStorage(const chip::app::ConcreteClusterPath & aConcreteClusterPath) +DataVersion * emberAfDataVersionStorage(const ConcreteClusterPath & aConcreteClusterPath) { uint16_t index = emberAfIndexFromEndpoint(aConcreteClusterPath.mEndpointId); if (index == kEmberInvalidEndpointIndex) @@ -1462,3 +1461,48 @@ DataVersion * emberAfDataVersionStorage(const chip::app::ConcreteClusterPath & a return ep.dataVersions + clusterIndex; } + +namespace { +class GlobalInteractionModelEngineChangedpathListener : public AttributesChangedListener +{ +public: + ~GlobalInteractionModelEngineChangedpathListener() = default; + + void MarkDirty(const AttributePathParams & path) override + { + InteractionModelEngine::GetInstance()->GetReportingEngine().SetDirty(path); + } +}; + +} // namespace + +AttributesChangedListener * emberAfGlobalInteractionModelAttributesChangedListener() +{ + static GlobalInteractionModelEngineChangedpathListener listener; + return &listener; +} + +void emberAfAttributeChanged(EndpointId endpoint, ClusterId clusterId, AttributeId attributeId, + AttributesChangedListener * listener) +{ + // Increase cluster data path + DataVersion * version = emberAfDataVersionStorage(ConcreteClusterPath(endpoint, clusterId)); + if (version == nullptr) + { + ChipLogError(DataManagement, "Endpoint %x, Cluster " ChipLogFormatMEI " not found in IncreaseClusterDataVersion!", endpoint, + ChipLogValueMEI(clusterId)); + } + else + { + (*(version))++; + ChipLogDetail(DataManagement, "Endpoint %x, Cluster " ChipLogFormatMEI " update version to %" PRIx32, endpoint, + ChipLogValueMEI(clusterId), *(version)); + } + + listener->MarkDirty(AttributePathParams(endpoint, clusterId, attributeId)); +} + +void emberAfEndpointChanged(EndpointId endpoint, AttributesChangedListener * listener) +{ + listener->MarkDirty(AttributePathParams(endpoint)); +} diff --git a/src/app/util/attribute-storage.h b/src/app/util/attribute-storage.h index 005f109181360d..b45bfe43cff43e 100644 --- a/src/app/util/attribute-storage.h +++ b/src/app/util/attribute-storage.h @@ -284,6 +284,27 @@ chip::Span emberAfDeviceTypeListFromEndpoint(chip::Endp // CHIP_ERROR emberAfSetDeviceTypeList(chip::EndpointId endpoint, chip::Span deviceTypeList); +/// Returns a change listener that uses the global InteractionModelEngine +/// instance to report dirty paths +chip::app::AttributesChangedListener * emberAfGlobalInteractionModelAttributesChangedListener(); + +/// Mark the given attribute as having changed: +/// - increases the cluster data version for the given cluster +/// - uses `listener` to `MarkDirty` the given path. This is typically done to mark an +/// attribute as dirty within the matter attribute reporting engine, so that subscriptions +/// receive updated attribute values for a cluster. +/// +/// This is a convenience function to make it clear when a `emberAfDataVersionStorage` increase +/// and a `AttributesChangeListener::MarkDirty` always occur in lock-step. +void emberAfAttributeChanged(chip::EndpointId endpoint, chip::ClusterId clusterId, chip::AttributeId attributeId, + chip::app::AttributesChangedListener * listener); + +/// Mark attributes on the given endpoint as having changed. +/// +/// Schedules reporting engine to consider the endpoint dirty, however does NOT increase/alter +/// any cluster data versions. +void emberAfEndpointChanged(chip::EndpointId endpoint, chip::app::AttributesChangedListener * listener); + namespace chip { namespace app { diff --git a/src/app/util/attribute-table-detail.h b/src/app/util/attribute-table-detail.h index d755f9cd23cbac..06d5d400f5942f 100644 --- a/src/app/util/attribute-table-detail.h +++ b/src/app/util/attribute-table-detail.h @@ -17,9 +17,8 @@ #pragma once -#include -#include -#include +#include +#include /** * Write an attribute for a request arriving from external sources. @@ -27,6 +26,5 @@ * This will check attribute writeability and that * the provided data type matches the expected data type. */ -chip::Protocols::InteractionModel::Status emAfWriteAttributeExternal(chip::EndpointId endpoint, chip::ClusterId cluster, - chip::AttributeId attributeID, uint8_t * dataPtr, - EmberAfAttributeType dataType); +chip::Protocols::InteractionModel::Status emAfWriteAttributeExternal(const chip::app::ConcreteAttributePath & path, + const EmberAfWriteDataInput & input); diff --git a/src/app/util/attribute-table.cpp b/src/app/util/attribute-table.cpp index 211d2a19123dbd..0d68701b6389b4 100644 --- a/src/app/util/attribute-table.cpp +++ b/src/app/util/attribute-table.cpp @@ -41,13 +41,6 @@ using namespace chip; using namespace chip::app; namespace { -// Zigbee spec says types between signed 8 bit and signed 64 bit -bool emberAfIsTypeSigned(EmberAfAttributeType dataType) -{ - return (dataType >= ZCL_INT8S_ATTRIBUTE_TYPE && dataType <= ZCL_INT64S_ATTRIBUTE_TYPE) || - dataType == ZCL_TEMPERATURE_ATTRIBUTE_TYPE; -} - /** * @brief Simple integer comparison function. * Compares two values of a known length as integers. @@ -166,28 +159,43 @@ int8_t emberAfCompareValues(const uint8_t * val1, const uint8_t * val2, uint16_t * the attribute * - Status::Success: if the attribute was found and successfully written */ -Status emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t * data, - EmberAfAttributeType dataType, bool overrideReadOnlyAndDataType, MarkAttributeDirty markDirty); +Status emAfWriteAttribute(const ConcreteAttributePath & path, const EmberAfWriteDataInput & input, + bool overrideReadOnlyAndDataType); + } // anonymous namespace -Status emAfWriteAttributeExternal(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t * dataPtr, - EmberAfAttributeType dataType) +Protocols::InteractionModel::Status emAfWriteAttributeExternal(const ConcreteAttributePath & path, + const EmberAfWriteDataInput & input) { - return emAfWriteAttribute(endpoint, cluster, attributeID, dataPtr, dataType, false /* override read-only */, - MarkAttributeDirty::kIfChanged); + EmberAfWriteDataInput completeInput = input; + + if (completeInput.changeListener == nullptr) + { + completeInput.SetChangeListener(emberAfGlobalInteractionModelAttributesChangedListener()); + } + + return emAfWriteAttribute(path, completeInput, false /* overrideReadOnlyAndDataType */); } Status emberAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t * dataPtr, EmberAfAttributeType dataType) { - return emAfWriteAttribute(endpoint, cluster, attributeID, dataPtr, dataType, true /* override read-only */, - MarkAttributeDirty::kIfChanged); + + return emberAfWriteAttribute( + ConcreteAttributePath(endpoint, cluster, attributeID), + EmberAfWriteDataInput(dataPtr, dataType).SetChangeListener(emberAfGlobalInteractionModelAttributesChangedListener())); } -Status emberAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t * dataPtr, - EmberAfAttributeType dataType, MarkAttributeDirty markDirty) +Status emberAfWriteAttribute(const ConcreteAttributePath & path, const EmberAfWriteDataInput & input) { - return emAfWriteAttribute(endpoint, cluster, attributeID, dataPtr, dataType, true /* override read-only */, markDirty); + EmberAfWriteDataInput completeInput = input; + + if (completeInput.changeListener == nullptr) + { + completeInput.SetChangeListener(emberAfGlobalInteractionModelAttributesChangedListener()); + } + + return emAfWriteAttribute(path, completeInput, true /* overrideReadOnlyAndDataType */); } //------------------------------------------------------------------------------ @@ -319,14 +327,13 @@ Status AttributeValueIsChanging(EndpointId endpoint, ClusterId cluster, Attribut return Status::Success; } -Status emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t * data, - EmberAfAttributeType dataType, bool overrideReadOnlyAndDataType, MarkAttributeDirty markDirty) +Status emAfWriteAttribute(const ConcreteAttributePath & path, const EmberAfWriteDataInput & input, bool overrideReadOnlyAndDataType) { const EmberAfAttributeMetadata * metadata = nullptr; EmberAfAttributeSearchRecord record; - record.endpoint = endpoint; - record.clusterId = cluster; - record.attributeId = attributeID; + record.endpoint = path.mEndpointId; + record.clusterId = path.mClusterId; + record.attributeId = path.mAttributeId; Status status = emAfReadOrWriteAttribute(&record, &metadata, nullptr, // buffer 0, // buffer size @@ -335,15 +342,15 @@ Status emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId at // if we dont support that attribute if (metadata == nullptr) { - ChipLogProgress(Zcl, "%p ep %x clus " ChipLogFormatMEI " attr " ChipLogFormatMEI " not supported", "WRITE ERR: ", endpoint, - ChipLogValueMEI(cluster), ChipLogValueMEI(attributeID)); + ChipLogProgress(Zcl, "%p ep %x clus " ChipLogFormatMEI " attr " ChipLogFormatMEI " not supported", + "WRITE ERR: ", path.mEndpointId, ChipLogValueMEI(path.mClusterId), ChipLogValueMEI(path.mAttributeId)); return status; } // if the data type specified by the caller is incorrect if (!(overrideReadOnlyAndDataType)) { - if (dataType != metadata->attributeType) + if (input.dataType != metadata->attributeType) { ChipLogProgress(Zcl, "%p invalid data type", "WRITE ERR: "); return Status::InvalidDataType; @@ -386,13 +393,13 @@ Status emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId at maxBytes = maxv.ptrToDefaultValue; } - bool isAttributeSigned = emberAfIsTypeSigned(metadata->attributeType); - bool isOutOfRange = emberAfCompareValues(minBytes, data, dataLen, isAttributeSigned) == 1 || - emberAfCompareValues(maxBytes, data, dataLen, isAttributeSigned) == -1; + bool isAttributeSigned = metadata->IsSignedIntegerAttribute(); + bool isOutOfRange = emberAfCompareValues(minBytes, input.dataPtr, dataLen, isAttributeSigned) == 1 || + emberAfCompareValues(maxBytes, input.dataPtr, dataLen, isAttributeSigned) == -1; if (isOutOfRange && // null value is always in-range for a nullable attribute. - (!metadata->IsNullable() || !IsNullValue(data, dataLen, isAttributeSigned))) + (!metadata->IsNullable() || !IsNullValue(input.dataPtr, dataLen, isAttributeSigned))) { return Status::ConstraintError; } @@ -400,7 +407,8 @@ Status emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId at // Check whether anything is actually changing, before we do any work here. bool valueChanging; - Status imStatus = AttributeValueIsChanging(endpoint, cluster, attributeID, metadata, data, &valueChanging); + Status imStatus = + AttributeValueIsChanging(path.mEndpointId, path.mClusterId, path.mAttributeId, metadata, input.dataPtr, &valueChanging); if (imStatus != Status::Success) { return imStatus; @@ -409,19 +417,19 @@ Status emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId at if (!valueChanging) { // Just do nothing, except triggering reporting if forced. - if (markDirty == MarkAttributeDirty::kYes) + if (input.markDirty == MarkAttributeDirty::kYes) { - MatterReportingAttributeChangeCallback(endpoint, cluster, attributeID); + emberAfAttributeChanged(path.mEndpointId, path.mClusterId, path.mAttributeId, input.changeListener); } return Status::Success; } - const app::ConcreteAttributePath attributePath(endpoint, cluster, attributeID); + const app::ConcreteAttributePath attributePath(path.mEndpointId, path.mClusterId, path.mAttributeId); // Pre write attribute callback for all attribute changes, // regardless of cluster. - imStatus = MatterPreAttributeChangeCallback(attributePath, dataType, emberAfAttributeSize(metadata), data); + imStatus = MatterPreAttributeChangeCallback(attributePath, input.dataType, emberAfAttributeSize(metadata), input.dataPtr); if (imStatus != Protocols::InteractionModel::Status::Success) { return imStatus; @@ -429,7 +437,7 @@ Status emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId at // Pre-write attribute callback specific // to the cluster that the attribute lives in. - status = emAfClusterPreAttributeChangedCallback(attributePath, dataType, emberAfAttributeSize(metadata), data); + status = emAfClusterPreAttributeChangedCallback(attributePath, input.dataType, emberAfAttributeSize(metadata), input.dataPtr); // Ignore the following write operation and return success if (status == Status::WriteIgnored) @@ -445,7 +453,7 @@ Status emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId at // write the attribute status = emAfReadOrWriteAttribute(&record, nullptr, // metadata - data, + input.dataPtr, 0, // buffer size - unused true); // write? @@ -456,16 +464,16 @@ Status emAfWriteAttribute(EndpointId endpoint, ClusterId cluster, AttributeId at // Save the attribute to persistent storage if needed // The callee will weed out attributes that do not need to be stored. - emAfSaveAttributeToStorageIfNeeded(data, endpoint, cluster, metadata); + emAfSaveAttributeToStorageIfNeeded(input.dataPtr, path.mEndpointId, path.mClusterId, metadata); - if (markDirty != MarkAttributeDirty::kNo) + if (input.markDirty != MarkAttributeDirty::kNo) { - MatterReportingAttributeChangeCallback(endpoint, cluster, attributeID); + emberAfAttributeChanged(path.mEndpointId, path.mClusterId, path.mAttributeId, input.changeListener); } // Post write attribute callback for all attributes changes, regardless // of cluster. - MatterPostAttributeChangeCallback(attributePath, dataType, emberAfAttributeSize(metadata), data); + MatterPostAttributeChangeCallback(attributePath, input.dataType, emberAfAttributeSize(metadata), input.dataPtr); // Post-write attribute callback specific // to the cluster that the attribute lives in. diff --git a/src/app/util/attribute-table.h b/src/app/util/attribute-table.h index 0527e855d4350d..afa8bf88012f54 100644 --- a/src/app/util/attribute-table.h +++ b/src/app/util/attribute-table.h @@ -17,14 +17,62 @@ #pragma once +#include #include #include #include #include +#include + +struct EmberAfWriteDataInput +{ + // Where the input data originates from. + // + // NOTE: at this time there is no information regarding + // input buffer size and it is assumed "correct" for the given data type. + // + // NOTE: technically this should be `const uint8_t*`, however ember internal logic uses a + // `emAfReadOrWriteAttribute` method and because of the duality of read/write it needs + // a non-const input. This is odd and should probably be fixed. + uint8_t * dataPtr; + + // The data type that dataPtr points to + EmberAfAttributeType dataType; + + // Controls when `changeListener` is called to flag an attribute dirty. It allows for things like: + // kIfChanged - only if the dataPtr contains a different value than what currenty exists + // kNo - never called + // kYes - always called + chip::app::MarkAttributeDirty markDirty = chip::app::MarkAttributeDirty::kIfChanged; + + // Listener called when when the written data is consided changed/dirty. + // This being called depends on settings of `markDirty` combined with the actual contents of dataPtr + // vs the contents of the current attribute storage. + chip::app::AttributesChangedListener * changeListener = nullptr; + + EmberAfWriteDataInput(uint8_t * data, EmberAfAttributeType type) : dataPtr(data), dataType(type) {} + + EmberAfWriteDataInput & SetMarkDirty(chip::app::MarkAttributeDirty value) + { + markDirty = value; + return *this; + } + + EmberAfWriteDataInput & SetChangeListener(chip::app::AttributesChangedListener * listener) + { + changeListener = listener; + return *this; + } +}; + /** * @brief write an attribute, performing all the checks. * + * TODO: what are "all the checks"? There are limitations below + * and generally input data pointer does not even have a size, + * hence data validity check capabilities seem limited. + * * This function will attempt to write the attribute value from * the provided pointer. This function will only check that the * attribute exists. If it does it will write the value into @@ -41,20 +89,16 @@ * data type (as Accessors.h/cpp have this correct by default). * TODO: this not checking seems off - what if this is run without Accessors.h ? */ -chip::Protocols::InteractionModel::Status emberAfWriteAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, - chip::AttributeId attributeID, uint8_t * dataPtr, - EmberAfAttributeType dataType); +chip::Protocols::InteractionModel::Status emberAfWriteAttribute(const chip::app::ConcreteAttributePath & path, + const EmberAfWriteDataInput & input); /** - * A version of emberAfWriteAttribute that allows controlling when the attribute - * should be marked dirty. This is an overload, not an optional argument, to - * reduce codesize at all the callsites that want to write without doing - * anything special to control the dirty marking. + * Override of emberAfWriteAttribute to reduce code size for calls that default + * markDirty/changeListener and any other future customization calls. */ chip::Protocols::InteractionModel::Status emberAfWriteAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, chip::AttributeId attributeID, uint8_t * dataPtr, - EmberAfAttributeType dataType, - chip::app::MarkAttributeDirty markDirty); + EmberAfAttributeType dataType); /** * @brief Read the attribute value, performing all the checks. diff --git a/src/app/util/basic-types.h b/src/app/util/basic-types.h index 97aebe690423c0..449756fe90ef42 100644 --- a/src/app/util/basic-types.h +++ b/src/app/util/basic-types.h @@ -32,5 +32,9 @@ namespace chip { typedef uint8_t Percent; typedef uint16_t Percent100ths; +typedef int64_t Energy_mWh; +typedef int64_t Amperage_mA; +typedef int64_t Power_mW; +typedef int64_t Voltage_mV; } // namespace chip diff --git a/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index ad0542a9ff0614..3ec9a8298b481e 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -302,12 +302,13 @@ CHIP_ERROR ReadSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, b CHIP_ERROR err = Access::GetAccessControl().Check(aSubjectDescriptor, requestPath, requestPrivilege); if (err != CHIP_NO_ERROR) { - ReturnErrorCodeIf(err != CHIP_ERROR_ACCESS_DENIED, err); + ReturnErrorCodeIf((err != CHIP_ERROR_ACCESS_DENIED) && (err != CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL), err); if (aPath.mExpanded) { return CHIP_NO_ERROR; } - return CHIP_IM_GLOBAL_STATUS(UnsupportedAccess); + return err == CHIP_ERROR_ACCESS_DENIED ? CHIP_IM_GLOBAL_STATUS(UnsupportedAccess) + : CHIP_IM_GLOBAL_STATUS(AccessRestricted); } } @@ -328,6 +329,21 @@ CHIP_ERROR ReadSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, b } // Read attribute using Ember, if it doesn't have an override. + + EmberAfAttributeSearchRecord record; + record.endpoint = aPath.mEndpointId; + record.clusterId = aPath.mClusterId; + record.attributeId = aPath.mAttributeId; + Status status = emAfReadOrWriteAttribute(&record, &attributeMetadata, gEmberAttributeIOBufferSpan.data(), + static_cast(gEmberAttributeIOBufferSpan.size()), + /* write = */ false); + + if (status != Status::Success) + { + return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(status); + } + + // data available, return the corresponding record AttributeReportIB::Builder & attributeReport = aAttributeReports.CreateAttributeReport(); ReturnErrorOnFailure(aAttributeReports.GetError()); @@ -348,19 +364,6 @@ CHIP_ERROR ReadSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, b .EndOfAttributePathIB(); ReturnErrorOnFailure(err); - EmberAfAttributeSearchRecord record; - record.endpoint = aPath.mEndpointId; - record.clusterId = aPath.mClusterId; - record.attributeId = aPath.mAttributeId; - Status status = emAfReadOrWriteAttribute(&record, &attributeMetadata, gEmberAttributeIOBufferSpan.data(), - static_cast(gEmberAttributeIOBufferSpan.size()), - /* write = */ false); - - if (status != Status::Success) - { - return CHIP_ERROR_IM_GLOBAL_STATUS_VALUE(status); - } - TLV::TLVWriter * writer = attributeDataIBBuilder.GetWriter(); VerifyOrReturnError(writer != nullptr, CHIP_NO_ERROR); @@ -701,9 +704,12 @@ CHIP_ERROR WriteSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, } if (err != CHIP_NO_ERROR) { - ReturnErrorCodeIf(err != CHIP_ERROR_ACCESS_DENIED, err); + ReturnErrorCodeIf((err != CHIP_ERROR_ACCESS_DENIED) && (err != CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL), err); // TODO: when wildcard/group writes are supported, handle them to discard rather than fail with status - return apWriteHandler->AddStatus(aPath, Protocols::InteractionModel::Status::UnsupportedAccess); + return apWriteHandler->AddStatus(aPath, + err == CHIP_ERROR_ACCESS_DENIED + ? Protocols::InteractionModel::Status::UnsupportedAccess + : Protocols::InteractionModel::Status::AccessRestricted); } apWriteHandler->CacheACLCheckResult({ aPath, requestPrivilege }); } @@ -746,8 +752,8 @@ CHIP_ERROR WriteSingleClusterData(const SubjectDescriptor & aSubjectDescriptor, return apWriteHandler->AddStatus(aPath, Protocols::InteractionModel::Status::InvalidValue); } - auto status = emAfWriteAttributeExternal(aPath.mEndpointId, aPath.mClusterId, aPath.mAttributeId, - gEmberAttributeIOBufferSpan.data(), attributeMetadata->attributeType); + auto status = emAfWriteAttributeExternal( + aPath, EmberAfWriteDataInput(gEmberAttributeIOBufferSpan.data(), attributeMetadata->attributeType)); return apWriteHandler->AddStatus(aPath, status); } diff --git a/src/app/util/mock/CodegenEmberMocks.cpp b/src/app/util/mock/CodegenEmberMocks.cpp index e1f0b2436084a7..521f36c9569647 100644 --- a/src/app/util/mock/CodegenEmberMocks.cpp +++ b/src/app/util/mock/CodegenEmberMocks.cpp @@ -16,6 +16,7 @@ */ #include #include +#include using chip::Protocols::InteractionModel::Status; @@ -34,8 +35,7 @@ Status emAfReadOrWriteAttribute(const EmberAfAttributeSearchRecord * attRecord, return Status::Success; } -Status emAfWriteAttributeExternal(chip::EndpointId endpoint, chip::ClusterId cluster, chip::AttributeId attributeID, - uint8_t * dataPtr, EmberAfAttributeType dataType) +Status emAfWriteAttributeExternal(const chip::app::ConcreteAttributePath & path, const EmberAfWriteDataInput & input) { return Status::Success; } @@ -43,5 +43,6 @@ Status emAfWriteAttributeExternal(chip::EndpointId endpoint, chip::ClusterId clu Status emberAfWriteAttribute(chip::EndpointId endpoint, chip::ClusterId cluster, chip::AttributeId attributeID, uint8_t * dataPtr, EmberAfAttributeType dataType) { - return emAfWriteAttributeExternal(endpoint, cluster, attributeID, dataPtr, dataType); + return emAfWriteAttributeExternal(chip::app::ConcreteAttributePath(endpoint, cluster, attributeID), + EmberAfWriteDataInput(dataPtr, dataType)); } diff --git a/src/app/util/mock/MockNodeConfig.h b/src/app/util/mock/MockNodeConfig.h index 10110604678c20..668d81478d4659 100644 --- a/src/app/util/mock/MockNodeConfig.h +++ b/src/app/util/mock/MockNodeConfig.h @@ -53,6 +53,7 @@ constexpr EmberAfAttributeMetadata DefaultAttributeMetadata(chip::AttributeId id struct MockAttributeConfig { MockAttributeConfig(AttributeId aId) : id(aId), attributeMetaData(internal::DefaultAttributeMetadata(aId)) {} + MockAttributeConfig(AttributeId aId, EmberAfAttributeMetadata metadata) : id(aId), attributeMetaData(metadata) {} MockAttributeConfig(AttributeId aId, EmberAfAttributeType type, EmberAfAttributeMask mask = ATTRIBUTE_MASK_WRITABLE | ATTRIBUTE_MASK_NULLABLE) : id(aId), diff --git a/src/app/util/odd-sized-integers.h b/src/app/util/odd-sized-integers.h index f5f1bb50c6b4bf..32f2c8793b2e71 100644 --- a/src/app/util/odd-sized-integers.h +++ b/src/app/util/odd-sized-integers.h @@ -200,35 +200,52 @@ struct NumericAttributeTraits, IsBigEndian> static constexpr bool CanRepresentValue(bool isNullable, WorkingType value) { - // Since WorkingType has at least one extra byte, none of our bitshifts - // overflow. - if (IsSigned) + return MinValue(isNullable) <= value && value <= MaxValue(isNullable); + } + + static CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag, StorageType value) + { + return writer.Put(tag, StorageToWorking(value)); + } + + static uint8_t * ToAttributeStoreRepresentation(StorageType & value) { return value; } + + static WorkingType MinValue(bool isNullable) + { + if constexpr (!IsSigned) { - WorkingType max = (static_cast(1) << (8 * ByteSize - 1)) - 1; - WorkingType min = -max; - if (!isNullable) - { - // We have one more value. - min -= 1; - } - return value >= min && value <= max; + return 0; } - WorkingType max = (static_cast(1) << (8 * ByteSize)) - 1; + // Since WorkingType has at least one extra byte, the bitshift cannot overflow. + constexpr WorkingType signedMin = -(static_cast(1) << (8 * ByteSize - 1)); if (isNullable) { - // we have one less value - max -= 1; + // Smallest negative value is excluded for nullable signed types. + return signedMin + 1; } - return value <= max; + + return signedMin; } - static CHIP_ERROR Encode(TLV::TLVWriter & writer, TLV::Tag tag, StorageType value) + static WorkingType MaxValue(bool isNullable) { - return writer.Put(tag, StorageToWorking(value)); - } + // Since WorkingType has at least one extra byte, none of our bitshifts + // overflow. + if constexpr (IsSigned) + { + return (static_cast(1) << (8 * ByteSize - 1)) - 1; + } - static uint8_t * ToAttributeStoreRepresentation(StorageType & value) { return value; } + constexpr WorkingType unsignedMax = (static_cast(1) << (8 * ByteSize)) - 1; + if (isNullable) + { + // Largest value is excluded for nullable unsigned types. + return unsignedMax - 1; + } + + return unsignedMax; + } }; } // namespace app diff --git a/src/app/zap-templates/templates/app/attribute-type.zapt b/src/app/zap-templates/templates/app/attribute-type.zapt index bc0e3fb7d2bee2..233cf0a1e46b2a 100644 --- a/src/app/zap-templates/templates/app/attribute-type.zapt +++ b/src/app/zap-templates/templates/app/attribute-type.zapt @@ -3,9 +3,29 @@ // Prevent multiple inclusion #pragma once +#include + // ZCL attribute types enum { {{#zcl_atomics}} {{ident}}ZCL_{{asDelimitedMacro name}}_ATTRIBUTE_TYPE = {{asHex atomicId 2}}, // {{description}} {{/zcl_atomics}} }; + +namespace chip { +namespace app { +inline bool IsSignedAttributeType(uint8_t attributeType) +{ + switch (attributeType) { + {{#zcl_atomics}} + {{#if isSigned}} + case ZCL_{{asDelimitedMacro name}}_ATTRIBUTE_TYPE: + return true; + {{/if}} + {{/zcl_atomics}} + default: + return false; + } +} +} // namespace app +} // namespace chip diff --git a/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt b/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt index 4a2ca16e49d960..7af9a625964690 100644 --- a/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt +++ b/src/app/zap-templates/templates/app/attributes/Accessors-src.zapt @@ -36,7 +36,7 @@ namespace {{asUpperCamelCase label}} { {{#*inline "clusterId"}}Clusters::{{asUpperCamelCase parent.label}}::Id{{/inline}} {{#*inline "sizingBytes"}}{{#if (isShortString type)}}1{{else}}2{{/if}}{{/inline}} -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, {{accessorGetterType this}} value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, {{accessorGetterType this}} value) { {{~#if (isString type)}} {{#if isNullable}} @@ -109,7 +109,13 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, {{accessorGet Encoding::LittleEndian::Put16(zclString, length); {{/if}} memcpy(&zclString[{{>sizingBytes}}], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, {{>clusterId}}, Id, zclString, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE{{#if passMarkDirty}}, markDirty{{/if}}); + {{#if passMarkDirty}} + return emberAfWriteAttribute( + ConcreteAttributePath(endpoint, {{>clusterId}}, Id), + EmberAfWriteDataInput(zclString, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); + {{else}} + return emberAfWriteAttribute(endpoint, {{>clusterId}}, Id, zclString, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE); + {{/if}} {{else}} using Traits = NumericAttributeTraits<{{accessorTraitType type}}>; if (!Traits::CanRepresentValue(/* isNullable = */ {{isNullable}}, value)) @@ -119,16 +125,22 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, {{accessorGet Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, {{>clusterId}}, Id, writable, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE{{#if passMarkDirty}}, markDirty{{/if}}); + {{#if passMarkDirty}} + return emberAfWriteAttribute( + ConcreteAttributePath(endpoint, {{>clusterId}}, Id), + EmberAfWriteDataInput(writable, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); + {{else}} + return emberAfWriteAttribute(endpoint, {{>clusterId}}, Id, writable, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE); + {{/if}} {{/if}} {{/inline}} -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value, MarkAttributeDirty markDirty) { {{> setBody passMarkDirty=true}} } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value) { {{> setBody passMarkDirty=false}} } @@ -138,27 +150,39 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEn {{#*inline "setNullBody"}} {{#if (isString type)}} uint8_t zclString[{{>sizingBytes}}] = { {{#if (isShortString type)}}0xFF{{else}}0xFF, 0xFF{{/if}} }; - return emberAfWriteAttribute(endpoint, {{>clusterId}}, Id, zclString, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE{{#if passMarkDirty}}, markDirty{{/if}}); + {{#if passMarkDirty}} + return emberAfWriteAttribute( + ConcreteAttributePath(endpoint, {{>clusterId}}, Id), + EmberAfWriteDataInput(zclString, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); + {{else}} + return emberAfWriteAttribute(endpoint, {{>clusterId}}, Id, zclString, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE); + {{/if}} {{else}} using Traits = NumericAttributeTraits<{{accessorTraitType type}}>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, {{>clusterId}}, Id, writable, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE{{#if passMarkDirty}}, markDirty{{/if}}); + {{#if passMarkDirty}} + return emberAfWriteAttribute( + ConcreteAttributePath(endpoint, {{>clusterId}}, Id), + EmberAfWriteDataInput(writable, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); + {{else}} + return emberAfWriteAttribute(endpoint, {{>clusterId}}, Id, writable, ZCL_{{typeAsDelimitedMacro type}}_ATTRIBUTE_TYPE); + {{/if}} {{/if}} {{/inline}} -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { {{> setNullBody passMarkDirty=true}} } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { {{> setNullBody passMarkDirty=false}} } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value, MarkAttributeDirty markDirty) { if (value.IsNull()) { return SetNull(endpoint, markDirty); @@ -167,7 +191,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEn return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value) { if (value.IsNull()) { return SetNull(endpoint); diff --git a/src/app/zap-templates/templates/app/attributes/Accessors.zapt b/src/app/zap-templates/templates/app/attributes/Accessors.zapt index fd8c4fad3dc87a..52e17cdf83a015 100644 --- a/src/app/zap-templates/templates/app/attributes/Accessors.zapt +++ b/src/app/zap-templates/templates/app/attributes/Accessors.zapt @@ -28,16 +28,16 @@ namespace Attributes { {{/first}} {{#unless (isStrEqual storagePolicy "attributeAccessInterface")}} namespace {{asUpperCamelCase label}} { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, {{accessorGetterType this}} value); // {{type}} +Protocols::InteractionModel::Status Get(EndpointId endpoint, {{accessorGetterType this}} value); // {{type}} {{! NOTE: Adding an optional arg instead of an overload can break API consumers that are using the function type (e.g. in templates). }} -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name forceNotNullable=true forceNotOptional=true}} value, MarkAttributeDirty markDirty); {{#if isNullable}} -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, {{zapTypeToEncodableClusterObjectType type ns=parent.name isArgument=true forceNotOptional=true}} value, MarkAttributeDirty markDirty); {{/if}} } // namespace {{asUpperCamelCase label}} diff --git a/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml index a1595803109bcc..edf1b65e941ad0 100644 --- a/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/access-control-cluster.xml @@ -127,7 +127,7 @@ limitations under the License. CommissioningARL ARL - + This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. @@ -156,16 +156,11 @@ limitations under the License. - - The cluster SHALL send AccessRestrictionEntryChanged events whenever its ARL attribute data is changed by the device maker. - - - - + The cluster SHALL send FabricRestrictionReviewUpdate events to indicate completion of a fabric restriction review. - - + + diff --git a/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml b/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml index b33ccb740f9a54..bc1d61e64309b5 100644 --- a/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml +++ b/src/app/zap-templates/zcl/data-model/chip/bridged-device-basic-information.xml @@ -97,7 +97,8 @@ limitations under the License. The server SHALL attempt to keep the devices specified active for StayActiveDuration milliseconds when they are next active. - + + @@ -110,7 +111,7 @@ limitations under the License. The Leave event SHOULD be emitted by a Node prior to permanently leaving the Fabric. - + This event SHALL be generated when there is a change in the Reachable attribute. diff --git a/src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml index f72140e712a703..3623ce1ccf925c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/color-control-cluster.xml @@ -141,7 +141,7 @@ limitations under the License. CompensationText - ColorTemperatureMireds + ColorTemperatureMireds ColorMode @@ -384,7 +384,7 @@ limitations under the License. ColorLoopStartEnhancedHue ColorLoopStoredEnhancedHue ColorCapabilities - ColorTempPhysicalMinMireds + ColorTempPhysicalMinMireds ColorTempPhysicalMaxMireds diff --git a/src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml index 7228b8f47a20ab..abfd85dde2cd93 100644 --- a/src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml @@ -39,24 +39,21 @@ limitations under the License. This command is sent by a client to request approval for a future CommissionNode call. - - - + + + This command is sent by a client to request that the server begins commissioning a previously approved request. - - - - - + + - + When received within the timeout specified by CommissionNode, the client SHALL open a commissioning window on to the node which the client called RequestCommissioningApproval to have commissioned. @@ -67,9 +64,9 @@ limitations under the License. This event SHALL be sent by the server following a RequestCommissioningApproval command which the server responded to with SUCCESS. - - - + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/device-energy-management-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/device-energy-management-mode-cluster.xml index 043fb4a1833502..3ee32897b4df06 100644 --- a/src/app/zap-templates/zcl/data-model/chip/device-energy-management-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/device-energy-management-mode-cluster.xml @@ -19,8 +19,23 @@ limitations under the License. + + + + + + + + + + + + + - + diff --git a/src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml index 436967be2cee89..7c7dec635f3b6c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/dishwasher-mode-cluster.xml @@ -19,6 +19,22 @@ limitations under the License. + + + + + + + + + + + + + + @@ -39,7 +55,7 @@ limitations under the License. - + SupportedModes CurrentMode diff --git a/src/app/zap-templates/zcl/data-model/chip/ecosystem-information-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/ecosystem-information-cluster.xml index 1b553eeb54faf6..cf84a7e229aed6 100644 --- a/src/app/zap-templates/zcl/data-model/chip/ecosystem-information-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/ecosystem-information-cluster.xml @@ -44,15 +44,11 @@ limitations under the License. true - - RemovedOn - - - + DeviceDirectory - + LocationDirectory diff --git a/src/app/zap-templates/zcl/data-model/chip/energy-evse-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/energy-evse-mode-cluster.xml index c4b702b701d174..b5dc56682132a5 100644 --- a/src/app/zap-templates/zcl/data-model/chip/energy-evse-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/energy-evse-mode-cluster.xml @@ -19,6 +19,21 @@ limitations under the License. + + + + + + + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/global-attributes.xml b/src/app/zap-templates/zcl/data-model/chip/global-attributes.xml index 4b473a8ea26037..bad94e46df67bf 100644 --- a/src/app/zap-templates/zcl/data-model/chip/global-attributes.xml +++ b/src/app/zap-templates/zcl/data-model/chip/global-attributes.xml @@ -16,9 +16,7 @@ limitations under the License. --> - ClusterRevision ClusterRevision - FeatureMap FeatureMap AttributeList EventList diff --git a/src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-cluster.xml index 99e4ef50c9ca7b..b8afd87d76665c 100644 --- a/src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/laundry-washer-mode-cluster.xml @@ -19,6 +19,22 @@ limitations under the License. + + + + + + + + + + + + + + @@ -40,7 +56,7 @@ limitations under the License. - + SupportedModes CurrentMode diff --git a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml index ea18e985628071..93d6016ae48b59 100644 --- a/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml +++ b/src/app/zap-templates/zcl/data-model/chip/matter-devices.xml @@ -88,7 +88,7 @@ limitations under the License. - + @@ -265,7 +265,7 @@ limitations under the License. - + @@ -283,10 +283,10 @@ limitations under the License. - + - + @@ -366,7 +366,7 @@ limitations under the License. - + @@ -384,10 +384,10 @@ limitations under the License. - + - + @@ -464,7 +464,7 @@ limitations under the License. - + @@ -482,10 +482,10 @@ limitations under the License. - + - + @@ -506,7 +506,7 @@ limitations under the License. - + @@ -581,7 +581,7 @@ limitations under the License. - + @@ -599,10 +599,10 @@ limitations under the License. - + - + @@ -623,19 +623,19 @@ limitations under the License. - + - + - + - + - + @@ -714,7 +714,7 @@ limitations under the License. - + @@ -732,10 +732,10 @@ limitations under the License. - + - + @@ -808,7 +808,7 @@ limitations under the License. - + @@ -826,10 +826,10 @@ limitations under the License. - + - + @@ -1490,7 +1490,7 @@ limitations under the License. - + @@ -1503,7 +1503,7 @@ limitations under the License. - + @@ -1592,7 +1592,7 @@ limitations under the License. - + @@ -1629,7 +1629,7 @@ limitations under the License. - + @@ -1825,7 +1825,7 @@ limitations under the License. - + @@ -1986,7 +1986,7 @@ limitations under the License. - + @@ -2039,7 +2039,7 @@ limitations under the License. - + @@ -2144,7 +2144,7 @@ limitations under the License. - + @@ -2153,7 +2153,7 @@ limitations under the License. - + @@ -2188,10 +2188,10 @@ limitations under the License. - + - + @@ -2220,7 +2220,7 @@ limitations under the License. - + @@ -2241,14 +2241,14 @@ limitations under the License. - + - + @@ -2271,7 +2271,7 @@ limitations under the License. - + @@ -2303,13 +2303,13 @@ limitations under the License. - + - + - + @@ -2348,14 +2348,14 @@ limitations under the License. - + - + @@ -2647,7 +2647,7 @@ limitations under the License. - + @@ -2662,8 +2662,14 @@ limitations under the License. 0x0103 0x0077 - + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/microwave-oven-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/microwave-oven-mode-cluster.xml index 3e4e9cfe84d86c..856fde36da15ee 100644 --- a/src/app/zap-templates/zcl/data-model/chip/microwave-oven-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/microwave-oven-mode-cluster.xml @@ -19,6 +19,21 @@ limitations under the License. + + + + + + + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml index b8e81233473932..db99a3daba9bc0 100644 --- a/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/mode-base-cluster.xml @@ -21,6 +21,8 @@ limitations under the License. The generic enum values for the StatusCode and ModeTag enums are defined within the ModeBase namespace in the mode-base-server source code. See mode-base-cluster-objects.h. This is because zap does not currently support generating code for clusters that do not have a cluster ID. + +Each of these enum values is also listed/copied in the derived clusters. --> diff --git a/src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml index 23746d916cfa0f..0141a7542f4d78 100644 --- a/src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/occupancy-sensing-cluster.xml @@ -47,7 +47,7 @@ limitations under the License. Occupancy Sensing Measurement & Sensing - Attributes and commands for configuring occupancy sensing, and reporting occupancy status. + The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. 0x0406 OCCUPANCY_SENSING_CLUSTER @@ -147,5 +147,10 @@ limitations under the License. + + + If this event is supported, it SHALL be generated when the Occupancy attribute changes. + + diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml index bf296d237b8327..53b9c73cad6b3e 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-state-cluster.xml @@ -19,7 +19,6 @@ limitations under the License. - @@ -28,7 +27,6 @@ limitations under the License. - diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-state-oven-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-state-oven-cluster.xml index 83f2fc8b7984d4..fd52204b02fe85 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-state-oven-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-state-oven-cluster.xml @@ -16,6 +16,33 @@ limitations under the License. --> + + + + + + + + + + + + + + + + + + + + + + + Appliances Oven Cavity Operational State @@ -67,4 +94,4 @@ limitations under the License. - \ No newline at end of file + diff --git a/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml index 27817054967fb5..e3b054fe3fedce 100644 --- a/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/operational-state-rvc-cluster.xml @@ -19,6 +19,16 @@ limitations under the License. + + + + + + + + @@ -26,6 +36,16 @@ limitations under the License. + + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml index 41f95e81cdd248..0faa1b037eb318 100644 --- a/src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/oven-mode-cluster.xml @@ -19,6 +19,21 @@ limitations under the License. + + + + + + + + + + + + + diff --git a/src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-cluster.xml index e5ff239c18afa6..e29080ce4a43cb 100644 --- a/src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/refrigerator-and-temperature-controlled-cabinet-mode-cluster.xml @@ -19,6 +19,22 @@ limitations under the License. + + + + + + + + + + + + + + @@ -38,7 +54,7 @@ limitations under the License. - + SupportedModes CurrentMode diff --git a/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml index c528759d2a8cb7..65c2f17a3e8e75 100644 --- a/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/rvc-clean-mode-cluster.xml @@ -24,6 +24,22 @@ limitations under the License. + + + + + + + + + + + + + + @@ -37,8 +53,19 @@ limitations under the License. true true Attributes and commands for selecting a mode from a list of supported options. - - + + + + + + + + + + SupportedModes CurrentMode @@ -62,10 +89,4 @@ limitations under the License. - - - - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml index f13f86ac2dc97e..ce835576396bb8 100644 --- a/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/rvc-run-mode-cluster.xml @@ -31,6 +31,21 @@ limitations under the License. + + + + + + + + + + + + + @@ -44,7 +59,19 @@ limitations under the License. true true Attributes and commands for selecting a mode from a list of supported options. - + + + + + + + + + + SupportedModes CurrentMode @@ -67,10 +94,4 @@ limitations under the License. - - - - - - diff --git a/src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml index 72630933a26479..176163fae7fce6 100644 --- a/src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/switch-cluster.xml @@ -28,7 +28,7 @@ Two types of switch devices are supported: latching switch (e.g. rocker switch) Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. - + diff --git a/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml index c289ee9f1c4338..258c7cba5106df 100644 --- a/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/test-cluster.xml @@ -203,6 +203,14 @@ limitations under the License. global_enum global_struct + + readFailureCode + failureInt32U + + nullable_boolean nullable_bitmap8 nullable_bitmap16 diff --git a/src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml index 23a1b2eec5d4c0..502f9e3f032b54 100644 --- a/src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml +++ b/src/app/zap-templates/zcl/data-model/chip/water-heater-mode-cluster.xml @@ -19,6 +19,22 @@ limitations under the License. + + + + + + + + + + + + + + diff --git a/src/controller/AutoCommissioner.cpp b/src/controller/AutoCommissioner.cpp index 0e83d7125cf175..64f132c3124cda 100644 --- a/src/controller/AutoCommissioner.cpp +++ b/src/controller/AutoCommissioner.cpp @@ -502,8 +502,16 @@ CommissioningStage AutoCommissioner::GetNextCommissioningStageInternal(Commissio case CommissioningStage::kEvictPreviousCaseSessions: return CommissioningStage::kFindOperationalForStayActive; case CommissioningStage::kPrimaryOperationalNetworkFailed: - return CommissioningStage::kDisablePrimaryNetworkInterface; - case CommissioningStage::kDisablePrimaryNetworkInterface: + if (mDeviceCommissioningInfo.network.wifi.endpoint == kRootEndpointId) + { + return CommissioningStage::kRemoveWiFiNetworkConfig; + } + else + { + return CommissioningStage::kRemoveThreadNetworkConfig; + } + case CommissioningStage::kRemoveWiFiNetworkConfig: + case CommissioningStage::kRemoveThreadNetworkConfig: return GetNextCommissioningStageNetworkSetup(currentStage, lastErr); case CommissioningStage::kFindOperationalForStayActive: return CommissioningStage::kICDSendStayActive; @@ -567,7 +575,8 @@ EndpointId AutoCommissioner::GetEndpoint(const CommissioningStage & stage) const case CommissioningStage::kThreadNetworkSetup: case CommissioningStage::kThreadNetworkEnable: return mDeviceCommissioningInfo.network.thread.endpoint; - case CommissioningStage::kDisablePrimaryNetworkInterface: + case CommissioningStage::kRemoveWiFiNetworkConfig: + case CommissioningStage::kRemoveThreadNetworkConfig: return kRootEndpointId; default: return kRootEndpointId; diff --git a/src/controller/CHIPDeviceController.cpp b/src/controller/CHIPDeviceController.cpp index 955e36bfb0d8a2..346867226e4261 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -403,6 +403,9 @@ void DeviceController::Shutdown() // assume that all sessions for our fabric belong to us here. mSystemState->CASESessionMgr()->ReleaseSessionsForFabric(mFabricIndex); + // Shut down any bdx transfers we're acting as the server for. + mSystemState->BDXTransferServer()->AbortTransfersForFabric(mFabricIndex); + // TODO: The CASE session manager does not shut down existing CASE // sessions. It just shuts down any ongoing CASE session establishment // we're in the middle of as initiator. Maybe it should shut down @@ -1878,12 +1881,6 @@ void DeviceCommissioner::OnBasicSuccess(void * context, const chip::app::DataMod commissioner->CommissioningStageComplete(CHIP_NO_ERROR); } -void DeviceCommissioner::OnInterfaceEnableWriteSuccessResponse(void * context) -{ - DeviceCommissioner * commissioner = static_cast(context); - commissioner->CommissioningStageComplete(CHIP_NO_ERROR); -} - void DeviceCommissioner::OnBasicFailure(void * context, CHIP_ERROR error) { ChipLogProgress(Controller, "Received failure response %s\n", chip::ErrorStr(error)); @@ -3536,19 +3533,43 @@ void DeviceCommissioner::PerformCommissioningStep(DeviceProxy * proxy, Commissio } break; case CommissioningStage::kPrimaryOperationalNetworkFailed: { - // nothing to do. This stage indicates that the primary operational network failed and the network interface should be - // disabled later. + // nothing to do. This stage indicates that the primary operational network failed and the network config should be + // removed later. + break; + } + case CommissioningStage::kRemoveWiFiNetworkConfig: { + NetworkCommissioning::Commands::RemoveNetwork::Type request; + request.networkID = params.GetWiFiCredentials().Value().ssid; + request.breadcrumb.Emplace(breadcrumb); + CHIP_ERROR err = SendCommissioningCommand(proxy, request, OnNetworkConfigResponse, OnBasicFailure, endpoint, timeout); + if (err != CHIP_NO_ERROR) + { + // We won't get any async callbacks here, so just complete our stage. + ChipLogError(Controller, "Failed to send RemoveNetwork command: %" CHIP_ERROR_FORMAT, err.Format()); + CommissioningStageComplete(err); + return; + } break; } - case CommissioningStage::kDisablePrimaryNetworkInterface: { - NetworkCommissioning::Attributes::InterfaceEnabled::TypeInfo::Type request = false; - CHIP_ERROR err = SendCommissioningWriteRequest(proxy, endpoint, NetworkCommissioning::Id, - NetworkCommissioning::Attributes::InterfaceEnabled::Id, request, - OnInterfaceEnableWriteSuccessResponse, OnBasicFailure); + case CommissioningStage::kRemoveThreadNetworkConfig: { + ByteSpan extendedPanId; + chip::Thread::OperationalDataset operationalDataset; + if (!params.GetThreadOperationalDataset().HasValue() || + operationalDataset.Init(params.GetThreadOperationalDataset().Value()) != CHIP_NO_ERROR || + operationalDataset.GetExtendedPanIdAsByteSpan(extendedPanId) != CHIP_NO_ERROR) + { + ChipLogError(Controller, "Unable to get extended pan ID for thread operational dataset\n"); + CommissioningStageComplete(CHIP_ERROR_INVALID_ARGUMENT); + return; + } + NetworkCommissioning::Commands::RemoveNetwork::Type request; + request.networkID = extendedPanId; + request.breadcrumb.Emplace(breadcrumb); + CHIP_ERROR err = SendCommissioningCommand(proxy, request, OnNetworkConfigResponse, OnBasicFailure, endpoint, timeout); if (err != CHIP_NO_ERROR) { // We won't get any async callbacks here, so just complete our stage. - ChipLogError(Controller, "Failed to send InterfaceEnabled write request: %" CHIP_ERROR_FORMAT, err.Format()); + ChipLogError(Controller, "Failed to send RemoveNetwork command: %" CHIP_ERROR_FORMAT, err.Format()); CommissioningStageComplete(err); return; } diff --git a/src/controller/CHIPDeviceController.h b/src/controller/CHIPDeviceController.h index 4b876156199735..2ec020340ee98d 100644 --- a/src/controller/CHIPDeviceController.h +++ b/src/controller/CHIPDeviceController.h @@ -980,8 +980,6 @@ class DLL_EXPORT DeviceCommissioner : public DeviceController, OnICDManagementStayActiveResponse(void * context, const app::Clusters::IcdManagement::Commands::StayActiveResponse::DecodableType & data); - static void OnInterfaceEnableWriteSuccessResponse(void * context); - /** * @brief * This function processes the CSR sent by the device. diff --git a/src/controller/CommissionerDiscoveryController.cpp b/src/controller/CommissionerDiscoveryController.cpp index baf8e14bfd4e37..1e338b43dc796f 100644 --- a/src/controller/CommissionerDiscoveryController.cpp +++ b/src/controller/CommissionerDiscoveryController.cpp @@ -155,6 +155,13 @@ void CommissionerDiscoveryController::OnUserDirectedCommissioningRequest(UDCClie return; } + if (state.GetProductId() == 0 && state.GetVendorId() == 0) + { + // this is an invalid request and should be ignored + ChipLogDetail(Controller, "Ignoring the request as it's invalid. product and vendor id cannot be 0"); + return; + } + mReady = false; Platform::CopyString(mCurrentInstance, state.GetInstanceName()); mPendingConsent = true; @@ -163,7 +170,7 @@ void CommissionerDiscoveryController::OnUserDirectedCommissioningRequest(UDCClie sizeof(rotatingIdString)); if (err != CHIP_NO_ERROR) { - ChipLogError(AppServer, "On UDC: could not convert rotating id to hex"); + ChipLogError(Controller, "On UDC: could not convert rotating id to hex"); rotatingIdString[0] = '\0'; } else diff --git a/src/controller/CommissioningDelegate.cpp b/src/controller/CommissioningDelegate.cpp index 85ea5e86c5e3a6..d6acac6bc00bd4 100644 --- a/src/controller/CommissioningDelegate.cpp +++ b/src/controller/CommissioningDelegate.cpp @@ -139,8 +139,11 @@ const char * StageToString(CommissioningStage stage) case kPrimaryOperationalNetworkFailed: return "PrimaryOperationalNetworkFailed"; - case kDisablePrimaryNetworkInterface: - return "DisablePrimaryNetworkInterface"; + case kRemoveWiFiNetworkConfig: + return "RemoveWiFiNetworkConfig"; + + case kRemoveThreadNetworkConfig: + return "RemoveThreadNetworkConfig"; default: return "???"; diff --git a/src/controller/CommissioningDelegate.h b/src/controller/CommissioningDelegate.h index 7a96939cf49434..f0f98961adf3c3 100644 --- a/src/controller/CommissioningDelegate.h +++ b/src/controller/CommissioningDelegate.h @@ -79,9 +79,10 @@ enum CommissioningStage : uint8_t /// Call CHIPDeviceController::NetworkCredentialsReady() when CommissioningParameters is populated with /// network credentials to use in kWiFiNetworkSetup or kThreadNetworkSetup steps. kNeedsNetworkCreds, - kPrimaryOperationalNetworkFailed, ///< Indicate that the primary operational network (on root endpoint) failed, should disable - ///< the primary network interface later. - kDisablePrimaryNetworkInterface, ///< Send InterfaceEnabled write request to the device to disable network interface. + kPrimaryOperationalNetworkFailed, ///< Indicate that the primary operational network (on root endpoint) failed, should remove + ///< the primary network config later. + kRemoveWiFiNetworkConfig, ///< Remove Wi-Fi network config. + kRemoveThreadNetworkConfig ///< Remove Thread network config. }; enum class ICDRegistrationStrategy : uint8_t diff --git a/src/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 1413833c1b14c7..0a2a04ee0e420c 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -751,14 +751,10 @@ cluster AccessControl = 31 { fabric_idx fabricIndex = 254; } - fabric_sensitive info event access(read: administer) AccessRestrictionEntryChanged = 2 { - fabric_idx fabricIndex = 254; - } - - fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 3 { + fabric_sensitive info event access(read: administer) FabricRestrictionReviewUpdate = 2 { int64u token = 0; - nullable long_char_string instruction = 1; - nullable long_char_string redirectURL = 2; + optional long_char_string instruction = 1; + optional long_char_string ARLRequestFlowUrl = 2; fabric_idx fabricIndex = 254; } @@ -785,7 +781,7 @@ cluster AccessControl = 31 { } /** This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ - fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): DefaultSuccess = 0; + fabric command access(invoke: administer) ReviewFabricRestrictions(ReviewFabricRestrictionsRequest): ReviewFabricRestrictionsResponse = 0; } /** This cluster provides a standardized way for a Node (typically a Bridge, but could be any Node) to expose action information. */ @@ -2587,6 +2583,7 @@ cluster BridgedDeviceBasicInformation = 57 { request struct KeepActiveRequest { int32u stayActiveDuration = 0; + int32u timeoutMs = 1; } /** The server SHALL attempt to keep the devices specified active for StayActiveDuration milliseconds when they are next active. */ @@ -2597,7 +2594,7 @@ cluster BridgedDeviceBasicInformation = 57 { Two types of switch devices are supported: latching switch (e.g. rocker switch) and momentary switch (e.g. push button), distinguished with their feature flags. Interactions with the switch device are exposed as attributes (for the latching switch) and as events (for both types of switches). An interested party MAY subscribe to these attributes/events and thus be informed of the interactions, and can perform actions based on this, for example by sending commands to perform an action such as controlling a light or a window shade. */ cluster Switch = 59 { - revision 1; + revision 2; bitmap Feature : bitmap32 { kLatchingSwitch = 0x1; @@ -3209,6 +3206,16 @@ cluster OvenMode = 73 { revision 1; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kBake = 16384; kConvection = 16385; kGrill = 16386; @@ -3327,6 +3334,16 @@ cluster LaundryWasherMode = 81 { revision 2; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kNormal = 16384; kDelicate = 16385; kHeavy = 16386; @@ -3378,6 +3395,16 @@ cluster RefrigeratorAndTemperatureControlledCabinetMode = 82 { revision 2; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kRapidCool = 16384; kRapidFreeze = 16385; } @@ -3452,9 +3479,19 @@ cluster LaundryWasherControls = 83 { /** Attributes and commands for selecting a mode from a list of supported options. */ cluster RvcRunMode = 84 { - revision 2; + revision 3; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kIdle = 16384; kCleaning = 16385; kMapping = 16386; @@ -3472,7 +3509,7 @@ cluster RvcRunMode = 84 { } bitmap Feature : bitmap32 { - kNoFeatures = 0x0; + kDirectModeChange = 0x10000; } struct ModeTagStruct { @@ -3511,9 +3548,19 @@ cluster RvcRunMode = 84 { /** Attributes and commands for selecting a mode from a list of supported options. */ cluster RvcCleanMode = 85 { - revision 2; + revision 3; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kDeepClean = 16384; kVacuum = 16385; kMop = 16386; @@ -3524,7 +3571,7 @@ cluster RvcCleanMode = 85 { } bitmap Feature : bitmap32 { - kNoFeatures = 0x0; + kDirectModeChange = 0x10000; } struct ModeTagStruct { @@ -3624,6 +3671,16 @@ cluster DishwasherMode = 89 { revision 2; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kNormal = 16384; kHeavy = 16385; kLight = 16386; @@ -3865,6 +3922,16 @@ cluster MicrowaveOvenMode = 94 { revision 1; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kNormal = 16384; kDefrost = 16385; } @@ -4009,6 +4076,10 @@ cluster RvcOperationalState = 97 { revision 1; enum ErrorStateEnum : enum8 { + kNoError = 0; + kUnableToStartOrResume = 1; + kUnableToCompleteOperation = 2; + kCommandInvalidInState = 3; kFailedToFindChargingDock = 64; kStuck = 65; kDustBinMissing = 66; @@ -4020,6 +4091,10 @@ cluster RvcOperationalState = 97 { } enum OperationalStateEnum : enum8 { + kStopped = 0; + kRunning = 1; + kPaused = 2; + kError = 3; kSeekingCharger = 64; kCharging = 65; kDocked = 66; @@ -5457,6 +5532,16 @@ cluster EnergyEvseMode = 157 { revision 1; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kManual = 16384; kTimeOfUse = 16385; kSolarCharging = 16386; @@ -5507,6 +5592,16 @@ cluster WaterHeaterMode = 158 { revision 1; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kOff = 16384; kManual = 16385; kTimed = 16386; @@ -5557,6 +5652,16 @@ provisional cluster DeviceEnergyManagementMode = 159 { revision 1; enum ModeTag : enum16 { + kAuto = 0; + kQuick = 1; + kQuiet = 2; + kLowNoise = 3; + kLowEnergy = 4; + kVacation = 5; + kMin = 6; + kMax = 7; + kNight = 8; + kDay = 9; kNoOptimization = 16384; kDeviceOptimization = 16385; kLocalOptimization = 16386; @@ -7598,7 +7703,7 @@ cluster RelativeHumidityMeasurement = 1029 { readonly attribute int16u clusterRevision = 65533; } -/** Attributes and commands for configuring occupancy sensing, and reporting occupancy status. */ +/** The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */ cluster OccupancySensing = 1030 { revision 5; @@ -7636,6 +7741,10 @@ cluster OccupancySensing = 1030 { int16u holdTimeDefault = 2; } + info event OccupancyChanged = 0 { + OccupancyBitmap occupancy = 0; + } + readonly attribute OccupancyBitmap occupancy = 0; readonly attribute OccupancySensorTypeEnum occupancySensorType = 1; readonly attribute OccupancySensorTypeBitmap occupancySensorTypeBitmap = 2; @@ -9402,9 +9511,8 @@ provisional cluster EcosystemInformation = 1872 { fabric_idx fabricIndex = 254; } - readonly attribute access(read: manage) optional nullable epoch_us removedOn = 0; - readonly attribute access(read: manage) EcosystemDeviceStruct deviceDirectory[] = 1; - readonly attribute access(read: manage) EcosystemLocationStruct locationDirectory[] = 2; + readonly attribute access(read: manage) EcosystemDeviceStruct deviceDirectory[] = 0; + readonly attribute access(read: manage) EcosystemLocationStruct locationDirectory[] = 1; readonly attribute command_id generatedCommandList[] = 65528; readonly attribute command_id acceptedCommandList[] = 65529; readonly attribute event_id eventList[] = 65530; @@ -9422,9 +9530,9 @@ provisional cluster CommissionerControl = 1873 { } fabric_sensitive info event access(read: manage) CommissioningRequestResult = 0 { - int64u requestId = 0; - node_id clientNodeId = 1; - enum8 statusCode = 2; + int64u requestID = 0; + node_id clientNodeID = 1; + status statusCode = 2; fabric_idx fabricIndex = 254; } @@ -9437,17 +9545,15 @@ provisional cluster CommissionerControl = 1873 { readonly attribute int16u clusterRevision = 65533; request struct RequestCommissioningApprovalRequest { - int64u requestId = 0; - vendor_id vendorId = 1; - int16u productId = 2; + int64u requestID = 0; + vendor_id vendorID = 1; + int16u productID = 2; optional char_string<64> label = 3; } request struct CommissionNodeRequest { - int64u requestId = 0; + int64u requestID = 0; int16u responseTimeoutSeconds = 1; - optional octet_string ipAddress = 2; - optional int16u port = 3; } response struct ReverseOpenCommissioningWindow = 2 { @@ -9807,6 +9913,8 @@ internal cluster UnitTesting = 4294048773 { attribute TestGlobalEnum globalEnum = 51; attribute TestGlobalStruct globalStruct = 52; attribute optional boolean unsupported = 255; + attribute optional int8u readFailureCode = 12288; + attribute optional int32u failureInt32U = 12289; attribute nullable boolean nullableBoolean = 16384; attribute nullable Bitmap8MaskMap nullableBitmap8 = 16385; attribute nullable Bitmap16MaskMap nullableBitmap16 = 16386; diff --git a/src/controller/data_model/controller-clusters.zap b/src/controller/data_model/controller-clusters.zap index c82cc3da84f30c..32b6ea18fc8fb8 100644 --- a/src/controller/data_model/controller-clusters.zap +++ b/src/controller/data_model/controller-clusters.zap @@ -2332,7 +2332,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2392,7 +2392,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "2", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3226,7 +3226,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3239,10 +3239,10 @@ "side": "client", "type": "int16u", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -3491,7 +3491,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4910,10 +4910,10 @@ "side": "client", "type": "bitmap32", "included": 1, - "storageOption": "RAM", + "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "0", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -4944,6 +4944,7 @@ "define": "THREAD_NETWORK_DIRECTORY_CLUSTER", "side": "client", "enabled": 1, + "apiMaturity": "provisional", "commands": [ { "name": "AddNetwork", @@ -5994,4 +5995,4 @@ "parentEndpointIdentifier": null } ] -} +} \ No newline at end of file diff --git a/src/controller/java/AndroidCheckInDelegate.cpp b/src/controller/java/AndroidCheckInDelegate.cpp index 1091738c804bbc..ab28ea06f95583 100644 --- a/src/controller/java/AndroidCheckInDelegate.cpp +++ b/src/controller/java/AndroidCheckInDelegate.cpp @@ -23,8 +23,10 @@ #include #include -#define PARSE_CLIENT_INFO(_clientInfo, _peerNodeId, _startCounter, _offset, _monitoredSubject, _jniICDAesKey, _jniICDHmacKey) \ +#define PARSE_CLIENT_INFO(_clientInfo, _peerNodeId, _checkInNodeId, _startCounter, _offset, _monitoredSubject, _jniICDAesKey, \ + _jniICDHmacKey) \ jlong _peerNodeId = static_cast(_clientInfo.peer_node.GetNodeId()); \ + jlong _checkInNodeId = static_cast(_clientInfo.check_in_node.GetNodeId()); \ jlong _startCounter = static_cast(_clientInfo.start_icd_counter); \ jlong _offset = static_cast(_clientInfo.offset); \ jlong _monitoredSubject = static_cast(_clientInfo.monitored_subject); \ @@ -53,24 +55,26 @@ CHIP_ERROR AndroidCheckInDelegate::SetDelegate(jobject checkInDelegateObj) void AndroidCheckInDelegate::OnCheckInComplete(const ICDClientInfo & clientInfo) { - ChipLogProgress( - ICD, "Check In Message processing complete: start_counter=%" PRIu32 " offset=%" PRIu32 " nodeid=" ChipLogFormatScopedNodeId, - clientInfo.start_icd_counter, clientInfo.offset, ChipLogValueScopedNodeId(clientInfo.peer_node)); + ChipLogProgress(ICD, + "Check In Message processing complete: start_counter=%" PRIu32 " offset=%" PRIu32 + " peernodeid=" ChipLogFormatScopedNodeId " checkinnodeid=" ChipLogFormatScopedNodeId, + clientInfo.start_icd_counter, clientInfo.offset, ChipLogValueScopedNodeId(clientInfo.peer_node), + ChipLogValueScopedNodeId(clientInfo.check_in_node)); VerifyOrReturn(mCheckInDelegate.HasValidObjectRef(), ChipLogProgress(ICD, "check-in delegate is not implemented!")); JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); VerifyOrReturn(env != nullptr, ChipLogError(Controller, "JNIEnv is null!")); - PARSE_CLIENT_INFO(clientInfo, peerNodeId, startCounter, offset, monitoredSubject, jniICDAesKey, jniICDHmacKey) + PARSE_CLIENT_INFO(clientInfo, peerNodeId, checkInNodeId, startCounter, offset, monitoredSubject, jniICDAesKey, jniICDHmacKey) jmethodID onCheckInCompleteMethodID = nullptr; CHIP_ERROR err = chip::JniReferences::GetInstance().FindMethod(env, mCheckInDelegate.ObjectRef(), "onCheckInComplete", - "(JJJJ[B[B)V", &onCheckInCompleteMethodID); + "(JJJJJ[B[B)V", &onCheckInCompleteMethodID); VerifyOrReturn(err == CHIP_NO_ERROR, ChipLogProgress(ICD, "onCheckInComplete - FindMethod is failed! : %" CHIP_ERROR_FORMAT, err.Format())); - env->CallVoidMethod(mCheckInDelegate.ObjectRef(), onCheckInCompleteMethodID, peerNodeId, startCounter, offset, monitoredSubject, - jniICDAesKey.jniValue(), jniICDHmacKey.jniValue()); + env->CallVoidMethod(mCheckInDelegate.ObjectRef(), onCheckInCompleteMethodID, peerNodeId, checkInNodeId, startCounter, offset, + monitoredSubject, jniICDAesKey.jniValue(), jniICDHmacKey.jniValue()); } RefreshKeySender * AndroidCheckInDelegate::OnKeyRefreshNeeded(ICDClientInfo & clientInfo, ICDClientStorage * clientStorage) @@ -84,17 +88,18 @@ RefreshKeySender * AndroidCheckInDelegate::OnKeyRefreshNeeded(ICDClientInfo & cl JNIEnv * env = chip::JniReferences::GetInstance().GetEnvForCurrentThread(); VerifyOrReturnValue(env != nullptr, nullptr, ChipLogError(Controller, "JNIEnv is null!")); - PARSE_CLIENT_INFO(clientInfo, peerNodeId, startCounter, offset, monitoredSubject, jniICDAesKey, jniICDHmacKey) + PARSE_CLIENT_INFO(clientInfo, peerNodeId, checkInNodeId, startCounter, offset, monitoredSubject, jniICDAesKey, + jniICDHmacKey) jmethodID onKeyRefreshNeededMethodID = nullptr; - err = chip::JniReferences::GetInstance().FindMethod(env, mCheckInDelegate.ObjectRef(), "onKeyRefreshNeeded", "(JJJJ[B[B)V", + err = chip::JniReferences::GetInstance().FindMethod(env, mCheckInDelegate.ObjectRef(), "onKeyRefreshNeeded", "(JJJJJ[B[B)V", &onKeyRefreshNeededMethodID); VerifyOrReturnValue(err == CHIP_NO_ERROR, nullptr, ChipLogProgress(ICD, "onKeyRefreshNeeded - FindMethod is failed! : %" CHIP_ERROR_FORMAT, err.Format())); - jbyteArray key = static_cast(env->CallObjectMethod(mCheckInDelegate.ObjectRef(), onKeyRefreshNeededMethodID, - peerNodeId, startCounter, offset, monitoredSubject, - jniICDAesKey.jniValue(), jniICDHmacKey.jniValue())); + jbyteArray key = static_cast( + env->CallObjectMethod(mCheckInDelegate.ObjectRef(), onKeyRefreshNeededMethodID, peerNodeId, checkInNodeId, startCounter, + offset, monitoredSubject, jniICDAesKey.jniValue(), jniICDHmacKey.jniValue())); if (key != nullptr) { diff --git a/src/controller/java/AndroidDeviceControllerWrapper.cpp b/src/controller/java/AndroidDeviceControllerWrapper.cpp index af5d220295a983..f634f8a26fbc6b 100644 --- a/src/controller/java/AndroidDeviceControllerWrapper.cpp +++ b/src/controller/java/AndroidDeviceControllerWrapper.cpp @@ -1015,6 +1015,8 @@ void AndroidDeviceControllerWrapper::OnICDRegistrationComplete(chip::ScopedNodeI CHIP_ERROR err = CHIP_NO_ERROR; chip::app::ICDClientInfo clientInfo; clientInfo.peer_node = icdNodeId; + clientInfo.check_in_node = chip::ScopedNodeId(mAutoCommissioner.GetCommissioningParameters().GetICDCheckInNodeId().Value(), + icdNodeId.GetFabricIndex()); clientInfo.monitored_subject = mAutoCommissioner.GetCommissioningParameters().GetICDMonitoredSubject().Value(); clientInfo.start_icd_counter = icdCounter; @@ -1056,7 +1058,7 @@ void AndroidDeviceControllerWrapper::OnICDRegistrationComplete(chip::ScopedNodeI methodErr = chip::JniReferences::GetInstance().GetLocalClassRef(env, "chip/devicecontroller/ICDDeviceInfo", icdDeviceInfoClass); VerifyOrReturn(methodErr == CHIP_NO_ERROR, ChipLogError(Controller, "Could not find class ICDDeviceInfo")); - icdDeviceInfoStructCtor = env->GetMethodID(icdDeviceInfoClass, "", "([BILjava/lang/String;JJIJJJJI)V"); + icdDeviceInfoStructCtor = env->GetMethodID(icdDeviceInfoClass, "", "([BILjava/lang/String;JJIJJJJJI)V"); VerifyOrReturn(icdDeviceInfoStructCtor != nullptr, ChipLogError(Controller, "Could not find ICDDeviceInfo constructor")); methodErr = @@ -1069,7 +1071,9 @@ void AndroidDeviceControllerWrapper::OnICDRegistrationComplete(chip::ScopedNodeI icdDeviceInfoObj = env->NewObject( icdDeviceInfoClass, icdDeviceInfoStructCtor, jSymmetricKey, static_cast(mUserActiveModeTriggerHint.Raw()), jUserActiveModeTriggerInstruction, static_cast(mIdleModeDuration), static_cast(mActiveModeDuration), - static_cast(mActiveModeThreshold), static_cast(icdNodeId.GetNodeId()), static_cast(icdCounter), + static_cast(mActiveModeThreshold), static_cast(icdNodeId.GetNodeId()), + static_cast(mAutoCommissioner.GetCommissioningParameters().GetICDCheckInNodeId().Value()), + static_cast(icdCounter), static_cast(mAutoCommissioner.GetCommissioningParameters().GetICDMonitoredSubject().Value()), static_cast(Controller()->GetFabricId()), static_cast(Controller()->GetFabricIndex())); diff --git a/src/controller/java/AndroidICDClient.cpp b/src/controller/java/AndroidICDClient.cpp index 036d92bcf107b7..867a55da350a1f 100644 --- a/src/controller/java/AndroidICDClient.cpp +++ b/src/controller/java/AndroidICDClient.cpp @@ -58,7 +58,7 @@ jobject getICDClientInfo(JNIEnv * env, const char * icdClientInfoSign, jint jFab ChipLogError(Controller, "Find ICDClientInfo class: %" CHIP_ERROR_FORMAT, err.Format())); env->ExceptionClear(); - constructor = env->GetMethodID(infoClass, "", "(JJJJ[B[B)V"); + constructor = env->GetMethodID(infoClass, "", "(JJJJJ[B[B)V"); VerifyOrReturnValue(constructor != nullptr, nullptr, ChipLogError(Controller, "Find GetMethodID error!")); while (iter->Next(info)) @@ -84,9 +84,10 @@ jobject getICDClientInfo(JNIEnv * env, const char * icdClientInfoSign, jint jFab VerifyOrReturnValue(err == CHIP_NO_ERROR, nullptr, ChipLogError(Controller, "ICD HMAC KEY N2J_ByteArray error!: %" CHIP_ERROR_FORMAT, err.Format())); - jICDClientInfo = (jobject) env->NewObject(infoClass, constructor, static_cast(info.peer_node.GetNodeId()), - static_cast(info.start_icd_counter), static_cast(info.offset), - static_cast(info.monitored_subject), jIcdAesKey, jIcdHmacKey); + jICDClientInfo = static_cast( + env->NewObject(infoClass, constructor, static_cast(info.peer_node.GetNodeId()), + static_cast(info.check_in_node.GetNodeId()), static_cast(info.start_icd_counter), + static_cast(info.offset), static_cast(info.monitored_subject), jIcdAesKey, jIcdHmacKey)); err = chip::JniReferences::GetInstance().AddToList(jInfo, jICDClientInfo); VerifyOrReturnValue(err == CHIP_NO_ERROR, nullptr, @@ -154,6 +155,7 @@ CHIP_ERROR ParseICDClientInfo(JNIEnv * env, jint jFabricIndex, jobject jIcdClien VerifyOrReturnError(jIcdClientInfo != nullptr, CHIP_ERROR_INVALID_ARGUMENT); jmethodID getPeerNodeIdMethod = nullptr; + jmethodID getCheckInNodeIdMethod = nullptr; jmethodID getStartCounterMethod = nullptr; jmethodID getOffsetMethod = nullptr; jmethodID getMonitoredSubjectMethod = nullptr; @@ -162,6 +164,8 @@ CHIP_ERROR ParseICDClientInfo(JNIEnv * env, jint jFabricIndex, jobject jIcdClien ReturnErrorOnFailure( chip::JniReferences::GetInstance().FindMethod(env, jIcdClientInfo, "getPeerNodeId", "()J", &getPeerNodeIdMethod)); + ReturnErrorOnFailure( + chip::JniReferences::GetInstance().FindMethod(env, jIcdClientInfo, "getCheckInNodeId", "()J", &getCheckInNodeIdMethod)); ReturnErrorOnFailure( chip::JniReferences::GetInstance().FindMethod(env, jIcdClientInfo, "getStartCounter", "()J", &getStartCounterMethod)); ReturnErrorOnFailure(chip::JniReferences::GetInstance().FindMethod(env, jIcdClientInfo, "getOffset", "()J", &getOffsetMethod)); @@ -173,17 +177,20 @@ CHIP_ERROR ParseICDClientInfo(JNIEnv * env, jint jFabricIndex, jobject jIcdClien chip::JniReferences::GetInstance().FindMethod(env, jIcdClientInfo, "getIcdHmacKey", "()[B", &getIcdHmacKeyMethod)); jlong jPeerNodeId = env->CallLongMethod(jIcdClientInfo, getPeerNodeIdMethod); + jlong jCheckInNodeId = env->CallLongMethod(jIcdClientInfo, getCheckInNodeIdMethod); jlong jStartCounter = env->CallLongMethod(jIcdClientInfo, getStartCounterMethod); jlong jOffset = env->CallLongMethod(jIcdClientInfo, getOffsetMethod); jlong jMonitoredSubject = env->CallLongMethod(jIcdClientInfo, getMonitoredSubjectMethod); jbyteArray jIcdAesKey = static_cast(env->CallObjectMethod(jIcdClientInfo, getIcdAesKeyMethod)); jbyteArray jIcdHmacKey = static_cast(env->CallObjectMethod(jIcdClientInfo, getIcdHmacKeyMethod)); - chip::ScopedNodeId scopedNodeId(static_cast(jPeerNodeId), static_cast(jFabricIndex)); + chip::ScopedNodeId peerNodeId(static_cast(jPeerNodeId), static_cast(jFabricIndex)); + chip::ScopedNodeId checkInNodeId(static_cast(jCheckInNodeId), static_cast(jFabricIndex)); chip::JniByteArray jniIcdAesKey(env, jIcdAesKey); chip::JniByteArray jniIcdHmacKey(env, jIcdHmacKey); - icdClientInfo.peer_node = scopedNodeId; + icdClientInfo.peer_node = peerNodeId; + icdClientInfo.check_in_node = checkInNodeId; icdClientInfo.start_icd_counter = static_cast(jStartCounter); icdClientInfo.offset = static_cast(jOffset); icdClientInfo.monitored_subject = static_cast(jMonitoredSubject); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index cf344db593f46a..ce3d602f1f89b6 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -3982,11 +3982,11 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void reviewFabricRestrictions(DefaultClusterCallback callback, ArrayList arl) { + public void reviewFabricRestrictions(ReviewFabricRestrictionsResponseCallback callback, ArrayList arl) { reviewFabricRestrictions(callback, arl, 0); } - public void reviewFabricRestrictions(DefaultClusterCallback callback, ArrayList arl, int timedInvokeTimeoutMs) { + public void reviewFabricRestrictions(ReviewFabricRestrictionsResponseCallback callback, ArrayList arl, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); @@ -3998,10 +3998,24 @@ public void reviewFabricRestrictions(DefaultClusterCallback callback, ArrayList< invoke(new InvokeCallbackImpl(callback) { @Override public void onResponse(StructType invokeStructValue) { - callback.onSuccess(); + final long tokenFieldID = 0L; + Long token = null; + for (StructElement element: invokeStructValue.value()) { + if (element.contextTagNum() == tokenFieldID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + token = castingValue.value(Long.class); + } + } + } + callback.onSuccess(token); }}, commandId, commandArgs, timedInvokeTimeoutMs); } + public interface ReviewFabricRestrictionsResponseCallback extends BaseClusterCallback { + void onSuccess(Long token); + } + public interface AclAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -15197,11 +15211,11 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void keepActive(DefaultClusterCallback callback, Long stayActiveDuration) { - keepActive(callback, stayActiveDuration, 0); + public void keepActive(DefaultClusterCallback callback, Long stayActiveDuration, Long timeoutMs) { + keepActive(callback, stayActiveDuration, timeoutMs, 0); } - public void keepActive(DefaultClusterCallback callback, Long stayActiveDuration, int timedInvokeTimeoutMs) { + public void keepActive(DefaultClusterCallback callback, Long stayActiveDuration, Long timeoutMs, int timedInvokeTimeoutMs) { final long commandId = 128L; ArrayList elements = new ArrayList<>(); @@ -15209,6 +15223,10 @@ public void keepActive(DefaultClusterCallback callback, Long stayActiveDuration, BaseTLVType stayActiveDurationtlvValue = new UIntType(stayActiveDuration); elements.add(new StructElement(stayActiveDurationFieldID, stayActiveDurationtlvValue)); + final long timeoutMsFieldID = 1L; + BaseTLVType timeoutMstlvValue = new UIntType(timeoutMs); + elements.add(new StructElement(timeoutMsFieldID, timeoutMstlvValue)); + StructType commandArgs = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override @@ -60768,9 +60786,8 @@ public void onSuccess(byte[] tlv) { public static class EcosystemInformationCluster extends BaseChipCluster { public static final long CLUSTER_ID = 1872L; - private static final long REMOVED_ON_ATTRIBUTE_ID = 0L; - private static final long DEVICE_DIRECTORY_ATTRIBUTE_ID = 1L; - private static final long LOCATION_DIRECTORY_ATTRIBUTE_ID = 2L; + private static final long DEVICE_DIRECTORY_ATTRIBUTE_ID = 0L; + private static final long LOCATION_DIRECTORY_ATTRIBUTE_ID = 1L; private static final long GENERATED_COMMAND_LIST_ATTRIBUTE_ID = 65528L; private static final long ACCEPTED_COMMAND_LIST_ATTRIBUTE_ID = 65529L; private static final long EVENT_LIST_ATTRIBUTE_ID = 65530L; @@ -60788,10 +60805,6 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public interface RemovedOnAttributeCallback extends BaseAttributeCallback { - void onSuccess(@Nullable Long value); - } - public interface DeviceDirectoryAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } @@ -60816,32 +60829,6 @@ public interface AttributeListAttributeCallback extends BaseAttributeCallback { void onSuccess(List value); } - public void readRemovedOnAttribute( - RemovedOnAttributeCallback callback) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REMOVED_ON_ATTRIBUTE_ID); - - readAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, REMOVED_ON_ATTRIBUTE_ID, true); - } - - public void subscribeRemovedOnAttribute( - RemovedOnAttributeCallback callback, int minInterval, int maxInterval) { - ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, REMOVED_ON_ATTRIBUTE_ID); - - subscribeAttribute(new ReportCallbackImpl(callback, path) { - @Override - public void onSuccess(byte[] tlv) { - @Nullable Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); - callback.onSuccess(value); - } - }, REMOVED_ON_ATTRIBUTE_ID, minInterval, maxInterval); - } - public void readDeviceDirectoryAttribute( DeviceDirectoryAttributeCallback callback) { readDeviceDirectoryAttributeWithFabricFilter(callback, true); @@ -61082,25 +61069,25 @@ public long initWithDevice(long devicePtr, int endpointId) { return 0L; } - public void requestCommissioningApproval(DefaultClusterCallback callback, Long requestId, Integer vendorId, Integer productId, Optional label) { - requestCommissioningApproval(callback, requestId, vendorId, productId, label, 0); + public void requestCommissioningApproval(DefaultClusterCallback callback, Long requestID, Integer vendorID, Integer productID, Optional label) { + requestCommissioningApproval(callback, requestID, vendorID, productID, label, 0); } - public void requestCommissioningApproval(DefaultClusterCallback callback, Long requestId, Integer vendorId, Integer productId, Optional label, int timedInvokeTimeoutMs) { + public void requestCommissioningApproval(DefaultClusterCallback callback, Long requestID, Integer vendorID, Integer productID, Optional label, int timedInvokeTimeoutMs) { final long commandId = 0L; ArrayList elements = new ArrayList<>(); - final long requestIdFieldID = 0L; - BaseTLVType requestIdtlvValue = new UIntType(requestId); - elements.add(new StructElement(requestIdFieldID, requestIdtlvValue)); + final long requestIDFieldID = 0L; + BaseTLVType requestIDtlvValue = new UIntType(requestID); + elements.add(new StructElement(requestIDFieldID, requestIDtlvValue)); - final long vendorIdFieldID = 1L; - BaseTLVType vendorIdtlvValue = new UIntType(vendorId); - elements.add(new StructElement(vendorIdFieldID, vendorIdtlvValue)); + final long vendorIDFieldID = 1L; + BaseTLVType vendorIDtlvValue = new UIntType(vendorID); + elements.add(new StructElement(vendorIDFieldID, vendorIDtlvValue)); - final long productIdFieldID = 2L; - BaseTLVType productIdtlvValue = new UIntType(productId); - elements.add(new StructElement(productIdFieldID, productIdtlvValue)); + final long productIDFieldID = 2L; + BaseTLVType productIDtlvValue = new UIntType(productID); + elements.add(new StructElement(productIDFieldID, productIDtlvValue)); final long labelFieldID = 3L; BaseTLVType labeltlvValue = label.map((nonOptionallabel) -> new StringType(nonOptionallabel)).orElse(new EmptyType()); @@ -61114,30 +61101,22 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void commissionNode(ReverseOpenCommissioningWindowCallback callback, Long requestId, Integer responseTimeoutSeconds, Optional ipAddress, Optional port) { - commissionNode(callback, requestId, responseTimeoutSeconds, ipAddress, port, 0); + public void commissionNode(ReverseOpenCommissioningWindowCallback callback, Long requestID, Integer responseTimeoutSeconds) { + commissionNode(callback, requestID, responseTimeoutSeconds, 0); } - public void commissionNode(ReverseOpenCommissioningWindowCallback callback, Long requestId, Integer responseTimeoutSeconds, Optional ipAddress, Optional port, int timedInvokeTimeoutMs) { + public void commissionNode(ReverseOpenCommissioningWindowCallback callback, Long requestID, Integer responseTimeoutSeconds, int timedInvokeTimeoutMs) { final long commandId = 1L; ArrayList elements = new ArrayList<>(); - final long requestIdFieldID = 0L; - BaseTLVType requestIdtlvValue = new UIntType(requestId); - elements.add(new StructElement(requestIdFieldID, requestIdtlvValue)); + final long requestIDFieldID = 0L; + BaseTLVType requestIDtlvValue = new UIntType(requestID); + elements.add(new StructElement(requestIDFieldID, requestIDtlvValue)); final long responseTimeoutSecondsFieldID = 1L; BaseTLVType responseTimeoutSecondstlvValue = new UIntType(responseTimeoutSeconds); elements.add(new StructElement(responseTimeoutSecondsFieldID, responseTimeoutSecondstlvValue)); - final long ipAddressFieldID = 2L; - BaseTLVType ipAddresstlvValue = ipAddress.map((nonOptionalipAddress) -> new ByteArrayType(nonOptionalipAddress)).orElse(new EmptyType()); - elements.add(new StructElement(ipAddressFieldID, ipAddresstlvValue)); - - final long portFieldID = 3L; - BaseTLVType porttlvValue = port.map((nonOptionalport) -> new UIntType(nonOptionalport)).orElse(new EmptyType()); - elements.add(new StructElement(portFieldID, porttlvValue)); - StructType commandArgs = new StructType(elements); invoke(new InvokeCallbackImpl(callback) { @Override @@ -65205,6 +65184,8 @@ public static class UnitTestingCluster extends BaseChipCluster { private static final long GLOBAL_ENUM_ATTRIBUTE_ID = 51L; private static final long GLOBAL_STRUCT_ATTRIBUTE_ID = 52L; private static final long UNSUPPORTED_ATTRIBUTE_ID = 255L; + private static final long READ_FAILURE_CODE_ATTRIBUTE_ID = 12288L; + private static final long FAILURE_INT32_U_ATTRIBUTE_ID = 12289L; private static final long NULLABLE_BOOLEAN_ATTRIBUTE_ID = 16384L; private static final long NULLABLE_BITMAP8_ATTRIBUTE_ID = 16385L; private static final long NULLABLE_BITMAP16_ATTRIBUTE_ID = 16386L; @@ -68365,6 +68346,76 @@ public void onSuccess(byte[] tlv) { }, UNSUPPORTED_ATTRIBUTE_ID, minInterval, maxInterval); } + public void readReadFailureCodeAttribute( + IntegerAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, READ_FAILURE_CODE_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, READ_FAILURE_CODE_ATTRIBUTE_ID, true); + } + + public void writeReadFailureCodeAttribute(DefaultClusterCallback callback, Integer value) { + writeReadFailureCodeAttribute(callback, value, 0); + } + + public void writeReadFailureCodeAttribute(DefaultClusterCallback callback, Integer value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), READ_FAILURE_CODE_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeReadFailureCodeAttribute( + IntegerAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, READ_FAILURE_CODE_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Integer value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, READ_FAILURE_CODE_ATTRIBUTE_ID, minInterval, maxInterval); + } + + public void readFailureInt32UAttribute( + LongAttributeCallback callback) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FAILURE_INT32_U_ATTRIBUTE_ID); + + readAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FAILURE_INT32_U_ATTRIBUTE_ID, true); + } + + public void writeFailureInt32UAttribute(DefaultClusterCallback callback, Long value) { + writeFailureInt32UAttribute(callback, value, 0); + } + + public void writeFailureInt32UAttribute(DefaultClusterCallback callback, Long value, int timedWriteTimeoutMs) { + BaseTLVType tlvValue = new UIntType(value); + writeAttribute(new WriteAttributesCallbackImpl(callback), FAILURE_INT32_U_ATTRIBUTE_ID, tlvValue, timedWriteTimeoutMs); + } + + public void subscribeFailureInt32UAttribute( + LongAttributeCallback callback, int minInterval, int maxInterval) { + ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, FAILURE_INT32_U_ATTRIBUTE_ID); + + subscribeAttribute(new ReportCallbackImpl(callback, path) { + @Override + public void onSuccess(byte[] tlv) { + Long value = ChipTLVValueDecoder.decodeAttributeValue(path, tlv); + callback.onSuccess(value); + } + }, FAILURE_INT32_U_ATTRIBUTE_ID, minInterval, maxInterval); + } + public void readNullableBooleanAttribute( NullableBooleanAttributeCallback callback) { ChipAttributePath path = ChipAttributePath.newInstance(endpointId, clusterId, NULLABLE_BOOLEAN_ATTRIBUTE_ID); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java index 160f29d2cf8344..737462f3da184d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java @@ -236,79 +236,33 @@ public String toString() { return output.toString(); } } -public static class AccessControlClusterAccessRestrictionEntryChangedEvent { - public Integer fabricIndex; - private static final long FABRIC_INDEX_ID = 254L; - - public AccessControlClusterAccessRestrictionEntryChangedEvent( - Integer fabricIndex - ) { - this.fabricIndex = fabricIndex; - } - - public StructType encodeTlv() { - ArrayList values = new ArrayList<>(); - values.add(new StructElement(FABRIC_INDEX_ID, new UIntType(fabricIndex))); - - return new StructType(values); - } - - public static AccessControlClusterAccessRestrictionEntryChangedEvent decodeTlv(BaseTLVType tlvValue) { - if (tlvValue == null || tlvValue.type() != TLVType.Struct) { - return null; - } - Integer fabricIndex = null; - for (StructElement element: ((StructType)tlvValue).value()) { - if (element.contextTagNum() == FABRIC_INDEX_ID) { - if (element.value(BaseTLVType.class).type() == TLVType.UInt) { - UIntType castingValue = element.value(UIntType.class); - fabricIndex = castingValue.value(Integer.class); - } - } - } - return new AccessControlClusterAccessRestrictionEntryChangedEvent( - fabricIndex - ); - } - - @Override - public String toString() { - StringBuilder output = new StringBuilder(); - output.append("AccessControlClusterAccessRestrictionEntryChangedEvent {\n"); - output.append("\tfabricIndex: "); - output.append(fabricIndex); - output.append("\n"); - output.append("}\n"); - return output.toString(); - } -} public static class AccessControlClusterFabricRestrictionReviewUpdateEvent { public Long token; - public @Nullable String instruction; - public @Nullable String redirectURL; + public Optional instruction; + public Optional ARLRequestFlowUrl; public Integer fabricIndex; private static final long TOKEN_ID = 0L; private static final long INSTRUCTION_ID = 1L; - private static final long REDIRECT_URL_ID = 2L; + private static final long ARL_REQUEST_FLOW_URL_ID = 2L; private static final long FABRIC_INDEX_ID = 254L; public AccessControlClusterFabricRestrictionReviewUpdateEvent( Long token, - @Nullable String instruction, - @Nullable String redirectURL, + Optional instruction, + Optional ARLRequestFlowUrl, Integer fabricIndex ) { this.token = token; this.instruction = instruction; - this.redirectURL = redirectURL; + this.ARLRequestFlowUrl = ARLRequestFlowUrl; this.fabricIndex = fabricIndex; } public StructType encodeTlv() { ArrayList values = new ArrayList<>(); values.add(new StructElement(TOKEN_ID, new UIntType(token))); - values.add(new StructElement(INSTRUCTION_ID, instruction != null ? new StringType(instruction) : new NullType())); - values.add(new StructElement(REDIRECT_URL_ID, redirectURL != null ? new StringType(redirectURL) : new NullType())); + values.add(new StructElement(INSTRUCTION_ID, instruction.map((nonOptionalinstruction) -> new StringType(nonOptionalinstruction)).orElse(new EmptyType()))); + values.add(new StructElement(ARL_REQUEST_FLOW_URL_ID, ARLRequestFlowUrl.map((nonOptionalARLRequestFlowUrl) -> new StringType(nonOptionalARLRequestFlowUrl)).orElse(new EmptyType()))); values.add(new StructElement(FABRIC_INDEX_ID, new UIntType(fabricIndex))); return new StructType(values); @@ -319,8 +273,8 @@ public static AccessControlClusterFabricRestrictionReviewUpdateEvent decodeTlv(B return null; } Long token = null; - @Nullable String instruction = null; - @Nullable String redirectURL = null; + Optional instruction = Optional.empty(); + Optional ARLRequestFlowUrl = Optional.empty(); Integer fabricIndex = null; for (StructElement element: ((StructType)tlvValue).value()) { if (element.contextTagNum() == TOKEN_ID) { @@ -331,12 +285,12 @@ public static AccessControlClusterFabricRestrictionReviewUpdateEvent decodeTlv(B } else if (element.contextTagNum() == INSTRUCTION_ID) { if (element.value(BaseTLVType.class).type() == TLVType.String) { StringType castingValue = element.value(StringType.class); - instruction = castingValue.value(String.class); + instruction = Optional.of(castingValue.value(String.class)); } - } else if (element.contextTagNum() == REDIRECT_URL_ID) { + } else if (element.contextTagNum() == ARL_REQUEST_FLOW_URL_ID) { if (element.value(BaseTLVType.class).type() == TLVType.String) { StringType castingValue = element.value(StringType.class); - redirectURL = castingValue.value(String.class); + ARLRequestFlowUrl = Optional.of(castingValue.value(String.class)); } } else if (element.contextTagNum() == FABRIC_INDEX_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -348,7 +302,7 @@ public static AccessControlClusterFabricRestrictionReviewUpdateEvent decodeTlv(B return new AccessControlClusterFabricRestrictionReviewUpdateEvent( token, instruction, - redirectURL, + ARLRequestFlowUrl, fabricIndex ); } @@ -363,8 +317,8 @@ public String toString() { output.append("\tinstruction: "); output.append(instruction); output.append("\n"); - output.append("\tredirectURL: "); - output.append(redirectURL); + output.append("\tARLRequestFlowUrl: "); + output.append(ARLRequestFlowUrl); output.append("\n"); output.append("\tfabricIndex: "); output.append(fabricIndex); @@ -5871,6 +5825,52 @@ public String toString() { return output.toString(); } } +public static class OccupancySensingClusterOccupancyChangedEvent { + public Integer occupancy; + private static final long OCCUPANCY_ID = 0L; + + public OccupancySensingClusterOccupancyChangedEvent( + Integer occupancy + ) { + this.occupancy = occupancy; + } + + public StructType encodeTlv() { + ArrayList values = new ArrayList<>(); + values.add(new StructElement(OCCUPANCY_ID, new UIntType(occupancy))); + + return new StructType(values); + } + + public static OccupancySensingClusterOccupancyChangedEvent decodeTlv(BaseTLVType tlvValue) { + if (tlvValue == null || tlvValue.type() != TLVType.Struct) { + return null; + } + Integer occupancy = null; + for (StructElement element: ((StructType)tlvValue).value()) { + if (element.contextTagNum() == OCCUPANCY_ID) { + if (element.value(BaseTLVType.class).type() == TLVType.UInt) { + UIntType castingValue = element.value(UIntType.class); + occupancy = castingValue.value(Integer.class); + } + } + } + return new OccupancySensingClusterOccupancyChangedEvent( + occupancy + ); + } + + @Override + public String toString() { + StringBuilder output = new StringBuilder(); + output.append("OccupancySensingClusterOccupancyChangedEvent {\n"); + output.append("\toccupancy: "); + output.append(occupancy); + output.append("\n"); + output.append("}\n"); + return output.toString(); + } +} public static class TargetNavigatorClusterTargetUpdatedEvent { public ArrayList targetList; public Integer currentTarget; @@ -6188,8 +6188,8 @@ public String toString() { } } public static class CommissionerControlClusterCommissioningRequestResultEvent { - public Long requestId; - public Long clientNodeId; + public Long requestID; + public Long clientNodeID; public Integer statusCode; public Integer fabricIndex; private static final long REQUEST_ID_ID = 0L; @@ -6198,21 +6198,21 @@ public static class CommissionerControlClusterCommissioningRequestResultEvent { private static final long FABRIC_INDEX_ID = 254L; public CommissionerControlClusterCommissioningRequestResultEvent( - Long requestId, - Long clientNodeId, + Long requestID, + Long clientNodeID, Integer statusCode, Integer fabricIndex ) { - this.requestId = requestId; - this.clientNodeId = clientNodeId; + this.requestID = requestID; + this.clientNodeID = clientNodeID; this.statusCode = statusCode; this.fabricIndex = fabricIndex; } public StructType encodeTlv() { ArrayList values = new ArrayList<>(); - values.add(new StructElement(REQUEST_ID_ID, new UIntType(requestId))); - values.add(new StructElement(CLIENT_NODE_ID_ID, new UIntType(clientNodeId))); + values.add(new StructElement(REQUEST_ID_ID, new UIntType(requestID))); + values.add(new StructElement(CLIENT_NODE_ID_ID, new UIntType(clientNodeID))); values.add(new StructElement(STATUS_CODE_ID, new UIntType(statusCode))); values.add(new StructElement(FABRIC_INDEX_ID, new UIntType(fabricIndex))); @@ -6223,20 +6223,20 @@ public static CommissionerControlClusterCommissioningRequestResultEvent decodeTl if (tlvValue == null || tlvValue.type() != TLVType.Struct) { return null; } - Long requestId = null; - Long clientNodeId = null; + Long requestID = null; + Long clientNodeID = null; Integer statusCode = null; Integer fabricIndex = null; for (StructElement element: ((StructType)tlvValue).value()) { if (element.contextTagNum() == REQUEST_ID_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - requestId = castingValue.value(Long.class); + requestID = castingValue.value(Long.class); } } else if (element.contextTagNum() == CLIENT_NODE_ID_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { UIntType castingValue = element.value(UIntType.class); - clientNodeId = castingValue.value(Long.class); + clientNodeID = castingValue.value(Long.class); } } else if (element.contextTagNum() == STATUS_CODE_ID) { if (element.value(BaseTLVType.class).type() == TLVType.UInt) { @@ -6251,8 +6251,8 @@ public static CommissionerControlClusterCommissioningRequestResultEvent decodeTl } } return new CommissionerControlClusterCommissioningRequestResultEvent( - requestId, - clientNodeId, + requestID, + clientNodeID, statusCode, fabricIndex ); @@ -6262,11 +6262,11 @@ public static CommissionerControlClusterCommissioningRequestResultEvent decodeTl public String toString() { StringBuilder output = new StringBuilder(); output.append("CommissionerControlClusterCommissioningRequestResultEvent {\n"); - output.append("\trequestId: "); - output.append(requestId); + output.append("\trequestID: "); + output.append(requestID); output.append("\n"); - output.append("\tclientNodeId: "); - output.append(clientNodeId); + output.append("\tclientNodeID: "); + output.append(clientNodeID); output.append("\n"); output.append("\tstatusCode: "); output.append(statusCode); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index 5dbefbab1da2b7..950e6070dff2c0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -1717,8 +1717,7 @@ public static Attribute value(long id) throws NoSuchFieldError { public enum Event { AccessControlEntryChanged(0L), AccessControlExtensionChanged(1L), - AccessRestrictionEntryChanged(2L), - FabricRestrictionReviewUpdate(3L),; + FabricRestrictionReviewUpdate(2L),; private final long id; Event(long id) { this.id = id; @@ -4543,7 +4542,7 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum KeepActiveCommandField {StayActiveDuration(0),; + }public enum KeepActiveCommandField {StayActiveDuration(0),TimeoutMs(1),; private final int id; KeepActiveCommandField(int id) { this.id = id; @@ -13593,7 +13592,8 @@ public static Attribute value(long id) throws NoSuchFieldError { } } - public enum Event {; + public enum Event { + OccupancyChanged(0L),; private final long id; Event(long id) { this.id = id; @@ -17237,9 +17237,8 @@ public long getID() { } public enum Attribute { - RemovedOn(0L), - DeviceDirectory(1L), - LocationDirectory(2L), + DeviceDirectory(0L), + LocationDirectory(1L), GeneratedCommandList(65528L), AcceptedCommandList(65529L), EventList(65530L), @@ -17407,7 +17406,7 @@ public static Command value(long id) throws NoSuchFieldError { } throw new NoSuchFieldError(); } - }public enum RequestCommissioningApprovalCommandField {RequestId(0),VendorId(1),ProductId(2),Label(3),; + }public enum RequestCommissioningApprovalCommandField {RequestID(0),VendorID(1),ProductID(2),Label(3),; private final int id; RequestCommissioningApprovalCommandField(int id) { this.id = id; @@ -17424,7 +17423,7 @@ public static RequestCommissioningApprovalCommandField value(int id) throws NoSu } throw new NoSuchFieldError(); } - }public enum CommissionNodeCommandField {RequestId(0),ResponseTimeoutSeconds(1),IpAddress(2),Port(3),; + }public enum CommissionNodeCommandField {RequestID(0),ResponseTimeoutSeconds(1),; private final int id; CommissionNodeCommandField(int id) { this.id = id; @@ -17775,6 +17774,8 @@ public enum Attribute { GlobalEnum(51L), GlobalStruct(52L), Unsupported(255L), + ReadFailureCode(12288L), + FailureInt32U(12289L), NullableBoolean(16384L), NullableBitmap8(16385L), NullableBitmap16(16386L), diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index f58ac0f6e47798..6e009e3ae63c5a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -1341,6 +1341,28 @@ public void onError(Exception ex) { } } + + public static class DelegatedAccessControlClusterReviewFabricRestrictionsResponseCallback implements ChipClusters.AccessControlCluster.ReviewFabricRestrictionsResponseCallback, DelegatedClusterCallback { + private ClusterCommandCallback callback; + @Override + public void setCallbackDelegate(ClusterCommandCallback callback) { + this.callback = callback; + } + + @Override + public void onSuccess(Long token) { + Map responseValues = new LinkedHashMap<>(); + + CommandResponseInfo tokenResponseValue = new CommandResponseInfo("token", "Long"); + responseValues.put(tokenResponseValue, token); + callback.onSuccess(responseValues); + } + + @Override + public void onError(Exception error) { + callback.onFailure(error); + } + } public static class DelegatedAccessControlClusterAclAttributeCallback implements ChipClusters.AccessControlCluster.AclAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -20222,27 +20244,6 @@ public void onError(Exception ex) { } } - public static class DelegatedEcosystemInformationClusterRemovedOnAttributeCallback implements ChipClusters.EcosystemInformationCluster.RemovedOnAttributeCallback, DelegatedClusterCallback { - private ClusterCommandCallback callback; - @Override - public void setCallbackDelegate(ClusterCommandCallback callback) { - this.callback = callback; - } - - @Override - public void onSuccess(@Nullable Long value) { - Map responseValues = new LinkedHashMap<>(); - CommandResponseInfo commandResponseInfo = new CommandResponseInfo("value", "Long"); - responseValues.put(commandResponseInfo, value); - callback.onSuccess(responseValues); - } - - @Override - public void onError(Exception ex) { - callback.onFailure(ex); - } - } - public static class DelegatedEcosystemInformationClusterDeviceDirectoryAttributeCallback implements ChipClusters.EcosystemInformationCluster.DeviceDirectoryAttributeCallback, DelegatedClusterCallback { private ClusterCommandCallback callback; @Override @@ -23389,14 +23390,15 @@ public Map> getCommandMap() { InteractionInfo accessControlreviewFabricRestrictionsInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.AccessControlCluster) cluster) - .reviewFabricRestrictions((DefaultClusterCallback) callback - , (ArrayList) - commandArguments.get("arl") - ); - }, - () -> new DelegatedDefaultClusterCallback(), + .reviewFabricRestrictions((ChipClusters.AccessControlCluster.ReviewFabricRestrictionsResponseCallback) callback + , (ArrayList) + commandArguments.get("arl") + + ); + }, + () -> new DelegatedAccessControlClusterReviewFabricRestrictionsResponseCallback(), accessControlreviewFabricRestrictionsCommandParams - ); + ); accessControlClusterInteractionInfoMap.put("reviewFabricRestrictions", accessControlreviewFabricRestrictionsInteractionInfo); commandMap.put("accessControl", accessControlClusterInteractionInfoMap); @@ -24443,12 +24445,17 @@ public Map> getCommandMap() { CommandParameterInfo bridgedDeviceBasicInformationkeepActivestayActiveDurationCommandParameterInfo = new CommandParameterInfo("stayActiveDuration", Long.class, Long.class); bridgedDeviceBasicInformationkeepActiveCommandParams.put("stayActiveDuration",bridgedDeviceBasicInformationkeepActivestayActiveDurationCommandParameterInfo); + + CommandParameterInfo bridgedDeviceBasicInformationkeepActivetimeoutMsCommandParameterInfo = new CommandParameterInfo("timeoutMs", Long.class, Long.class); + bridgedDeviceBasicInformationkeepActiveCommandParams.put("timeoutMs",bridgedDeviceBasicInformationkeepActivetimeoutMsCommandParameterInfo); InteractionInfo bridgedDeviceBasicInformationkeepActiveInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.BridgedDeviceBasicInformationCluster) cluster) .keepActive((DefaultClusterCallback) callback , (Long) commandArguments.get("stayActiveDuration") + , (Long) + commandArguments.get("timeoutMs") ); }, () -> new DelegatedDefaultClusterCallback(), @@ -29025,14 +29032,14 @@ public Map> getCommandMap() { Map commissionerControlrequestCommissioningApprovalCommandParams = new LinkedHashMap(); - CommandParameterInfo commissionerControlrequestCommissioningApprovalrequestIdCommandParameterInfo = new CommandParameterInfo("requestId", Long.class, Long.class); - commissionerControlrequestCommissioningApprovalCommandParams.put("requestId",commissionerControlrequestCommissioningApprovalrequestIdCommandParameterInfo); + CommandParameterInfo commissionerControlrequestCommissioningApprovalrequestIDCommandParameterInfo = new CommandParameterInfo("requestID", Long.class, Long.class); + commissionerControlrequestCommissioningApprovalCommandParams.put("requestID",commissionerControlrequestCommissioningApprovalrequestIDCommandParameterInfo); - CommandParameterInfo commissionerControlrequestCommissioningApprovalvendorIdCommandParameterInfo = new CommandParameterInfo("vendorId", Integer.class, Integer.class); - commissionerControlrequestCommissioningApprovalCommandParams.put("vendorId",commissionerControlrequestCommissioningApprovalvendorIdCommandParameterInfo); + CommandParameterInfo commissionerControlrequestCommissioningApprovalvendorIDCommandParameterInfo = new CommandParameterInfo("vendorID", Integer.class, Integer.class); + commissionerControlrequestCommissioningApprovalCommandParams.put("vendorID",commissionerControlrequestCommissioningApprovalvendorIDCommandParameterInfo); - CommandParameterInfo commissionerControlrequestCommissioningApprovalproductIdCommandParameterInfo = new CommandParameterInfo("productId", Integer.class, Integer.class); - commissionerControlrequestCommissioningApprovalCommandParams.put("productId",commissionerControlrequestCommissioningApprovalproductIdCommandParameterInfo); + CommandParameterInfo commissionerControlrequestCommissioningApprovalproductIDCommandParameterInfo = new CommandParameterInfo("productID", Integer.class, Integer.class); + commissionerControlrequestCommissioningApprovalCommandParams.put("productID",commissionerControlrequestCommissioningApprovalproductIDCommandParameterInfo); CommandParameterInfo commissionerControlrequestCommissioningApprovallabelCommandParameterInfo = new CommandParameterInfo("label", Optional.class, String.class); commissionerControlrequestCommissioningApprovalCommandParams.put("label",commissionerControlrequestCommissioningApprovallabelCommandParameterInfo); @@ -29041,11 +29048,11 @@ public Map> getCommandMap() { ((ChipClusters.CommissionerControlCluster) cluster) .requestCommissioningApproval((DefaultClusterCallback) callback , (Long) - commandArguments.get("requestId") + commandArguments.get("requestID") , (Integer) - commandArguments.get("vendorId") + commandArguments.get("vendorID") , (Integer) - commandArguments.get("productId") + commandArguments.get("productID") , (Optional) commandArguments.get("label") ); @@ -29057,33 +29064,21 @@ public Map> getCommandMap() { Map commissionerControlcommissionNodeCommandParams = new LinkedHashMap(); - CommandParameterInfo commissionerControlcommissionNoderequestIdCommandParameterInfo = new CommandParameterInfo("requestId", Long.class, Long.class); - commissionerControlcommissionNodeCommandParams.put("requestId",commissionerControlcommissionNoderequestIdCommandParameterInfo); + CommandParameterInfo commissionerControlcommissionNoderequestIDCommandParameterInfo = new CommandParameterInfo("requestID", Long.class, Long.class); + commissionerControlcommissionNodeCommandParams.put("requestID",commissionerControlcommissionNoderequestIDCommandParameterInfo); CommandParameterInfo commissionerControlcommissionNoderesponseTimeoutSecondsCommandParameterInfo = new CommandParameterInfo("responseTimeoutSeconds", Integer.class, Integer.class); commissionerControlcommissionNodeCommandParams.put("responseTimeoutSeconds",commissionerControlcommissionNoderesponseTimeoutSecondsCommandParameterInfo); - - CommandParameterInfo commissionerControlcommissionNodeipAddressCommandParameterInfo = new CommandParameterInfo("ipAddress", Optional.class, byte[].class); - commissionerControlcommissionNodeCommandParams.put("ipAddress",commissionerControlcommissionNodeipAddressCommandParameterInfo); - - CommandParameterInfo commissionerControlcommissionNodeportCommandParameterInfo = new CommandParameterInfo("port", Optional.class, Integer.class); - commissionerControlcommissionNodeCommandParams.put("port",commissionerControlcommissionNodeportCommandParameterInfo); InteractionInfo commissionerControlcommissionNodeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.CommissionerControlCluster) cluster) .commissionNode((ChipClusters.CommissionerControlCluster.ReverseOpenCommissioningWindowCallback) callback , (Long) - commandArguments.get("requestId") + commandArguments.get("requestID") , (Integer) commandArguments.get("responseTimeoutSeconds") - , (Optional) - commandArguments.get("ipAddress") - - , (Optional) - commandArguments.get("port") - ); }, () -> new DelegatedCommissionerControlClusterReverseOpenCommissioningWindowCallback(), diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index c96de698113955..b09c89302d33b6 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -18678,18 +18678,7 @@ private static Map readContentAppObserverInteractionInf return result; } private static Map readEcosystemInformationInteractionInfo() { - Map result = new LinkedHashMap<>();Map readEcosystemInformationRemovedOnCommandParams = new LinkedHashMap(); - InteractionInfo readEcosystemInformationRemovedOnAttributeInteractionInfo = new InteractionInfo( - (cluster, callback, commandArguments) -> { - ((ChipClusters.EcosystemInformationCluster) cluster).readRemovedOnAttribute( - (ChipClusters.EcosystemInformationCluster.RemovedOnAttributeCallback) callback - ); - }, - () -> new ClusterInfoMapping.DelegatedEcosystemInformationClusterRemovedOnAttributeCallback(), - readEcosystemInformationRemovedOnCommandParams - ); - result.put("readRemovedOnAttribute", readEcosystemInformationRemovedOnAttributeInteractionInfo); - Map readEcosystemInformationDeviceDirectoryCommandParams = new LinkedHashMap(); + Map result = new LinkedHashMap<>();Map readEcosystemInformationDeviceDirectoryCommandParams = new LinkedHashMap(); InteractionInfo readEcosystemInformationDeviceDirectoryAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { ((ChipClusters.EcosystemInformationCluster) cluster).readDeviceDirectoryAttribute( @@ -20868,6 +20857,28 @@ private static Map readUnitTestingInteractionInfo() { readUnitTestingUnsupportedCommandParams ); result.put("readUnsupportedAttribute", readUnitTestingUnsupportedAttributeInteractionInfo); + Map readUnitTestingReadFailureCodeCommandParams = new LinkedHashMap(); + InteractionInfo readUnitTestingReadFailureCodeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.UnitTestingCluster) cluster).readReadFailureCodeAttribute( + (ChipClusters.IntegerAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedIntegerAttributeCallback(), + readUnitTestingReadFailureCodeCommandParams + ); + result.put("readReadFailureCodeAttribute", readUnitTestingReadFailureCodeAttributeInteractionInfo); + Map readUnitTestingFailureInt32UCommandParams = new LinkedHashMap(); + InteractionInfo readUnitTestingFailureInt32UAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.UnitTestingCluster) cluster).readFailureInt32UAttribute( + (ChipClusters.LongAttributeCallback) callback + ); + }, + () -> new ClusterInfoMapping.DelegatedLongAttributeCallback(), + readUnitTestingFailureInt32UCommandParams + ); + result.put("readFailureInt32UAttribute", readUnitTestingFailureInt32UAttributeInteractionInfo); Map readUnitTestingNullableBooleanCommandParams = new LinkedHashMap(); InteractionInfo readUnitTestingNullableBooleanAttributeInteractionInfo = new InteractionInfo( (cluster, callback, commandArguments) -> { diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java index 93a48d76bf61dc..0a59b42a9ffe34 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterWriteMapping.java @@ -4871,6 +4871,50 @@ public Map> getWriteAttributeMap() { writeUnitTestingUnsupportedCommandParams ); writeUnitTestingInteractionInfo.put("writeUnsupportedAttribute", writeUnitTestingUnsupportedAttributeInteractionInfo); + Map writeUnitTestingReadFailureCodeCommandParams = new LinkedHashMap(); + CommandParameterInfo unitTestingreadFailureCodeCommandParameterInfo = + new CommandParameterInfo( + "value", + Integer.class, + Integer.class + ); + writeUnitTestingReadFailureCodeCommandParams.put( + "value", + unitTestingreadFailureCodeCommandParameterInfo + ); + InteractionInfo writeUnitTestingReadFailureCodeAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.UnitTestingCluster) cluster).writeReadFailureCodeAttribute( + (DefaultClusterCallback) callback, + (Integer) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeUnitTestingReadFailureCodeCommandParams + ); + writeUnitTestingInteractionInfo.put("writeReadFailureCodeAttribute", writeUnitTestingReadFailureCodeAttributeInteractionInfo); + Map writeUnitTestingFailureInt32UCommandParams = new LinkedHashMap(); + CommandParameterInfo unitTestingfailureInt32UCommandParameterInfo = + new CommandParameterInfo( + "value", + Long.class, + Long.class + ); + writeUnitTestingFailureInt32UCommandParams.put( + "value", + unitTestingfailureInt32UCommandParameterInfo + ); + InteractionInfo writeUnitTestingFailureInt32UAttributeInteractionInfo = new InteractionInfo( + (cluster, callback, commandArguments) -> { + ((ChipClusters.UnitTestingCluster) cluster).writeFailureInt32UAttribute( + (DefaultClusterCallback) callback, + (Long) commandArguments.get("value") + ); + }, + () -> new ClusterInfoMapping.DelegatedDefaultClusterCallback(), + writeUnitTestingFailureInt32UCommandParams + ); + writeUnitTestingInteractionInfo.put("writeFailureInt32UAttribute", writeUnitTestingFailureInt32UAttributeInteractionInfo); Map writeUnitTestingNullableBooleanCommandParams = new LinkedHashMap(); CommandParameterInfo unitTestingnullableBooleanCommandParameterInfo = new CommandParameterInfo( diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterFabricRestrictionReviewUpdateEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterFabricRestrictionReviewUpdateEvent.kt index 7ea3d3fe02707d..2f2f4bde9aaf46 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterFabricRestrictionReviewUpdateEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterFabricRestrictionReviewUpdateEvent.kt @@ -17,6 +17,7 @@ package chip.devicecontroller.cluster.eventstructs import chip.devicecontroller.cluster.* +import java.util.Optional import matter.tlv.ContextSpecificTag import matter.tlv.Tag import matter.tlv.TlvReader @@ -24,15 +25,15 @@ import matter.tlv.TlvWriter class AccessControlClusterFabricRestrictionReviewUpdateEvent( val token: ULong, - val instruction: String?, - val redirectURL: String?, + val instruction: Optional, + val ARLRequestFlowUrl: Optional, val fabricIndex: UInt, ) { override fun toString(): String = buildString { append("AccessControlClusterFabricRestrictionReviewUpdateEvent {\n") append("\ttoken : $token\n") append("\tinstruction : $instruction\n") - append("\tredirectURL : $redirectURL\n") + append("\tARLRequestFlowUrl : $ARLRequestFlowUrl\n") append("\tfabricIndex : $fabricIndex\n") append("}\n") } @@ -41,15 +42,13 @@ class AccessControlClusterFabricRestrictionReviewUpdateEvent( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_TOKEN), token) - if (instruction != null) { - put(ContextSpecificTag(TAG_INSTRUCTION), instruction) - } else { - putNull(ContextSpecificTag(TAG_INSTRUCTION)) + if (instruction.isPresent) { + val optinstruction = instruction.get() + put(ContextSpecificTag(TAG_INSTRUCTION), optinstruction) } - if (redirectURL != null) { - put(ContextSpecificTag(TAG_REDIRECT_URL), redirectURL) - } else { - putNull(ContextSpecificTag(TAG_REDIRECT_URL)) + if (ARLRequestFlowUrl.isPresent) { + val optARLRequestFlowUrl = ARLRequestFlowUrl.get() + put(ContextSpecificTag(TAG_ARL_REQUEST_FLOW_URL), optARLRequestFlowUrl) } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() @@ -59,7 +58,7 @@ class AccessControlClusterFabricRestrictionReviewUpdateEvent( companion object { private const val TAG_TOKEN = 0 private const val TAG_INSTRUCTION = 1 - private const val TAG_REDIRECT_URL = 2 + private const val TAG_ARL_REQUEST_FLOW_URL = 2 private const val TAG_FABRIC_INDEX = 254 fun fromTlv( @@ -69,18 +68,16 @@ class AccessControlClusterFabricRestrictionReviewUpdateEvent( tlvReader.enterStructure(tlvTag) val token = tlvReader.getULong(ContextSpecificTag(TAG_TOKEN)) val instruction = - if (!tlvReader.isNull()) { - tlvReader.getString(ContextSpecificTag(TAG_INSTRUCTION)) + if (tlvReader.isNextTag(ContextSpecificTag(TAG_INSTRUCTION))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_INSTRUCTION))) } else { - tlvReader.getNull(ContextSpecificTag(TAG_INSTRUCTION)) - null + Optional.empty() } - val redirectURL = - if (!tlvReader.isNull()) { - tlvReader.getString(ContextSpecificTag(TAG_REDIRECT_URL)) + val ARLRequestFlowUrl = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ARL_REQUEST_FLOW_URL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ARL_REQUEST_FLOW_URL))) } else { - tlvReader.getNull(ContextSpecificTag(TAG_REDIRECT_URL)) - null + Optional.empty() } val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) @@ -89,7 +86,7 @@ class AccessControlClusterFabricRestrictionReviewUpdateEvent( return AccessControlClusterFabricRestrictionReviewUpdateEvent( token, instruction, - redirectURL, + ARLRequestFlowUrl, fabricIndex, ) } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CommissionerControlClusterCommissioningRequestResultEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CommissionerControlClusterCommissioningRequestResultEvent.kt index 2a7a8d3c5b8ffb..ce05d28a261e91 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CommissionerControlClusterCommissioningRequestResultEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/CommissionerControlClusterCommissioningRequestResultEvent.kt @@ -23,15 +23,15 @@ import matter.tlv.TlvReader import matter.tlv.TlvWriter class CommissionerControlClusterCommissioningRequestResultEvent( - val requestId: ULong, - val clientNodeId: ULong, + val requestID: ULong, + val clientNodeID: ULong, val statusCode: UInt, val fabricIndex: UInt, ) { override fun toString(): String = buildString { append("CommissionerControlClusterCommissioningRequestResultEvent {\n") - append("\trequestId : $requestId\n") - append("\tclientNodeId : $clientNodeId\n") + append("\trequestID : $requestID\n") + append("\tclientNodeID : $clientNodeID\n") append("\tstatusCode : $statusCode\n") append("\tfabricIndex : $fabricIndex\n") append("}\n") @@ -40,8 +40,8 @@ class CommissionerControlClusterCommissioningRequestResultEvent( fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { startStructure(tlvTag) - put(ContextSpecificTag(TAG_REQUEST_ID), requestId) - put(ContextSpecificTag(TAG_CLIENT_NODE_ID), clientNodeId) + put(ContextSpecificTag(TAG_REQUEST_ID), requestID) + put(ContextSpecificTag(TAG_CLIENT_NODE_ID), clientNodeID) put(ContextSpecificTag(TAG_STATUS_CODE), statusCode) put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() @@ -59,16 +59,16 @@ class CommissionerControlClusterCommissioningRequestResultEvent( tlvReader: TlvReader, ): CommissionerControlClusterCommissioningRequestResultEvent { tlvReader.enterStructure(tlvTag) - val requestId = tlvReader.getULong(ContextSpecificTag(TAG_REQUEST_ID)) - val clientNodeId = tlvReader.getULong(ContextSpecificTag(TAG_CLIENT_NODE_ID)) + val requestID = tlvReader.getULong(ContextSpecificTag(TAG_REQUEST_ID)) + val clientNodeID = tlvReader.getULong(ContextSpecificTag(TAG_CLIENT_NODE_ID)) val statusCode = tlvReader.getUInt(ContextSpecificTag(TAG_STATUS_CODE)) val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) tlvReader.exitContainer() return CommissionerControlClusterCommissioningRequestResultEvent( - requestId, - clientNodeId, + requestID, + clientNodeID, statusCode, fabricIndex, ) diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessRestrictionEntryChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OccupancySensingClusterOccupancyChangedEvent.kt similarity index 65% rename from src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessRestrictionEntryChangedEvent.kt rename to src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OccupancySensingClusterOccupancyChangedEvent.kt index 56d9b39e1a005e..6d2aa3d4c9faa9 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessRestrictionEntryChangedEvent.kt +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OccupancySensingClusterOccupancyChangedEvent.kt @@ -22,34 +22,31 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class AccessControlClusterAccessRestrictionEntryChangedEvent(val fabricIndex: UInt) { +class OccupancySensingClusterOccupancyChangedEvent(val occupancy: UInt) { override fun toString(): String = buildString { - append("AccessControlClusterAccessRestrictionEntryChangedEvent {\n") - append("\tfabricIndex : $fabricIndex\n") + append("OccupancySensingClusterOccupancyChangedEvent {\n") + append("\toccupancy : $occupancy\n") append("}\n") } fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { startStructure(tlvTag) - put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + put(ContextSpecificTag(TAG_OCCUPANCY), occupancy) endStructure() } } companion object { - private const val TAG_FABRIC_INDEX = 254 + private const val TAG_OCCUPANCY = 0 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): AccessControlClusterAccessRestrictionEntryChangedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OccupancySensingClusterOccupancyChangedEvent { tlvReader.enterStructure(tlvTag) - val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) + val occupancy = tlvReader.getUInt(ContextSpecificTag(TAG_OCCUPANCY)) tlvReader.exitContainer() - return AccessControlClusterAccessRestrictionEntryChangedEvent(fabricIndex) + return OccupancySensingClusterOccupancyChangedEvent(occupancy) } } } diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni index 9665346b3d04b2..bbaa6112dd9dea 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni +++ b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni @@ -164,7 +164,6 @@ structs_sources = [ eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt", - "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessRestrictionEntryChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterFabricRestrictionReviewUpdateEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccountLoginClusterLoggedOutEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt", @@ -205,6 +204,7 @@ eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MessagesClusterMessageCompleteEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MessagesClusterMessagePresentedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/MessagesClusterMessageQueuedEvent.kt", + "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OccupancySensingClusterOccupancyChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt", "${chip_root}/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt", diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/AccessControlCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/AccessControlCluster.kt index 099162a899b419..e0a5c595acf19b 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/AccessControlCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/AccessControlCluster.kt @@ -46,6 +46,8 @@ class AccessControlCluster( private val controller: MatterController, private val endpointId: UShort, ) { + class ReviewFabricRestrictionsResponse(val token: ULong) + class AclAttribute(val value: List) sealed class AclAttributeSubscriptionState { @@ -136,7 +138,7 @@ class AccessControlCluster( suspend fun reviewFabricRestrictions( arl: List, timedInvokeTimeout: Duration? = null, - ) { + ): ReviewFabricRestrictionsResponse { val commandId: UInt = 0u val tlvWriter = TlvWriter() @@ -159,6 +161,29 @@ class AccessControlCluster( val response: InvokeResponse = controller.invoke(request) logger.log(Level.FINE, "Invoke command succeeded: ${response}") + + val tlvReader = TlvReader(response.payload) + tlvReader.enterStructure(AnonymousTag) + val TAG_TOKEN: Int = 0 + var token_decoded: ULong? = null + + while (!tlvReader.isEndOfContainer()) { + val tag = tlvReader.peekElement().tag + + if (tag == ContextSpecificTag(TAG_TOKEN)) { + token_decoded = tlvReader.getULong(tag) + } else { + tlvReader.skipElement() + } + } + + if (token_decoded == null) { + throw IllegalStateException("token not found in TLV") + } + + tlvReader.exitContainer() + + return ReviewFabricRestrictionsResponse(token_decoded) } suspend fun readAclAttribute(): AclAttribute { diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/BridgedDeviceBasicInformationCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/BridgedDeviceBasicInformationCluster.kt index 8e56362d8da349..9ae253f277ed10 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/BridgedDeviceBasicInformationCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/BridgedDeviceBasicInformationCluster.kt @@ -101,7 +101,11 @@ class BridgedDeviceBasicInformationCluster( object SubscriptionEstablished : AttributeListAttributeSubscriptionState() } - suspend fun keepActive(stayActiveDuration: UInt, timedInvokeTimeout: Duration? = null) { + suspend fun keepActive( + stayActiveDuration: UInt, + timeoutMs: UInt, + timedInvokeTimeout: Duration? = null, + ) { val commandId: UInt = 128u val tlvWriter = TlvWriter() @@ -109,6 +113,9 @@ class BridgedDeviceBasicInformationCluster( val TAG_STAY_ACTIVE_DURATION_REQ: Int = 0 tlvWriter.put(ContextSpecificTag(TAG_STAY_ACTIVE_DURATION_REQ), stayActiveDuration) + + val TAG_TIMEOUT_MS_REQ: Int = 1 + tlvWriter.put(ContextSpecificTag(TAG_TIMEOUT_MS_REQ), timeoutMs) tlvWriter.endStructure() val request: InvokeRequest = diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/CommissionerControlCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/CommissionerControlCluster.kt index 2daf2b464e948f..f7b592b6bc2c72 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/CommissionerControlCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/CommissionerControlCluster.kt @@ -92,9 +92,9 @@ class CommissionerControlCluster( } suspend fun requestCommissioningApproval( - requestId: ULong, - vendorId: UShort, - productId: UShort, + requestID: ULong, + vendorID: UShort, + productID: UShort, label: String?, timedInvokeTimeout: Duration? = null, ) { @@ -104,13 +104,13 @@ class CommissionerControlCluster( tlvWriter.startStructure(AnonymousTag) val TAG_REQUEST_ID_REQ: Int = 0 - tlvWriter.put(ContextSpecificTag(TAG_REQUEST_ID_REQ), requestId) + tlvWriter.put(ContextSpecificTag(TAG_REQUEST_ID_REQ), requestID) val TAG_VENDOR_ID_REQ: Int = 1 - tlvWriter.put(ContextSpecificTag(TAG_VENDOR_ID_REQ), vendorId) + tlvWriter.put(ContextSpecificTag(TAG_VENDOR_ID_REQ), vendorID) val TAG_PRODUCT_ID_REQ: Int = 2 - tlvWriter.put(ContextSpecificTag(TAG_PRODUCT_ID_REQ), productId) + tlvWriter.put(ContextSpecificTag(TAG_PRODUCT_ID_REQ), productID) val TAG_LABEL_REQ: Int = 3 label?.let { tlvWriter.put(ContextSpecificTag(TAG_LABEL_REQ), label) } @@ -128,10 +128,8 @@ class CommissionerControlCluster( } suspend fun commissionNode( - requestId: ULong, + requestID: ULong, responseTimeoutSeconds: UShort, - ipAddress: ByteArray?, - port: UShort?, timedInvokeTimeout: Duration? = null, ): ReverseOpenCommissioningWindow { val commandId: UInt = 1u @@ -140,16 +138,10 @@ class CommissionerControlCluster( tlvWriter.startStructure(AnonymousTag) val TAG_REQUEST_ID_REQ: Int = 0 - tlvWriter.put(ContextSpecificTag(TAG_REQUEST_ID_REQ), requestId) + tlvWriter.put(ContextSpecificTag(TAG_REQUEST_ID_REQ), requestID) val TAG_RESPONSE_TIMEOUT_SECONDS_REQ: Int = 1 tlvWriter.put(ContextSpecificTag(TAG_RESPONSE_TIMEOUT_SECONDS_REQ), responseTimeoutSeconds) - - val TAG_IP_ADDRESS_REQ: Int = 2 - ipAddress?.let { tlvWriter.put(ContextSpecificTag(TAG_IP_ADDRESS_REQ), ipAddress) } - - val TAG_PORT_REQ: Int = 3 - port?.let { tlvWriter.put(ContextSpecificTag(TAG_PORT_REQ), port) } tlvWriter.endStructure() val request: InvokeRequest = diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/EcosystemInformationCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/EcosystemInformationCluster.kt index 5dfa4a7f8067ef..0fc2806b04c628 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/EcosystemInformationCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/EcosystemInformationCluster.kt @@ -38,16 +38,6 @@ class EcosystemInformationCluster( private val controller: MatterController, private val endpointId: UShort, ) { - class RemovedOnAttribute(val value: ULong?) - - sealed class RemovedOnAttributeSubscriptionState { - data class Success(val value: ULong?) : RemovedOnAttributeSubscriptionState() - - data class Error(val exception: Exception) : RemovedOnAttributeSubscriptionState() - - object SubscriptionEstablished : RemovedOnAttributeSubscriptionState() - } - class DeviceDirectoryAttribute(val value: List) sealed class DeviceDirectoryAttributeSubscriptionState { @@ -112,109 +102,8 @@ class EcosystemInformationCluster( object SubscriptionEstablished : AttributeListAttributeSubscriptionState() } - suspend fun readRemovedOnAttribute(): RemovedOnAttribute { - val ATTRIBUTE_ID: UInt = 0u - - val attributePath = - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - - val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) - - val response = controller.read(readRequest) - - if (response.successes.isEmpty()) { - logger.log(Level.WARNING, "Read command failed") - throw IllegalStateException("Read command failed with failures: ${response.failures}") - } - - logger.log(Level.FINE, "Read command succeeded") - - val attributeData = - response.successes.filterIsInstance().firstOrNull { - it.path.attributeId == ATTRIBUTE_ID - } - - requireNotNull(attributeData) { "Removedon attribute not found in response" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: ULong? = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getULong(AnonymousTag) - } else { - null - } - } else { - tlvReader.getNull(AnonymousTag) - null - } - - return RemovedOnAttribute(decodedValue) - } - - suspend fun subscribeRemovedOnAttribute( - minInterval: Int, - maxInterval: Int, - ): Flow { - val ATTRIBUTE_ID: UInt = 0u - val attributePaths = - listOf( - AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) - ) - - val subscribeRequest: SubscribeRequest = - SubscribeRequest( - eventPaths = emptyList(), - attributePaths = attributePaths, - minInterval = Duration.ofSeconds(minInterval.toLong()), - maxInterval = Duration.ofSeconds(maxInterval.toLong()), - ) - - return controller.subscribe(subscribeRequest).transform { subscriptionState -> - when (subscriptionState) { - is SubscriptionState.SubscriptionErrorNotification -> { - emit( - RemovedOnAttributeSubscriptionState.Error( - Exception( - "Subscription terminated with error code: ${subscriptionState.terminationCause}" - ) - ) - ) - } - is SubscriptionState.NodeStateUpdate -> { - val attributeData = - subscriptionState.updateState.successes - .filterIsInstance() - .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } - - requireNotNull(attributeData) { "Removedon attribute not found in Node State update" } - - // Decode the TLV data into the appropriate type - val tlvReader = TlvReader(attributeData.data) - val decodedValue: ULong? = - if (!tlvReader.isNull()) { - if (tlvReader.isNextTag(AnonymousTag)) { - tlvReader.getULong(AnonymousTag) - } else { - null - } - } else { - tlvReader.getNull(AnonymousTag) - null - } - - decodedValue?.let { emit(RemovedOnAttributeSubscriptionState.Success(it)) } - } - SubscriptionState.SubscriptionEstablished -> { - emit(RemovedOnAttributeSubscriptionState.SubscriptionEstablished) - } - } - } - } - suspend fun readDeviceDirectoryAttribute(): DeviceDirectoryAttribute { - val ATTRIBUTE_ID: UInt = 1u + val ATTRIBUTE_ID: UInt = 0u val attributePath = AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) @@ -255,7 +144,7 @@ class EcosystemInformationCluster( minInterval: Int, maxInterval: Int, ): Flow { - val ATTRIBUTE_ID: UInt = 1u + val ATTRIBUTE_ID: UInt = 0u val attributePaths = listOf( AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) @@ -313,7 +202,7 @@ class EcosystemInformationCluster( } suspend fun readLocationDirectoryAttribute(): LocationDirectoryAttribute { - val ATTRIBUTE_ID: UInt = 2u + val ATTRIBUTE_ID: UInt = 1u val attributePath = AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) @@ -354,7 +243,7 @@ class EcosystemInformationCluster( minInterval: Int, maxInterval: Int, ): Flow { - val ATTRIBUTE_ID: UInt = 2u + val ATTRIBUTE_ID: UInt = 1u val attributePaths = listOf( AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) diff --git a/src/controller/java/generated/java/matter/controller/cluster/clusters/UnitTestingCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/UnitTestingCluster.kt index 74402b19dcfdf3..c48686cd74599a 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/clusters/UnitTestingCluster.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/clusters/UnitTestingCluster.kt @@ -8779,6 +8779,270 @@ class UnitTestingCluster(private val controller: MatterController, private val e } } + suspend fun readReadFailureCodeAttribute(): UByte? { + val ATTRIBUTE_ID: UInt = 12288u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Readfailurecode attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeReadFailureCodeAttribute(value: UByte, timedWriteTimeout: Duration? = null) { + val ATTRIBUTE_ID: UInt = 12288u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeReadFailureCodeAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 12288u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UByteSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { + "Readfailurecode attribute not found in Node State update" + } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UByte? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUByte(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UByteSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UByteSubscriptionState.SubscriptionEstablished) + } + } + } + } + + suspend fun readFailureInt32UAttribute(): UInt? { + val ATTRIBUTE_ID: UInt = 12289u + + val attributePath = + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + + val readRequest = ReadRequest(eventPaths = emptyList(), attributePaths = listOf(attributePath)) + + val response = controller.read(readRequest) + + if (response.successes.isEmpty()) { + logger.log(Level.WARNING, "Read command failed") + throw IllegalStateException("Read command failed with failures: ${response.failures}") + } + + logger.log(Level.FINE, "Read command succeeded") + + val attributeData = + response.successes.filterIsInstance().firstOrNull { + it.path.attributeId == ATTRIBUTE_ID + } + + requireNotNull(attributeData) { "Failureint32u attribute not found in response" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UInt? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUInt(AnonymousTag) + } else { + null + } + + return decodedValue + } + + suspend fun writeFailureInt32UAttribute(value: UInt, timedWriteTimeout: Duration? = null) { + val ATTRIBUTE_ID: UInt = 12289u + + val tlvWriter = TlvWriter() + tlvWriter.put(AnonymousTag, value) + + val writeRequests: WriteRequests = + WriteRequests( + requests = + listOf( + WriteRequest( + attributePath = + AttributePath(endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID), + tlvPayload = tlvWriter.getEncoded(), + ) + ), + timedRequest = timedWriteTimeout, + ) + + val response: WriteResponse = controller.write(writeRequests) + + when (response) { + is WriteResponse.Success -> { + logger.log(Level.FINE, "Write command succeeded") + } + is WriteResponse.PartialWriteFailure -> { + val aggregatedErrorMessage = + response.failures.joinToString("\n") { failure -> + "Error at ${failure.attributePath}: ${failure.ex.message}" + } + + response.failures.forEach { failure -> + logger.log(Level.WARNING, "Error at ${failure.attributePath}: ${failure.ex.message}") + } + + throw IllegalStateException("Write command failed with errors: \n$aggregatedErrorMessage") + } + } + } + + suspend fun subscribeFailureInt32UAttribute( + minInterval: Int, + maxInterval: Int, + ): Flow { + val ATTRIBUTE_ID: UInt = 12289u + val attributePaths = + listOf( + AttributePath(endpointId = endpointId, clusterId = CLUSTER_ID, attributeId = ATTRIBUTE_ID) + ) + + val subscribeRequest: SubscribeRequest = + SubscribeRequest( + eventPaths = emptyList(), + attributePaths = attributePaths, + minInterval = Duration.ofSeconds(minInterval.toLong()), + maxInterval = Duration.ofSeconds(maxInterval.toLong()), + ) + + return controller.subscribe(subscribeRequest).transform { subscriptionState -> + when (subscriptionState) { + is SubscriptionState.SubscriptionErrorNotification -> { + emit( + UIntSubscriptionState.Error( + Exception( + "Subscription terminated with error code: ${subscriptionState.terminationCause}" + ) + ) + ) + } + is SubscriptionState.NodeStateUpdate -> { + val attributeData = + subscriptionState.updateState.successes + .filterIsInstance() + .firstOrNull { it.path.attributeId == ATTRIBUTE_ID } + + requireNotNull(attributeData) { "Failureint32u attribute not found in Node State update" } + + // Decode the TLV data into the appropriate type + val tlvReader = TlvReader(attributeData.data) + val decodedValue: UInt? = + if (tlvReader.isNextTag(AnonymousTag)) { + tlvReader.getUInt(AnonymousTag) + } else { + null + } + + decodedValue?.let { emit(UIntSubscriptionState.Success(it)) } + } + SubscriptionState.SubscriptionEstablished -> { + emit(UIntSubscriptionState.SubscriptionEstablished) + } + } + } + } + suspend fun readNullableBooleanAttribute(): NullableBooleanAttribute { val ATTRIBUTE_ID: UInt = 16384u diff --git a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/AccessControlClusterFabricRestrictionReviewUpdateEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/AccessControlClusterFabricRestrictionReviewUpdateEvent.kt index 6bf03e6afc8c13..1a9670ca19d8db 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/AccessControlClusterFabricRestrictionReviewUpdateEvent.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/AccessControlClusterFabricRestrictionReviewUpdateEvent.kt @@ -16,6 +16,7 @@ */ package matter.controller.cluster.eventstructs +import java.util.Optional import matter.controller.cluster.* import matter.tlv.ContextSpecificTag import matter.tlv.Tag @@ -24,15 +25,15 @@ import matter.tlv.TlvWriter class AccessControlClusterFabricRestrictionReviewUpdateEvent( val token: ULong, - val instruction: String?, - val redirectURL: String?, + val instruction: Optional, + val ARLRequestFlowUrl: Optional, val fabricIndex: UByte, ) { override fun toString(): String = buildString { append("AccessControlClusterFabricRestrictionReviewUpdateEvent {\n") append("\ttoken : $token\n") append("\tinstruction : $instruction\n") - append("\tredirectURL : $redirectURL\n") + append("\tARLRequestFlowUrl : $ARLRequestFlowUrl\n") append("\tfabricIndex : $fabricIndex\n") append("}\n") } @@ -41,15 +42,13 @@ class AccessControlClusterFabricRestrictionReviewUpdateEvent( tlvWriter.apply { startStructure(tlvTag) put(ContextSpecificTag(TAG_TOKEN), token) - if (instruction != null) { - put(ContextSpecificTag(TAG_INSTRUCTION), instruction) - } else { - putNull(ContextSpecificTag(TAG_INSTRUCTION)) + if (instruction.isPresent) { + val optinstruction = instruction.get() + put(ContextSpecificTag(TAG_INSTRUCTION), optinstruction) } - if (redirectURL != null) { - put(ContextSpecificTag(TAG_REDIRECT_URL), redirectURL) - } else { - putNull(ContextSpecificTag(TAG_REDIRECT_URL)) + if (ARLRequestFlowUrl.isPresent) { + val optARLRequestFlowUrl = ARLRequestFlowUrl.get() + put(ContextSpecificTag(TAG_ARL_REQUEST_FLOW_URL), optARLRequestFlowUrl) } put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() @@ -59,7 +58,7 @@ class AccessControlClusterFabricRestrictionReviewUpdateEvent( companion object { private const val TAG_TOKEN = 0 private const val TAG_INSTRUCTION = 1 - private const val TAG_REDIRECT_URL = 2 + private const val TAG_ARL_REQUEST_FLOW_URL = 2 private const val TAG_FABRIC_INDEX = 254 fun fromTlv( @@ -69,18 +68,16 @@ class AccessControlClusterFabricRestrictionReviewUpdateEvent( tlvReader.enterStructure(tlvTag) val token = tlvReader.getULong(ContextSpecificTag(TAG_TOKEN)) val instruction = - if (!tlvReader.isNull()) { - tlvReader.getString(ContextSpecificTag(TAG_INSTRUCTION)) + if (tlvReader.isNextTag(ContextSpecificTag(TAG_INSTRUCTION))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_INSTRUCTION))) } else { - tlvReader.getNull(ContextSpecificTag(TAG_INSTRUCTION)) - null + Optional.empty() } - val redirectURL = - if (!tlvReader.isNull()) { - tlvReader.getString(ContextSpecificTag(TAG_REDIRECT_URL)) + val ARLRequestFlowUrl = + if (tlvReader.isNextTag(ContextSpecificTag(TAG_ARL_REQUEST_FLOW_URL))) { + Optional.of(tlvReader.getString(ContextSpecificTag(TAG_ARL_REQUEST_FLOW_URL))) } else { - tlvReader.getNull(ContextSpecificTag(TAG_REDIRECT_URL)) - null + Optional.empty() } val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) @@ -89,7 +86,7 @@ class AccessControlClusterFabricRestrictionReviewUpdateEvent( return AccessControlClusterFabricRestrictionReviewUpdateEvent( token, instruction, - redirectURL, + ARLRequestFlowUrl, fabricIndex, ) } diff --git a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CommissionerControlClusterCommissioningRequestResultEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CommissionerControlClusterCommissioningRequestResultEvent.kt index c8947776269773..4cc7a31fdbe97c 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CommissionerControlClusterCommissioningRequestResultEvent.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/CommissionerControlClusterCommissioningRequestResultEvent.kt @@ -23,15 +23,15 @@ import matter.tlv.TlvReader import matter.tlv.TlvWriter class CommissionerControlClusterCommissioningRequestResultEvent( - val requestId: ULong, - val clientNodeId: ULong, + val requestID: ULong, + val clientNodeID: ULong, val statusCode: UByte, val fabricIndex: UByte, ) { override fun toString(): String = buildString { append("CommissionerControlClusterCommissioningRequestResultEvent {\n") - append("\trequestId : $requestId\n") - append("\tclientNodeId : $clientNodeId\n") + append("\trequestID : $requestID\n") + append("\tclientNodeID : $clientNodeID\n") append("\tstatusCode : $statusCode\n") append("\tfabricIndex : $fabricIndex\n") append("}\n") @@ -40,8 +40,8 @@ class CommissionerControlClusterCommissioningRequestResultEvent( fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { startStructure(tlvTag) - put(ContextSpecificTag(TAG_REQUEST_ID), requestId) - put(ContextSpecificTag(TAG_CLIENT_NODE_ID), clientNodeId) + put(ContextSpecificTag(TAG_REQUEST_ID), requestID) + put(ContextSpecificTag(TAG_CLIENT_NODE_ID), clientNodeID) put(ContextSpecificTag(TAG_STATUS_CODE), statusCode) put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) endStructure() @@ -59,16 +59,16 @@ class CommissionerControlClusterCommissioningRequestResultEvent( tlvReader: TlvReader, ): CommissionerControlClusterCommissioningRequestResultEvent { tlvReader.enterStructure(tlvTag) - val requestId = tlvReader.getULong(ContextSpecificTag(TAG_REQUEST_ID)) - val clientNodeId = tlvReader.getULong(ContextSpecificTag(TAG_CLIENT_NODE_ID)) + val requestID = tlvReader.getULong(ContextSpecificTag(TAG_REQUEST_ID)) + val clientNodeID = tlvReader.getULong(ContextSpecificTag(TAG_CLIENT_NODE_ID)) val statusCode = tlvReader.getUByte(ContextSpecificTag(TAG_STATUS_CODE)) val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) tlvReader.exitContainer() return CommissionerControlClusterCommissioningRequestResultEvent( - requestId, - clientNodeId, + requestID, + clientNodeID, statusCode, fabricIndex, ) diff --git a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/AccessControlClusterAccessRestrictionEntryChangedEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/OccupancySensingClusterOccupancyChangedEvent.kt similarity index 65% rename from src/controller/java/generated/java/matter/controller/cluster/eventstructs/AccessControlClusterAccessRestrictionEntryChangedEvent.kt rename to src/controller/java/generated/java/matter/controller/cluster/eventstructs/OccupancySensingClusterOccupancyChangedEvent.kt index 8a272f8854ae12..dc13e3f291f39f 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/AccessControlClusterAccessRestrictionEntryChangedEvent.kt +++ b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/OccupancySensingClusterOccupancyChangedEvent.kt @@ -22,34 +22,31 @@ import matter.tlv.Tag import matter.tlv.TlvReader import matter.tlv.TlvWriter -class AccessControlClusterAccessRestrictionEntryChangedEvent(val fabricIndex: UByte) { +class OccupancySensingClusterOccupancyChangedEvent(val occupancy: UByte) { override fun toString(): String = buildString { - append("AccessControlClusterAccessRestrictionEntryChangedEvent {\n") - append("\tfabricIndex : $fabricIndex\n") + append("OccupancySensingClusterOccupancyChangedEvent {\n") + append("\toccupancy : $occupancy\n") append("}\n") } fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { tlvWriter.apply { startStructure(tlvTag) - put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) + put(ContextSpecificTag(TAG_OCCUPANCY), occupancy) endStructure() } } companion object { - private const val TAG_FABRIC_INDEX = 254 + private const val TAG_OCCUPANCY = 0 - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): AccessControlClusterAccessRestrictionEntryChangedEvent { + fun fromTlv(tlvTag: Tag, tlvReader: TlvReader): OccupancySensingClusterOccupancyChangedEvent { tlvReader.enterStructure(tlvTag) - val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) + val occupancy = tlvReader.getUByte(ContextSpecificTag(TAG_OCCUPANCY)) tlvReader.exitContainer() - return AccessControlClusterAccessRestrictionEntryChangedEvent(fabricIndex) + return OccupancySensingClusterOccupancyChangedEvent(occupancy) } } } diff --git a/src/controller/java/generated/java/matter/controller/cluster/files.gni b/src/controller/java/generated/java/matter/controller/cluster/files.gni index 62769c99e0bb89..1f287a13ae0ff2 100644 --- a/src/controller/java/generated/java/matter/controller/cluster/files.gni +++ b/src/controller/java/generated/java/matter/controller/cluster/files.gni @@ -164,7 +164,6 @@ matter_structs_sources = [ matter_eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/AccessControlClusterAccessControlEntryChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/AccessControlClusterAccessControlExtensionChangedEvent.kt", - "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/AccessControlClusterAccessRestrictionEntryChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/AccessControlClusterFabricRestrictionReviewUpdateEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/AccountLoginClusterLoggedOutEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/ActionsClusterActionFailedEvent.kt", @@ -205,6 +204,7 @@ matter_eventstructs_sources = [ "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/MessagesClusterMessageCompleteEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/MessagesClusterMessagePresentedEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/MessagesClusterMessageQueuedEvent.kt", + "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/OccupancySensingClusterOccupancyChangedEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/OperationalStateClusterOperationalErrorEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/OperationalStateClusterOperationCompletionEvent.kt", "${chip_root}/src/controller/java/generated/java/matter/controller/cluster/eventstructs/OtaSoftwareUpdateRequestorClusterDownloadErrorEvent.kt", diff --git a/src/controller/java/src/chip/devicecontroller/ICDCheckInDelegateWrapper.java b/src/controller/java/src/chip/devicecontroller/ICDCheckInDelegateWrapper.java index 39ca5df1b9e766..3b338045a248e2 100644 --- a/src/controller/java/src/chip/devicecontroller/ICDCheckInDelegateWrapper.java +++ b/src/controller/java/src/chip/devicecontroller/ICDCheckInDelegateWrapper.java @@ -29,6 +29,7 @@ class ICDCheckInDelegateWrapper { @SuppressWarnings("unused") private void onCheckInComplete( long peerNodeId, + long checkInNodeId, long startCounter, long offset, long monitoredSubject, @@ -36,12 +37,19 @@ private void onCheckInComplete( byte[] icdHmacKey) { delegate.onCheckInComplete( new ICDClientInfo( - peerNodeId, startCounter, offset, monitoredSubject, icdAesKey, icdHmacKey)); + peerNodeId, + checkInNodeId, + startCounter, + offset, + monitoredSubject, + icdAesKey, + icdHmacKey)); } @SuppressWarnings("unused") private byte[] onKeyRefreshNeeded( long peerNodeId, + long checkInNodeId, long startCounter, long offset, long monitoredSubject, @@ -49,7 +57,13 @@ private byte[] onKeyRefreshNeeded( byte[] icdHmacKey) { return delegate.onKeyRefreshNeeded( new ICDClientInfo( - peerNodeId, startCounter, offset, monitoredSubject, icdAesKey, icdHmacKey)); + peerNodeId, + checkInNodeId, + startCounter, + offset, + monitoredSubject, + icdAesKey, + icdHmacKey)); } @SuppressWarnings("unused") diff --git a/src/controller/java/src/chip/devicecontroller/ICDClientInfo.java b/src/controller/java/src/chip/devicecontroller/ICDClientInfo.java index 77df9179e115ee..ff028ae487ce23 100644 --- a/src/controller/java/src/chip/devicecontroller/ICDClientInfo.java +++ b/src/controller/java/src/chip/devicecontroller/ICDClientInfo.java @@ -20,6 +20,7 @@ /** Class for holding ICD Client information. */ public class ICDClientInfo { private final long peerNodeId; + private final long checkInNodeId; private final long startCounter; private final long offset; private final long monitoredSubject; @@ -28,12 +29,14 @@ public class ICDClientInfo { public ICDClientInfo( long peerNodeId, + long checkInNodeId, long startCounter, long offset, long monitoredSubject, byte[] icdAesKey, byte[] icdHmacKey) { this.peerNodeId = peerNodeId; + this.checkInNodeId = checkInNodeId; this.startCounter = startCounter; this.offset = offset; this.monitoredSubject = monitoredSubject; @@ -41,11 +44,16 @@ public ICDClientInfo( this.icdHmacKey = icdHmacKey; } - /** Returns the check in peer node ID. */ + /** Returns the peer node ID. */ public long getPeerNodeId() { return peerNodeId; } + /** Returns the check in node ID. */ + public long getCheckInNodeId() { + return checkInNodeId; + } + /** Returns the Start Counter. */ public long getStartCounter() { return startCounter; @@ -76,6 +84,8 @@ public String toString() { return "ICDClientInfo{" + "\n\tpeerNodeId=" + peerNodeId + + "\n\tcheckInNodeId=" + + checkInNodeId + "\n\t, startCounter=" + startCounter + "\n\t, offset=" diff --git a/src/controller/java/src/chip/devicecontroller/ICDDeviceInfo.java b/src/controller/java/src/chip/devicecontroller/ICDDeviceInfo.java index 70cbeb61cff5f4..8e812ed94d602a 100644 --- a/src/controller/java/src/chip/devicecontroller/ICDDeviceInfo.java +++ b/src/controller/java/src/chip/devicecontroller/ICDDeviceInfo.java @@ -60,6 +60,7 @@ public int getBitIndex() { private final long activeModeDuration; private final int activeModeThreshold; private final long icdNodeId; + private final long checkInNodeId; private final long icdCounter; private final long monitoredSubject; private final long fabricId; @@ -73,6 +74,7 @@ public int getBitIndex() { long activeModeDuration, int activeModeThreshold, long icdNodeId, + long checkInNodeId, long icdCounter, long monitoredSubject, long fabricId, @@ -84,6 +86,7 @@ public int getBitIndex() { this.activeModeDuration = activeModeDuration; this.activeModeThreshold = activeModeThreshold; this.icdNodeId = icdNodeId; + this.checkInNodeId = checkInNodeId; this.icdCounter = icdCounter; this.monitoredSubject = monitoredSubject; this.fabricId = fabricId; @@ -98,6 +101,7 @@ public int getBitIndex() { long activeModeDuration, int activeModeThreshold, long icdNodeId, + long checkInNodeId, long icdCounter, long monitoredSubject, long fabricId, @@ -108,6 +112,7 @@ public int getBitIndex() { this.activeModeDuration = activeModeDuration; this.activeModeThreshold = activeModeThreshold; this.icdNodeId = icdNodeId; + this.checkInNodeId = checkInNodeId; this.icdCounter = icdCounter; this.monitoredSubject = monitoredSubject; this.fabricId = fabricId; @@ -152,11 +157,16 @@ public int getActiveModeThreshold() { return activeModeThreshold; } - /** Returns the ICD Node Id. */ + /** Returns the ICD peer Node Id. */ public long getIcdNodeId() { return icdNodeId; } + /** Returns the checkIn Node Id. */ + public long getIcdCheckInNodeId() { + return checkInNodeId; + } + /** Returns the ICD Counter. */ public long getIcdCounter() { return icdCounter; @@ -186,6 +196,8 @@ public String toString() { + userActiveModeTriggerInstruction + "\n\ticdNodeId : " + icdNodeId + + "\n\ticdCheckInNodeId : " + + checkInNodeId + "\n\ticdCounter : " + icdCounter + "\n\tmonitoredSubject : " diff --git a/src/controller/java/src/chip/devicecontroller/model/Status.java b/src/controller/java/src/chip/devicecontroller/model/Status.java index 28abd36465689b..7a7eaa27ad5348 100644 --- a/src/controller/java/src/chip/devicecontroller/model/Status.java +++ b/src/controller/java/src/chip/devicecontroller/model/Status.java @@ -57,6 +57,7 @@ public enum Code { Reserved99(0x99), Reserved9a(0x9a), Busy(0x9c), + AccessRestricted(0x9d), Deprecatedc0(0xc0), Deprecatedc1(0xc1), Deprecatedc2(0xc2), diff --git a/src/controller/java/src/matter/controller/ICDClientInfo.kt b/src/controller/java/src/matter/controller/ICDClientInfo.kt index 3f0f30255a7dbc..9ad3757ad32d28 100644 --- a/src/controller/java/src/matter/controller/ICDClientInfo.kt +++ b/src/controller/java/src/matter/controller/ICDClientInfo.kt @@ -21,11 +21,13 @@ package matter.controller /** Class for holding ICD Client information. */ data class ICDClientInfo( val peerNodeId: Long, + val checkInNodeId: Long, val startCounter: Long, val offset: Long, val monitoredSubject: Long, val icdAesKey: ByteArray, val icdHmacKey: ByteArray ) { - override fun toString(): String = "$peerNodeId/$startCounter/$offset/$monitoredSubject" + override fun toString(): String = + "$peerNodeId/$checkInNodeId/$startCounter/$offset/$monitoredSubject" } diff --git a/src/controller/java/src/matter/controller/model/Status.kt b/src/controller/java/src/matter/controller/model/Status.kt index fa12f0b1cb25a5..84d06f550e9fac 100644 --- a/src/controller/java/src/matter/controller/model/Status.kt +++ b/src/controller/java/src/matter/controller/model/Status.kt @@ -57,6 +57,7 @@ data class Status(val status: Int, val clusterStatus: Int?) { RESERVED99(0X99), RESERVED9A(0X9A), BUSY(0X9C), + ACCESS_RESTRICTED(0x9D), DEPRECATEDC0(0XC0), DEPRECATEDC1(0XC1), DEPRECATEDC2(0XC2), diff --git a/src/controller/java/src/matter/onboardingpayload/QRCodeBasicOnboardingPayloadGenerator.kt b/src/controller/java/src/matter/onboardingpayload/QRCodeBasicOnboardingPayloadGenerator.kt index 853b3308953afd..49befbdb675d44 100644 --- a/src/controller/java/src/matter/onboardingpayload/QRCodeBasicOnboardingPayloadGenerator.kt +++ b/src/controller/java/src/matter/onboardingpayload/QRCodeBasicOnboardingPayloadGenerator.kt @@ -68,9 +68,6 @@ fun payloadBase38RepresentationWithTLV( // Copy the subBuffer back to the outBuffer subBuffer.copyInto(outBuffer, prefixLen) - - // Reduce output buffer size to be the size of written data - outBuffer.copyOf(prefixLen + subBuffer.size) } } diff --git a/src/controller/java/tests/matter/onboardingpayload/ManualCodeTest.kt b/src/controller/java/tests/matter/onboardingpayload/ManualCodeTest.kt index 900a3eb1a7ff72..42e60e7bfac37d 100644 --- a/src/controller/java/tests/matter/onboardingpayload/ManualCodeTest.kt +++ b/src/controller/java/tests/matter/onboardingpayload/ManualCodeTest.kt @@ -24,6 +24,7 @@ import kotlin.math.ceil import kotlin.math.log10 import kotlin.math.pow import org.junit.Assert.assertEquals +import org.junit.Assert.assertTrue import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.JUnit4 @@ -444,7 +445,7 @@ class ManualCodeTest { // Override the discriminator in the input payload with the short version, // since that's what we will produce. inPayload.setShortDiscriminatorValue(inPayload.getShortDiscriminatorValue()) - assertThat(inPayload == outPayload) + assertEquals(inPayload, outPayload) } /* @@ -464,7 +465,7 @@ class ManualCodeTest { // Override the discriminator in the input payload with the short version, // since that's what we will produce. inPayload.setShortDiscriminatorValue(inPayload.getShortDiscriminatorValue()) - assertThat(inPayload == outPayload) + assertEquals(inPayload, outPayload) } /* @@ -479,7 +480,7 @@ class ManualCodeTest { try { ManualOnboardingPayloadParser.checkDecimalStringValidity(representationWithoutCheckDigit) - assertThat(false) + assertTrue(false) } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } @@ -487,7 +488,7 @@ class ManualCodeTest { representationWithoutCheckDigit = "1" try { ManualOnboardingPayloadParser.checkDecimalStringValidity(representationWithoutCheckDigit) - assertThat(false) + assertTrue(false) } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } @@ -516,28 +517,28 @@ class ManualCodeTest { try { ManualOnboardingPayloadParser.checkCodeLengthValidity("01234567891", false) - assertThat(false) + assertTrue(false) } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } try { ManualOnboardingPayloadParser.checkCodeLengthValidity("012345678", false) - assertThat(false) + assertTrue(false) } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } try { ManualOnboardingPayloadParser.checkCodeLengthValidity("012345678901234567891", true) - assertThat(false) + assertTrue(false) } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } try { ManualOnboardingPayloadParser.checkCodeLengthValidity("0123456789012345678", true) - assertThat(false) + assertTrue(false) } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } @@ -562,14 +563,14 @@ class ManualCodeTest { try { ManualOnboardingPayloadParser.toNumber("012345.123456789") - assertThat(false) + assertTrue(false) } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } try { ManualOnboardingPayloadParser.toNumber("/") - assertThat(false) + assertTrue(false) } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } @@ -631,14 +632,14 @@ class ManualCodeTest { try { index.set(1) ManualOnboardingPayloadParser.readDigitsFromDecimalString("12345", index, 5) - assertThat(false) + assertTrue(false) } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } try { ManualOnboardingPayloadParser.readDigitsFromDecimalString("12", index, 5) - assertThat(false) + assertTrue(false) } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } @@ -646,7 +647,7 @@ class ManualCodeTest { try { index.set(200) ManualOnboardingPayloadParser.readDigitsFromDecimalString("6256276377282", index, 1) - assertThat(false) + assertTrue(false) } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } diff --git a/src/controller/java/tests/matter/onboardingpayload/QRCodeTest.kt b/src/controller/java/tests/matter/onboardingpayload/QRCodeTest.kt index 62dff45174b7ed..4cc9477521e3fc 100644 --- a/src/controller/java/tests/matter/onboardingpayload/QRCodeTest.kt +++ b/src/controller/java/tests/matter/onboardingpayload/QRCodeTest.kt @@ -20,6 +20,7 @@ package matter.onboardingpayload import com.google.common.truth.Truth.assertThat import org.junit.Assert.assertEquals +import org.junit.Assert.assertTrue import org.junit.Test import org.junit.runner.RunWith import org.junit.runners.JUnit4 @@ -224,7 +225,7 @@ class QRCodeTest { try { QRCodeOnboardingPayloadParser(invalidString).populatePayload() - assertThat(false) + assertTrue(false) } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } @@ -240,7 +241,7 @@ class QRCodeTest { try { QRCodeOnboardingPayloadParser(invalidString).populatePayload() - assertThat(false) + assertTrue(false) } catch (e: Exception) { println("Expected exception occurred: ${e.message}") } @@ -396,21 +397,21 @@ class QRCodeTest { // verify we can grab just the serial number as well assertThat(parsedQrCode.getSerialNumber()).isEqualTo("123456789") - // Test 2nd optional field - optionalQRCodeInfo = OptionalQRCodeInfoExtension() - optionalQRCodeInfo.tag = 130 - optionalQRCodeInfo.type = OptionalQRCodeInfoType.TYPE_STRING - optionalQRCodeInfo.data = "myData" + val optionalQRCodeInfo1 = OptionalQRCodeInfoExtension() + optionalQRCodeInfo1.tag = 130 + optionalQRCodeInfo1.type = OptionalQRCodeInfoType.TYPE_STRING + optionalQRCodeInfo1.data = "myData" - assertThat(parsedQrCode.getAllOptionalVendorData()[0]).isEqualTo(optionalQRCodeInfo) + val optionalQRCodeInfo2 = OptionalQRCodeInfoExtension() + optionalQRCodeInfo2.tag = 131 + optionalQRCodeInfo2.type = OptionalQRCodeInfoType.TYPE_INT32 + optionalQRCodeInfo2.int32 = 12 - // Test 3rd optional field - optionalQRCodeInfo = OptionalQRCodeInfoExtension() - optionalQRCodeInfo.tag = 131 - optionalQRCodeInfo.type = OptionalQRCodeInfoType.TYPE_INT32 - optionalQRCodeInfo.int32 = 12 + val vendor1 = parsedQrCode.getAllOptionalVendorData()[0] + val vendor2 = parsedQrCode.getAllOptionalVendorData()[1] - assertThat(parsedQrCode.getAllOptionalVendorData()[1]).isEqualTo(optionalQRCodeInfo) + assertTrue(vendor1 == optionalQRCodeInfo1 || vendor1 == optionalQRCodeInfo2) + assertTrue(vendor2 == optionalQRCodeInfo1 || vendor2 == optionalQRCodeInfo2) } companion object { diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index cacd15683ab39b..771d026771d39d 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -42974,29 +42974,6 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR using namespace app::Clusters::EcosystemInformation; switch (aPath.mAttributeId) { - case Attributes::RemovedOn::Id: { - using TypeInfo = Attributes::RemovedOn::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value; - if (cppValue.IsNull()) - { - value = nullptr; - } - else - { - std::string valueClassName = "java/lang/Long"; - std::string valueCtorSignature = "(J)V"; - jlong jnivalue = static_cast(cppValue.Value()); - chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), - jnivalue, value); - } - return value; - } case Attributes::DeviceDirectory::Id: { using TypeInfo = Attributes::DeviceDirectory::TypeInfo; TypeInfo::DecodableType cppValue; @@ -47583,6 +47560,38 @@ jobject DecodeAttributeValue(const app::ConcreteAttributePath & aPath, TLV::TLVR jnivalue, value); return value; } + case Attributes::ReadFailureCode::Id: { + using TypeInfo = Attributes::ReadFailureCode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Integer"; + std::string valueCtorSignature = "(I)V"; + jint jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), jnivalue, + value); + return value; + } + case Attributes::FailureInt32U::Id: { + using TypeInfo = Attributes::FailureInt32U::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value; + std::string valueClassName = "java/lang/Long"; + std::string valueCtorSignature = "(J)V"; + jlong jnivalue = static_cast(cppValue); + chip::JniReferences::GetInstance().CreateBoxedObject(valueClassName.c_str(), valueCtorSignature.c_str(), + jnivalue, value); + return value; + } case Attributes::NullableBoolean::Id: { using TypeInfo = Attributes::NullableBoolean::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index b9d5e76c909135..a133eceb499a0f 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -500,46 +500,6 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & return value; } - case Events::AccessRestrictionEntryChanged::Id: { - Events::AccessRestrictionEntryChanged::DecodableType cppValue; - *aError = app::DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) - { - return nullptr; - } - jobject value_fabricIndex; - std::string value_fabricIndexClassName = "java/lang/Integer"; - std::string value_fabricIndexCtorSignature = "(I)V"; - jint jnivalue_fabricIndex = static_cast(cppValue.fabricIndex); - chip::JniReferences::GetInstance().CreateBoxedObject(value_fabricIndexClassName.c_str(), - value_fabricIndexCtorSignature.c_str(), jnivalue_fabricIndex, - value_fabricIndex); - - jclass accessRestrictionEntryChangedStructClass; - err = chip::JniReferences::GetInstance().GetLocalClassRef( - env, "chip/devicecontroller/ChipEventStructs$AccessControlClusterAccessRestrictionEntryChangedEvent", - accessRestrictionEntryChangedStructClass); - if (err != CHIP_NO_ERROR) - { - ChipLogError(Zcl, "Could not find class ChipEventStructs$AccessControlClusterAccessRestrictionEntryChangedEvent"); - return nullptr; - } - - jmethodID accessRestrictionEntryChangedStructCtor; - err = chip::JniReferences::GetInstance().FindMethod(env, accessRestrictionEntryChangedStructClass, "", - "(Ljava/lang/Integer;)V", &accessRestrictionEntryChangedStructCtor); - if (err != CHIP_NO_ERROR || accessRestrictionEntryChangedStructCtor == nullptr) - { - ChipLogError(Zcl, - "Could not find ChipEventStructs$AccessControlClusterAccessRestrictionEntryChangedEvent constructor"); - return nullptr; - } - - jobject value = env->NewObject(accessRestrictionEntryChangedStructClass, accessRestrictionEntryChangedStructCtor, - value_fabricIndex); - - return value; - } case Events::FabricRestrictionReviewUpdate::Id: { Events::FabricRestrictionReviewUpdate::DecodableType cppValue; *aError = app::DataModel::Decode(aReader, cppValue); @@ -555,25 +515,29 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & value_tokenClassName.c_str(), value_tokenCtorSignature.c_str(), jnivalue_token, value_token); jobject value_instruction; - if (cppValue.instruction.IsNull()) + if (!cppValue.instruction.HasValue()) { - value_instruction = nullptr; + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_instruction); } else { - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(cppValue.instruction.Value(), value_instruction)); + jobject value_instructionInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.instruction.Value(), + value_instructionInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(value_instructionInsideOptional, value_instruction); } - jobject value_redirectURL; - if (cppValue.redirectURL.IsNull()) + jobject value_ARLRequestFlowUrl; + if (!cppValue.ARLRequestFlowUrl.HasValue()) { - value_redirectURL = nullptr; + chip::JniReferences::GetInstance().CreateOptional(nullptr, value_ARLRequestFlowUrl); } else { - LogErrorOnFailure( - chip::JniReferences::GetInstance().CharToStringUTF(cppValue.redirectURL.Value(), value_redirectURL)); + jobject value_ARLRequestFlowUrlInsideOptional; + LogErrorOnFailure(chip::JniReferences::GetInstance().CharToStringUTF(cppValue.ARLRequestFlowUrl.Value(), + value_ARLRequestFlowUrlInsideOptional)); + chip::JniReferences::GetInstance().CreateOptional(value_ARLRequestFlowUrlInsideOptional, value_ARLRequestFlowUrl); } jobject value_fabricIndex; @@ -597,7 +561,7 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & jmethodID fabricRestrictionReviewUpdateStructCtor; err = chip::JniReferences::GetInstance().FindMethod( env, fabricRestrictionReviewUpdateStructClass, "", - "(Ljava/lang/Long;Ljava/lang/String;Ljava/lang/String;Ljava/lang/Integer;)V", + "(Ljava/lang/Long;Ljava/util/Optional;Ljava/util/Optional;Ljava/lang/Integer;)V", &fabricRestrictionReviewUpdateStructCtor); if (err != CHIP_NO_ERROR || fabricRestrictionReviewUpdateStructCtor == nullptr) { @@ -607,7 +571,7 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } jobject value = env->NewObject(fabricRestrictionReviewUpdateStructClass, fabricRestrictionReviewUpdateStructCtor, - value_token, value_instruction, value_redirectURL, value_fabricIndex); + value_token, value_instruction, value_ARLRequestFlowUrl, value_fabricIndex); return value; } @@ -7688,6 +7652,43 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & using namespace app::Clusters::OccupancySensing; switch (aPath.mEventId) { + case Events::OccupancyChanged::Id: { + Events::OccupancyChanged::DecodableType cppValue; + *aError = app::DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) + { + return nullptr; + } + jobject value_occupancy; + std::string value_occupancyClassName = "java/lang/Integer"; + std::string value_occupancyCtorSignature = "(I)V"; + jint jnivalue_occupancy = static_cast(cppValue.occupancy.Raw()); + chip::JniReferences::GetInstance().CreateBoxedObject( + value_occupancyClassName.c_str(), value_occupancyCtorSignature.c_str(), jnivalue_occupancy, value_occupancy); + + jclass occupancyChangedStructClass; + err = chip::JniReferences::GetInstance().GetLocalClassRef( + env, "chip/devicecontroller/ChipEventStructs$OccupancySensingClusterOccupancyChangedEvent", + occupancyChangedStructClass); + if (err != CHIP_NO_ERROR) + { + ChipLogError(Zcl, "Could not find class ChipEventStructs$OccupancySensingClusterOccupancyChangedEvent"); + return nullptr; + } + + jmethodID occupancyChangedStructCtor; + err = chip::JniReferences::GetInstance().FindMethod(env, occupancyChangedStructClass, "", + "(Ljava/lang/Integer;)V", &occupancyChangedStructCtor); + if (err != CHIP_NO_ERROR || occupancyChangedStructCtor == nullptr) + { + ChipLogError(Zcl, "Could not find ChipEventStructs$OccupancySensingClusterOccupancyChangedEvent constructor"); + return nullptr; + } + + jobject value = env->NewObject(occupancyChangedStructClass, occupancyChangedStructCtor, value_occupancy); + + return value; + } default: *aError = CHIP_ERROR_IM_MALFORMED_EVENT_PATH_IB; break; @@ -8298,20 +8299,20 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & { return nullptr; } - jobject value_requestId; - std::string value_requestIdClassName = "java/lang/Long"; - std::string value_requestIdCtorSignature = "(J)V"; - jlong jnivalue_requestId = static_cast(cppValue.requestId); + jobject value_requestID; + std::string value_requestIDClassName = "java/lang/Long"; + std::string value_requestIDCtorSignature = "(J)V"; + jlong jnivalue_requestID = static_cast(cppValue.requestID); chip::JniReferences::GetInstance().CreateBoxedObject( - value_requestIdClassName.c_str(), value_requestIdCtorSignature.c_str(), jnivalue_requestId, value_requestId); + value_requestIDClassName.c_str(), value_requestIDCtorSignature.c_str(), jnivalue_requestID, value_requestID); - jobject value_clientNodeId; - std::string value_clientNodeIdClassName = "java/lang/Long"; - std::string value_clientNodeIdCtorSignature = "(J)V"; - jlong jnivalue_clientNodeId = static_cast(cppValue.clientNodeId); - chip::JniReferences::GetInstance().CreateBoxedObject(value_clientNodeIdClassName.c_str(), - value_clientNodeIdCtorSignature.c_str(), - jnivalue_clientNodeId, value_clientNodeId); + jobject value_clientNodeID; + std::string value_clientNodeIDClassName = "java/lang/Long"; + std::string value_clientNodeIDCtorSignature = "(J)V"; + jlong jnivalue_clientNodeID = static_cast(cppValue.clientNodeID); + chip::JniReferences::GetInstance().CreateBoxedObject(value_clientNodeIDClassName.c_str(), + value_clientNodeIDCtorSignature.c_str(), + jnivalue_clientNodeID, value_clientNodeID); jobject value_statusCode; std::string value_statusCodeClassName = "java/lang/Integer"; @@ -8351,7 +8352,7 @@ jobject DecodeEventValue(const app::ConcreteEventPath & aPath, TLV::TLVReader & } jobject value = env->NewObject(commissioningRequestResultStructClass, commissioningRequestResultStructCtor, - value_requestId, value_clientNodeId, value_statusCode, value_fabricIndex); + value_requestID, value_clientNodeID, value_statusCode, value_fabricIndex); return value; } diff --git a/src/controller/python/ChipDeviceController-Discovery.cpp b/src/controller/python/ChipDeviceController-Discovery.cpp index 7c669603f4ff1d..e4349b31bd1f09 100644 --- a/src/controller/python/ChipDeviceController-Discovery.cpp +++ b/src/controller/python/ChipDeviceController-Discovery.cpp @@ -23,12 +23,16 @@ * */ +#include + #include #include #include #include #include #include +#include +#include using namespace chip; @@ -186,4 +190,31 @@ bool pychip_DeviceController_GetIPForDiscoveredDevice(Controller::DeviceCommissi } return false; } + +PyChipError pychip_CreateManualCode(uint16_t longDiscriminator, uint32_t passcode, char * manualCodeBuffer, size_t inBufSize, + size_t * outBufSize) +{ + SetupPayload payload; + SetupDiscriminator discriminator; + discriminator.SetLongValue(longDiscriminator); + payload.discriminator = discriminator; + payload.setUpPINCode = passcode; + std::string setupManualCode; + + *outBufSize = 0; + CHIP_ERROR err = ManualSetupPayloadGenerator(payload).payloadDecimalStringRepresentation(setupManualCode); + if (err == CHIP_NO_ERROR) + { + MutableCharSpan span(manualCodeBuffer, inBufSize); + // Plus 1 so we copy the null terminator + CopyCharSpanToMutableCharSpan(CharSpan(setupManualCode.c_str(), setupManualCode.length() + 1), span); + *outBufSize = span.size(); + if (*outBufSize == 0) + { + err = CHIP_ERROR_NO_MEMORY; + } + } + + return ToPyChipError(err); +} } diff --git a/src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp b/src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp index c04481a45a11ea..11dc4bc70720a4 100644 --- a/src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp +++ b/src/controller/python/ChipDeviceController-ScriptDevicePairingDelegate.cpp @@ -188,7 +188,8 @@ ScriptDevicePairingDelegate::GetOpenWindowCallback(Controller::CommissioningWind void ScriptDevicePairingDelegate::OnICDRegistrationComplete(ScopedNodeId nodeId, uint32_t icdCounter) { app::ICDClientInfo clientInfo; - clientInfo.peer_node = nodeId; + clientInfo.peer_node = nodeId; + clientInfo.check_in_node = chip::ScopedNodeId(sCommissioningParameters.GetICDCheckInNodeId().Value(), nodeId.GetFabricIndex()); clientInfo.monitored_subject = sCommissioningParameters.GetICDMonitoredSubject().Value(); clientInfo.start_icd_counter = icdCounter; clientInfo.client_type = sCommissioningParameters.GetICDClientType().Value(); diff --git a/src/controller/python/chip/ChipDeviceCtrl.py b/src/controller/python/chip/ChipDeviceCtrl.py index 24fe59486f78d5..d76d415d746945 100644 --- a/src/controller/python/chip/ChipDeviceCtrl.py +++ b/src/controller/python/chip/ChipDeviceCtrl.py @@ -1062,6 +1062,8 @@ def __init__(self, loop, future: asyncio.Future): self._future = future def _deviceAvailable(self): + if self._future.cancelled(): + return if self._returnDevice.value is not None: self._future.set_result(self._returnDevice) else: @@ -1711,6 +1713,19 @@ def InitGroupTestingData(self): self.devCtrl) ).raise_on_error() + def CreateManualCode(self, discriminator: int, passcode: int) -> str: + """ Creates a standard flow manual code from the given discriminator and passcode.""" + # 64 bytes is WAY more than required, but let's be safe + in_size = 64 + out_size = c_size_t(0) + buf = create_string_buffer(in_size) + self._ChipStack.Call( + lambda: self._dmLib.pychip_CreateManualCode(discriminator, passcode, buf, in_size, pointer(out_size)) + ).raise_on_error() + if out_size.value == 0 or out_size.value > in_size: + raise MemoryError("Invalid output size for manual code") + return buf.value.decode() + # ----- Private Members ----- def _InitLib(self): if self._dmLib is None: @@ -1938,6 +1953,9 @@ def _InitLib(self): self._dmLib.pychip_DeviceProxy_GetRemoteSessionParameters.restype = PyChipError self._dmLib.pychip_DeviceProxy_GetRemoteSessionParameters.argtypes = [c_void_p, c_char_p] + self._dmLib.pychip_CreateManualCode.restype = PyChipError + self._dmLib.pychip_CreateManualCode.argtypes = [c_uint16, c_uint32, c_char_p, c_size_t, POINTER(c_size_t)] + class ChipDeviceController(ChipDeviceControllerBase): ''' The ChipDeviceCommissioner binding, named as ChipDeviceController diff --git a/src/controller/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 028810afd4eb77..268dd1abfb574c 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -3302,6 +3302,7 @@ class ChipClusters: "commandName": "KeepActive", "args": { "stayActiveDuration": "int", + "timeoutMs": "int", }, }, }, @@ -13319,20 +13320,14 @@ class ChipClusters: }, "attributes": { 0x00000000: { - "attributeName": "RemovedOn", - "attributeId": 0x00000000, - "type": "int", - "reportable": True, - }, - 0x00000001: { "attributeName": "DeviceDirectory", - "attributeId": 0x00000001, + "attributeId": 0x00000000, "type": "", "reportable": True, }, - 0x00000002: { + 0x00000001: { "attributeName": "LocationDirectory", - "attributeId": 0x00000002, + "attributeId": 0x00000001, "type": "", "reportable": True, }, @@ -13382,9 +13377,9 @@ class ChipClusters: "commandId": 0x00000000, "commandName": "RequestCommissioningApproval", "args": { - "requestId": "int", - "vendorId": "int", - "productId": "int", + "requestID": "int", + "vendorID": "int", + "productID": "int", "label": "str", }, }, @@ -13392,10 +13387,8 @@ class ChipClusters: "commandId": 0x00000001, "commandName": "CommissionNode", "args": { - "requestId": "int", + "requestID": "int", "responseTimeoutSeconds": "int", - "ipAddress": "bytes", - "port": "int", }, }, }, @@ -14844,6 +14837,20 @@ class ChipClusters: "reportable": True, "writable": True, }, + 0x00003000: { + "attributeName": "ReadFailureCode", + "attributeId": 0x00003000, + "type": "int", + "reportable": True, + "writable": True, + }, + 0x00003001: { + "attributeName": "FailureInt32U", + "attributeId": 0x00003001, + "type": "int", + "reportable": True, + "writable": True, + }, 0x00004000: { "attributeName": "NullableBoolean", "attributeId": 0x00004000, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 9808b113f234b7..89f364a79a094e 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -3096,7 +3096,7 @@ class ReviewFabricRestrictions(ClusterCommand): cluster_id: typing.ClassVar[int] = 0x0000001F command_id: typing.ClassVar[int] = 0x00000000 is_client: typing.ClassVar[bool] = True - response_type: typing.ClassVar[str] = None + response_type: typing.ClassVar[str] = 'ReviewFabricRestrictionsResponse' @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: @@ -3387,25 +3387,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: latestValue: 'typing.Union[Nullable, AccessControl.Structs.AccessControlExtensionStruct]' = NullValue fabricIndex: 'uint' = 0 - @dataclass - class AccessRestrictionEntryChanged(ClusterEvent): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x0000001F - - @ChipUtility.classproperty - def event_id(cls) -> int: - return 0x00000002 - - @ChipUtility.classproperty - def descriptor(cls) -> ClusterObjectDescriptor: - return ClusterObjectDescriptor( - Fields=[ - ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), - ]) - - fabricIndex: 'uint' = 0 - @dataclass class FabricRestrictionReviewUpdate(ClusterEvent): @ChipUtility.classproperty @@ -3414,21 +3395,21 @@ def cluster_id(cls) -> int: @ChipUtility.classproperty def event_id(cls) -> int: - return 0x00000003 + return 0x00000002 @ChipUtility.classproperty def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="token", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="instruction", Tag=1, Type=typing.Union[Nullable, str]), - ClusterObjectFieldDescriptor(Label="redirectURL", Tag=2, Type=typing.Union[Nullable, str]), + ClusterObjectFieldDescriptor(Label="instruction", Tag=1, Type=typing.Optional[str]), + ClusterObjectFieldDescriptor(Label="ARLRequestFlowUrl", Tag=2, Type=typing.Optional[str]), ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) token: 'uint' = 0 - instruction: 'typing.Union[Nullable, str]' = NullValue - redirectURL: 'typing.Union[Nullable, str]' = NullValue + instruction: 'typing.Optional[str]' = None + ARLRequestFlowUrl: 'typing.Optional[str]' = None fabricIndex: 'uint' = 0 @@ -12168,9 +12149,11 @@ def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ ClusterObjectFieldDescriptor(Label="stayActiveDuration", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="timeoutMs", Tag=1, Type=uint), ]) stayActiveDuration: 'uint' = 0 + timeoutMs: 'uint' = 0 class Attributes: @dataclass @@ -16047,6 +16030,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Enums: class ModeTag(MatterIntEnum): + kAuto = 0x00 + kQuick = 0x01 + kQuiet = 0x02 + kLowNoise = 0x03 + kLowEnergy = 0x04 + kVacation = 0x05 + kMin = 0x06 + kMax = 0x07 + kNight = 0x08 + kDay = 0x09 kBake = 0x4000 kConvection = 0x4001 kGrill = 0x4002 @@ -16060,7 +16053,7 @@ class ModeTag(MatterIntEnum): # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 0, + kUnknownEnumValue = 10, class Bitmaps: class Feature(IntFlag): @@ -16773,6 +16766,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Enums: class ModeTag(MatterIntEnum): + kAuto = 0x00 + kQuick = 0x01 + kQuiet = 0x02 + kLowNoise = 0x03 + kLowEnergy = 0x04 + kVacation = 0x05 + kMin = 0x06 + kMax = 0x07 + kNight = 0x08 + kDay = 0x09 kNormal = 0x4000 kDelicate = 0x4001 kHeavy = 0x4002 @@ -17046,6 +17049,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Enums: class ModeTag(MatterIntEnum): + kAuto = 0x00 + kQuick = 0x01 + kQuiet = 0x02 + kLowNoise = 0x03 + kLowEnergy = 0x04 + kVacation = 0x05 + kMin = 0x06 + kMax = 0x07 + kNight = 0x08 + kDay = 0x09 kRapidCool = 0x4000 kRapidFreeze = 0x4001 # kUnknownEnumValue intentionally not defined. This enum never goes @@ -17523,6 +17536,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Enums: class ModeTag(MatterIntEnum): + kAuto = 0x00 + kQuick = 0x01 + kQuiet = 0x02 + kLowNoise = 0x03 + kLowEnergy = 0x04 + kVacation = 0x05 + kMin = 0x06 + kMax = 0x07 + kNight = 0x08 + kDay = 0x09 kIdle = 0x4000 kCleaning = 0x4001 kMapping = 0x4002 @@ -17549,7 +17572,7 @@ class StatusCode(MatterIntEnum): class Bitmaps: class Feature(IntFlag): - kNoFeatures = 0x0 + kDirectModeChange = 0x10000 class Structs: @dataclass @@ -17774,6 +17797,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Enums: class ModeTag(MatterIntEnum): + kAuto = 0x00 + kQuick = 0x01 + kQuiet = 0x02 + kLowNoise = 0x03 + kLowEnergy = 0x04 + kVacation = 0x05 + kMin = 0x06 + kMax = 0x07 + kNight = 0x08 + kDay = 0x09 kDeepClean = 0x4000 kVacuum = 0x4001 kMop = 0x4002 @@ -17793,7 +17826,7 @@ class StatusCode(MatterIntEnum): class Bitmaps: class Feature(IntFlag): - kNoFeatures = 0x0 + kDirectModeChange = 0x10000 class Structs: @dataclass @@ -18481,6 +18514,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Enums: class ModeTag(MatterIntEnum): + kAuto = 0x00 + kQuick = 0x01 + kQuiet = 0x02 + kLowNoise = 0x03 + kLowEnergy = 0x04 + kVacation = 0x05 + kMin = 0x06 + kMax = 0x07 + kNight = 0x08 + kDay = 0x09 kNormal = 0x4000 kHeavy = 0x4001 kLight = 0x4002 @@ -19806,13 +19849,23 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Enums: class ModeTag(MatterIntEnum): + kAuto = 0x00 + kQuick = 0x01 + kQuiet = 0x02 + kLowNoise = 0x03 + kLowEnergy = 0x04 + kVacation = 0x05 + kMin = 0x06 + kMax = 0x07 + kNight = 0x08 + kDay = 0x09 kNormal = 0x4000 kDefrost = 0x4001 # All received enum values that are not listed above will be mapped # to kUnknownEnumValue. This is a helper enum value that should only # be used by code to process how it handles receiving an unknown # enum value. This specific value should never be transmitted. - kUnknownEnumValue = 0, + kUnknownEnumValue = 10, class Bitmaps: class Feature(IntFlag): @@ -20737,6 +20790,10 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Enums: class ErrorStateEnum(MatterIntEnum): + kNoError = 0x00 + kUnableToStartOrResume = 0x01 + kUnableToCompleteOperation = 0x02 + kCommandInvalidInState = 0x03 kFailedToFindChargingDock = 0x40 kStuck = 0x41 kDustBinMissing = 0x42 @@ -20752,6 +20809,10 @@ class ErrorStateEnum(MatterIntEnum): # src/app/common/templates/config-data.yaml. class OperationalStateEnum(MatterIntEnum): + kStopped = 0x00 + kRunning = 0x01 + kPaused = 0x02 + kError = 0x03 kSeekingCharger = 0x40 kCharging = 0x41 kDocked = 0x42 @@ -27391,6 +27452,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Enums: class ModeTag(MatterIntEnum): + kAuto = 0x00 + kQuick = 0x01 + kQuiet = 0x02 + kLowNoise = 0x03 + kLowEnergy = 0x04 + kVacation = 0x05 + kMin = 0x06 + kMax = 0x07 + kNight = 0x08 + kDay = 0x09 kManual = 0x4000 kTimeOfUse = 0x4001 kSolarCharging = 0x4002 @@ -27663,6 +27734,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Enums: class ModeTag(MatterIntEnum): + kAuto = 0x00 + kQuick = 0x01 + kQuiet = 0x02 + kLowNoise = 0x03 + kLowEnergy = 0x04 + kVacation = 0x05 + kMin = 0x06 + kMax = 0x07 + kNight = 0x08 + kDay = 0x09 kOff = 0x4000 kManual = 0x4001 kTimed = 0x4002 @@ -27935,6 +28016,16 @@ def descriptor(cls) -> ClusterObjectDescriptor: class Enums: class ModeTag(MatterIntEnum): + kAuto = 0x00 + kQuick = 0x01 + kQuiet = 0x02 + kLowNoise = 0x03 + kLowEnergy = 0x04 + kVacation = 0x05 + kMin = 0x06 + kMax = 0x07 + kNight = 0x08 + kDay = 0x09 kNoOptimization = 0x4000 kDeviceOptimization = 0x4001 kLocalOptimization = 0x4002 @@ -38399,6 +38490,26 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'uint' = 0 + class Events: + @dataclass + class OccupancyChanged(ClusterEvent): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0x00000406 + + @ChipUtility.classproperty + def event_id(cls) -> int: + return 0x00000000 + + @ChipUtility.classproperty + def descriptor(cls) -> ClusterObjectDescriptor: + return ClusterObjectDescriptor( + Fields=[ + ClusterObjectFieldDescriptor(Label="occupancy", Tag=0, Type=uint), + ]) + + occupancy: 'uint' = 0 + @dataclass class CarbonMonoxideConcentrationMeasurement(Cluster): @@ -47185,9 +47296,8 @@ class EcosystemInformation(Cluster): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="removedOn", Tag=0x00000000, Type=typing.Union[None, Nullable, uint]), - ClusterObjectFieldDescriptor(Label="deviceDirectory", Tag=0x00000001, Type=typing.List[EcosystemInformation.Structs.EcosystemDeviceStruct]), - ClusterObjectFieldDescriptor(Label="locationDirectory", Tag=0x00000002, Type=typing.List[EcosystemInformation.Structs.EcosystemLocationStruct]), + ClusterObjectFieldDescriptor(Label="deviceDirectory", Tag=0x00000000, Type=typing.List[EcosystemInformation.Structs.EcosystemDeviceStruct]), + ClusterObjectFieldDescriptor(Label="locationDirectory", Tag=0x00000001, Type=typing.List[EcosystemInformation.Structs.EcosystemLocationStruct]), ClusterObjectFieldDescriptor(Label="generatedCommandList", Tag=0x0000FFF8, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="acceptedCommandList", Tag=0x0000FFF9, Type=typing.List[uint]), ClusterObjectFieldDescriptor(Label="eventList", Tag=0x0000FFFA, Type=typing.List[uint]), @@ -47196,7 +47306,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="clusterRevision", Tag=0x0000FFFD, Type=uint), ]) - removedOn: 'typing.Union[None, Nullable, uint]' = None deviceDirectory: 'typing.List[EcosystemInformation.Structs.EcosystemDeviceStruct]' = None locationDirectory: 'typing.List[EcosystemInformation.Structs.EcosystemLocationStruct]' = None generatedCommandList: 'typing.List[uint]' = None @@ -47263,22 +47372,6 @@ def descriptor(cls) -> ClusterObjectDescriptor: fabricIndex: 'uint' = 0 class Attributes: - @dataclass - class RemovedOn(ClusterAttributeDescriptor): - @ChipUtility.classproperty - def cluster_id(cls) -> int: - return 0x00000750 - - @ChipUtility.classproperty - def attribute_id(cls) -> int: - return 0x00000000 - - @ChipUtility.classproperty - def attribute_type(cls) -> ClusterObjectFieldDescriptor: - return ClusterObjectFieldDescriptor(Type=typing.Union[None, Nullable, uint]) - - value: 'typing.Union[None, Nullable, uint]' = None - @dataclass class DeviceDirectory(ClusterAttributeDescriptor): @ChipUtility.classproperty @@ -47287,7 +47380,7 @@ def cluster_id(cls) -> int: @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000001 + return 0x00000000 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -47303,7 +47396,7 @@ def cluster_id(cls) -> int: @ChipUtility.classproperty def attribute_id(cls) -> int: - return 0x00000002 + return 0x00000001 @ChipUtility.classproperty def attribute_type(cls) -> ClusterObjectFieldDescriptor: @@ -47449,15 +47542,15 @@ class RequestCommissioningApproval(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="requestId", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="vendorId", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="productId", Tag=2, Type=uint), + ClusterObjectFieldDescriptor(Label="requestID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="vendorID", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="productID", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="label", Tag=3, Type=typing.Optional[str]), ]) - requestId: 'uint' = 0 - vendorId: 'uint' = 0 - productId: 'uint' = 0 + requestID: 'uint' = 0 + vendorID: 'uint' = 0 + productID: 'uint' = 0 label: 'typing.Optional[str]' = None @dataclass @@ -47471,16 +47564,12 @@ class CommissionNode(ClusterCommand): def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="requestId", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="requestID", Tag=0, Type=uint), ClusterObjectFieldDescriptor(Label="responseTimeoutSeconds", Tag=1, Type=uint), - ClusterObjectFieldDescriptor(Label="ipAddress", Tag=2, Type=typing.Optional[bytes]), - ClusterObjectFieldDescriptor(Label="port", Tag=3, Type=typing.Optional[uint]), ]) - requestId: 'uint' = 0 + requestID: 'uint' = 0 responseTimeoutSeconds: 'uint' = 0 - ipAddress: 'typing.Optional[bytes]' = None - port: 'typing.Optional[uint]' = None @dataclass class ReverseOpenCommissioningWindow(ClusterCommand): @@ -47634,14 +47723,14 @@ def event_id(cls) -> int: def descriptor(cls) -> ClusterObjectDescriptor: return ClusterObjectDescriptor( Fields=[ - ClusterObjectFieldDescriptor(Label="requestId", Tag=0, Type=uint), - ClusterObjectFieldDescriptor(Label="clientNodeId", Tag=1, Type=uint), + ClusterObjectFieldDescriptor(Label="requestID", Tag=0, Type=uint), + ClusterObjectFieldDescriptor(Label="clientNodeID", Tag=1, Type=uint), ClusterObjectFieldDescriptor(Label="statusCode", Tag=2, Type=uint), ClusterObjectFieldDescriptor(Label="fabricIndex", Tag=254, Type=uint), ]) - requestId: 'uint' = 0 - clientNodeId: 'uint' = 0 + requestID: 'uint' = 0 + clientNodeID: 'uint' = 0 statusCode: 'uint' = 0 fabricIndex: 'uint' = 0 @@ -50211,6 +50300,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: ClusterObjectFieldDescriptor(Label="globalEnum", Tag=0x00000033, Type=Globals.Enums.TestGlobalEnum), ClusterObjectFieldDescriptor(Label="globalStruct", Tag=0x00000034, Type=Globals.Structs.TestGlobalStruct), ClusterObjectFieldDescriptor(Label="unsupported", Tag=0x000000FF, Type=typing.Optional[bool]), + ClusterObjectFieldDescriptor(Label="readFailureCode", Tag=0x00003000, Type=typing.Optional[uint]), + ClusterObjectFieldDescriptor(Label="failureInt32U", Tag=0x00003001, Type=typing.Optional[uint]), ClusterObjectFieldDescriptor(Label="nullableBoolean", Tag=0x00004000, Type=typing.Union[Nullable, bool]), ClusterObjectFieldDescriptor(Label="nullableBitmap8", Tag=0x00004001, Type=typing.Union[Nullable, uint]), ClusterObjectFieldDescriptor(Label="nullableBitmap16", Tag=0x00004002, Type=typing.Union[Nullable, uint]), @@ -50306,6 +50397,8 @@ def descriptor(cls) -> ClusterObjectDescriptor: globalEnum: 'Globals.Enums.TestGlobalEnum' = None globalStruct: 'Globals.Structs.TestGlobalStruct' = None unsupported: 'typing.Optional[bool]' = None + readFailureCode: 'typing.Optional[uint]' = None + failureInt32U: 'typing.Optional[uint]' = None nullableBoolean: 'typing.Union[Nullable, bool]' = None nullableBitmap8: 'typing.Union[Nullable, uint]' = None nullableBitmap16: 'typing.Union[Nullable, uint]' = None @@ -52151,6 +52244,38 @@ def attribute_type(cls) -> ClusterObjectFieldDescriptor: value: 'typing.Optional[bool]' = None + @dataclass + class ReadFailureCode(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0xFFF1FC05 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00003000 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + + @dataclass + class FailureInt32U(ClusterAttributeDescriptor): + @ChipUtility.classproperty + def cluster_id(cls) -> int: + return 0xFFF1FC05 + + @ChipUtility.classproperty + def attribute_id(cls) -> int: + return 0x00003001 + + @ChipUtility.classproperty + def attribute_type(cls) -> ClusterObjectFieldDescriptor: + return ClusterObjectFieldDescriptor(Type=typing.Optional[uint]) + + value: 'typing.Optional[uint]' = None + @dataclass class NullableBoolean(ClusterAttributeDescriptor): @ChipUtility.classproperty diff --git a/src/controller/python/chip/interaction_model/__init__.py b/src/controller/python/chip/interaction_model/__init__.py index ec100846b085a5..39ade4e2f7f467 100644 --- a/src/controller/python/chip/interaction_model/__init__.py +++ b/src/controller/python/chip/interaction_model/__init__.py @@ -73,6 +73,7 @@ class Status(enum.IntEnum): Reserved99 = 0x99 Reserved9a = 0x9a Busy = 0x9c + AccessRestricted = 0x9d Deprecatedc0 = 0xc0 Deprecatedc1 = 0xc1 Deprecatedc2 = 0xc2 diff --git a/src/controller/python/chip/yaml/runner.py b/src/controller/python/chip/yaml/runner.py index 8a19109439e3cf..44318f8cbedf89 100644 --- a/src/controller/python/chip/yaml/runner.py +++ b/src/controller/python/chip/yaml/runner.py @@ -650,7 +650,7 @@ def __init__(self, test_step): if test_step.command == 'GetCommissionerNodeId': # Just setting the self._command is enough for run_action below. pass - elif test_step.command == 'PairWithCode': + elif test_step.command in ('PairWithCode', 'EstablishPASESession'): args = test_step.arguments['values'] request_data_as_dict = Converter.convert_list_of_name_value_pair_to_dict(args) self._setup_payload = request_data_as_dict['payload'] @@ -663,7 +663,10 @@ async def run_action(self, dev_ctrl: ChipDeviceController) -> _ActionResult: return _ActionResult(status=_ActionStatus.SUCCESS, response=_GetCommissionerNodeIdResult(dev_ctrl.nodeId)) try: - await dev_ctrl.CommissionWithCode(self._setup_payload, self._node_id) + if self._command == 'PairWithCode': + await dev_ctrl.CommissionWithCode(self._setup_payload, self._node_id) + elif self._command == 'EstablishPASESession': + await dev_ctrl.EstablishPASESession(self._setup_payload, self._node_id) return _ActionResult(status=_ActionStatus.SUCCESS, response=None) except ChipStackError: return _ActionResult(status=_ActionStatus.ERROR, response=None) diff --git a/src/controller/python/test/test_scripts/cluster_objects.py b/src/controller/python/test/test_scripts/cluster_objects.py index 37f6819cbe66a4..10c2ad2e268c30 100644 --- a/src/controller/python/test/test_scripts/cluster_objects.py +++ b/src/controller/python/test/test_scripts/cluster_objects.py @@ -38,6 +38,8 @@ Clusters.Objects.UnitTesting.Attributes.GeneralErrorBoolean), (1, Clusters.Objects.UnitTesting, Clusters.Objects.UnitTesting.Attributes.ClusterErrorBoolean), + (1, Clusters.Objects.UnitTesting, + Clusters.Objects.UnitTesting.Attributes.FailureInt32U), ] diff --git a/src/credentials/FabricTable.cpp b/src/credentials/FabricTable.cpp index b847addbe10773..f999cf7a4f9a9d 100644 --- a/src/credentials/FabricTable.cpp +++ b/src/credentials/FabricTable.cpp @@ -71,6 +71,44 @@ constexpr size_t IndexInfoTLVMaxSize() return TLV::EstimateStructOverhead(sizeof(FabricIndex), CHIP_CONFIG_MAX_FABRICS * (1 + sizeof(FabricIndex)) + 1); } +CHIP_ERROR AddNewFabricForTestInternal(FabricTable & fabricTable, bool leavePending, const ByteSpan & rootCert, + const ByteSpan & icacCert, const ByteSpan & nocCert, const ByteSpan & opKeySpan, + FabricIndex * outFabricIndex) +{ + VerifyOrReturnError(outFabricIndex != nullptr, CHIP_ERROR_INVALID_ARGUMENT); + + CHIP_ERROR err = CHIP_ERROR_INTERNAL; + + Crypto::P256Keypair injectedOpKey; + Crypto::P256SerializedKeypair injectedOpKeysSerialized; + + Crypto::P256Keypair * opKey = nullptr; + if (!opKeySpan.empty()) + { + VerifyOrReturnError(opKeySpan.size() == injectedOpKeysSerialized.Capacity(), CHIP_ERROR_INVALID_ARGUMENT); + + memcpy(injectedOpKeysSerialized.Bytes(), opKeySpan.data(), opKeySpan.size()); + SuccessOrExit(err = injectedOpKeysSerialized.SetLength(opKeySpan.size())); + SuccessOrExit(err = injectedOpKey.Deserialize(injectedOpKeysSerialized)); + opKey = &injectedOpKey; + } + + SuccessOrExit(err = fabricTable.AddNewPendingTrustedRootCert(rootCert)); + SuccessOrExit(err = + fabricTable.AddNewPendingFabricWithProvidedOpKey(nocCert, icacCert, VendorId::TestVendor1, opKey, + /*isExistingOpKeyExternallyOwned =*/false, outFabricIndex)); + if (!leavePending) + { + SuccessOrExit(err = fabricTable.CommitPendingFabricData()); + } +exit: + if (err != CHIP_NO_ERROR) + { + fabricTable.RevertPendingFabricData(); + } + return err; +} + } // anonymous namespace CHIP_ERROR FabricInfo::Init(const FabricInfo::InitParams & initParams) @@ -695,34 +733,14 @@ CHIP_ERROR FabricTable::LoadFromStorage(FabricInfo * fabric, FabricIndex newFabr CHIP_ERROR FabricTable::AddNewFabricForTest(const ByteSpan & rootCert, const ByteSpan & icacCert, const ByteSpan & nocCert, const ByteSpan & opKeySpan, FabricIndex * outFabricIndex) { - VerifyOrReturnError(outFabricIndex != nullptr, CHIP_ERROR_INVALID_ARGUMENT); - - CHIP_ERROR err = CHIP_ERROR_INTERNAL; - - Crypto::P256Keypair injectedOpKey; - Crypto::P256SerializedKeypair injectedOpKeysSerialized; - - Crypto::P256Keypair * opKey = nullptr; - if (!opKeySpan.empty()) - { - VerifyOrReturnError(opKeySpan.size() == injectedOpKeysSerialized.Capacity(), CHIP_ERROR_INVALID_ARGUMENT); - - memcpy(injectedOpKeysSerialized.Bytes(), opKeySpan.data(), opKeySpan.size()); - SuccessOrExit(err = injectedOpKeysSerialized.SetLength(opKeySpan.size())); - SuccessOrExit(err = injectedOpKey.Deserialize(injectedOpKeysSerialized)); - opKey = &injectedOpKey; - } + return AddNewFabricForTestInternal(*this, /*leavePending=*/false, rootCert, icacCert, nocCert, opKeySpan, outFabricIndex); +} - SuccessOrExit(err = AddNewPendingTrustedRootCert(rootCert)); - SuccessOrExit(err = AddNewPendingFabricWithProvidedOpKey(nocCert, icacCert, VendorId::TestVendor1, opKey, - /*isExistingOpKeyExternallyOwned =*/false, outFabricIndex)); - SuccessOrExit(err = CommitPendingFabricData()); -exit: - if (err != CHIP_NO_ERROR) - { - RevertPendingFabricData(); - } - return err; +CHIP_ERROR FabricTable::AddNewUncommittedFabricForTest(const ByteSpan & rootCert, const ByteSpan & icacCert, + const ByteSpan & nocCert, const ByteSpan & opKeySpan, + FabricIndex * outFabricIndex) +{ + return AddNewFabricForTestInternal(*this, /*leavePending=*/true, rootCert, icacCert, nocCert, opKeySpan, outFabricIndex); } /* @@ -1546,6 +1564,16 @@ bool FabricTable::SetPendingDataFabricIndex(FabricIndex fabricIndex) return isLegal; } +FabricIndex FabricTable::GetPendingNewFabricIndex() const +{ + if (mStateFlags.Has(StateFlags::kIsAddPending)) + { + return mFabricIndexWithPendingState; + } + + return kUndefinedFabricIndex; +} + CHIP_ERROR FabricTable::AllocatePendingOperationalKey(Optional fabricIndex, MutableByteSpan & outputCsr) { // We can only manage commissionable pending fail-safe state if we have a keystore diff --git a/src/credentials/FabricTable.h b/src/credentials/FabricTable.h index aef60f6a17fbbe..af90d781283963 100644 --- a/src/credentials/FabricTable.h +++ b/src/credentials/FabricTable.h @@ -736,6 +736,18 @@ class DLL_EXPORT FabricTable */ bool HasOperationalKeyForFabric(FabricIndex fabricIndex) const; + /** + * @brief If a newly-added fabric is pending, this returns its index, or kUndefinedFabricIndex if none are pending. + * + * A newly-added fabric is pending if AddNOC has been previously called successfully but the + * fabric is not yet fully committed by CommissioningComplete. + * + * NOTE: that this never returns a value other than kUndefinedFabricIndex when UpdateNOC is pending. + * + * @return the fabric index of the pending fabric, or kUndefinedFabricIndex if no fabrics are pending. + */ + FabricIndex GetPendingNewFabricIndex() const; + /** * @brief Returns the operational keystore. This is used for * CASE and the only way the keystore should be used. @@ -968,6 +980,11 @@ class DLL_EXPORT FabricTable CHIP_ERROR AddNewFabricForTest(const ByteSpan & rootCert, const ByteSpan & icacCert, const ByteSpan & nocCert, const ByteSpan & opKeySpan, FabricIndex * outFabricIndex); + // Add a new fabric for testing. The Operational Key is a raw P256Keypair (public key and private key raw bits) that will + // get copied (directly) into the fabric table. The fabric will NOT be committed, and will remain pending. + CHIP_ERROR AddNewUncommittedFabricForTest(const ByteSpan & rootCert, const ByteSpan & icacCert, const ByteSpan & nocCert, + const ByteSpan & opKeySpan, FabricIndex * outFabricIndex); + // Same as AddNewFabricForTest, but ignore if we are colliding with same , so // that a single fabric table can have N nodes for same fabric. This usually works, but is bad form. CHIP_ERROR AddNewFabricForTestIgnoringCollisions(const ByteSpan & rootCert, const ByteSpan & icacCert, const ByteSpan & nocCert, diff --git a/src/credentials/tests/BUILD.gn b/src/credentials/tests/BUILD.gn index 393b246ef20ee3..46e1f724349102 100644 --- a/src/credentials/tests/BUILD.gn +++ b/src/credentials/tests/BUILD.gn @@ -84,3 +84,13 @@ if (enable_fuzz_test_targets) { ] } } + +if (pw_enable_fuzz_test_targets) { + chip_pw_fuzz_target("fuzz-chip-cert-pw") { + test_source = [ "FuzzChipCertPW.cpp" ] + public_deps = [ + "${chip_root}/src/credentials", + "${chip_root}/src/platform/logging:default", + ] + } +} diff --git a/src/credentials/tests/FuzzChipCertPW.cpp b/src/credentials/tests/FuzzChipCertPW.cpp new file mode 100644 index 00000000000000..bb929b392500d7 --- /dev/null +++ b/src/credentials/tests/FuzzChipCertPW.cpp @@ -0,0 +1,95 @@ +#include +#include + +#include +#include + +#include "credentials/CHIPCert.h" + +namespace { + +using namespace chip; +using namespace chip::Credentials; + +using namespace fuzztest; + +void ChipCertFuzzer(const std::vector & bytes) +{ + ByteSpan span(bytes.data(), bytes.size()); + + { + NodeId nodeId; + FabricId fabricId; + (void) ExtractFabricIdFromCert(span, &fabricId); + (void) ExtractNodeIdFabricIdFromOpCert(span, &nodeId, &fabricId); + } + + { + CATValues cats; + (void) ExtractCATsFromOpCert(span, cats); + } + + { + Credentials::P256PublicKeySpan key; + (void) ExtractPublicKeyFromChipCert(span, key); + } + + { + chip::System::Clock::Seconds32 rcacNotBefore; + (void) ExtractNotBeforeFromChipCert(span, rcacNotBefore); + } + + { + Credentials::CertificateKeyId skid; + (void) ExtractSKIDFromChipCert(span, skid); + } + + { + ChipDN subjectDN; + (void) ExtractSubjectDNFromChipCert(span, subjectDN); + } + + { + uint8_t outCertBuf[kMaxDERCertLength]; + MutableByteSpan outCert(outCertBuf); + (void) ConvertChipCertToX509Cert(span, outCert); + } + + { + // TODO: #35369 Move this to a Fixture once Errors related to FuzzTest Fixtures are resolved + ASSERT_EQ(chip::Platform::MemoryInit(), CHIP_NO_ERROR); + ValidateChipRCAC(span); + chip::Platform::MemoryShutdown(); + } +} + +FUZZ_TEST(FuzzChipCert, ChipCertFuzzer).WithDomains(Arbitrary>()); + +// The Property function for DecodeChipCertFuzzer, The FUZZ_TEST Macro will call this function. +void DecodeChipCertFuzzer(const std::vector & bytes, BitFlags aDecodeFlag) +{ + ByteSpan span(bytes.data(), bytes.size()); + + // TODO: #34352 To Move this to a Fixture once Errors related to FuzzTest Fixtures are resolved + ASSERT_EQ(chip::Platform::MemoryInit(), CHIP_NO_ERROR); + + ChipCertificateData certData; + (void) DecodeChipCert(span, certData, aDecodeFlag); + + chip::Platform::MemoryShutdown(); +} + +// This function allows us to fuzz using one of three CertDecodeFlags flags; by using FuzzTests's `ElementOf` API, we define an +// input domain by explicitly enumerating the set of values in it More Info: +// https://github.com/google/fuzztest/blob/main/doc/domains-reference.md#elementof-domains-element-of +auto AnyCertDecodeFlag() +{ + constexpr BitFlags NullDecodeFlag; + constexpr BitFlags GenTBSHashFlag(CertDecodeFlags::kGenerateTBSHash); + constexpr BitFlags TrustAnchorFlag(CertDecodeFlags::kIsTrustAnchor); + + return ElementOf({ NullDecodeFlag, GenTBSHashFlag, TrustAnchorFlag }); +} + +FUZZ_TEST(FuzzChipCert, DecodeChipCertFuzzer).WithDomains(Arbitrary>(), AnyCertDecodeFlag()); +} // namespace diff --git a/src/credentials/tests/TestFabricTable.cpp b/src/credentials/tests/TestFabricTable.cpp index c5b78fc13e5b4f..0d34f48bce6599 100644 --- a/src/credentials/tests/TestFabricTable.cpp +++ b/src/credentials/tests/TestFabricTable.cpp @@ -551,6 +551,7 @@ TEST_F(TestFabricTable, TestBasicAddNocUpdateNocFlow) FabricTable & fabricTable = fabricTableHolder.GetFabricTable(); EXPECT_EQ(fabricTable.FabricCount(), 0); + EXPECT_EQ(fabricTable.GetPendingNewFabricIndex(), kUndefinedFabricIndex); { FabricIndex nextFabricIndex = kUndefinedFabricIndex; @@ -604,6 +605,7 @@ TEST_F(TestFabricTable, TestBasicAddNocUpdateNocFlow) EXPECT_EQ(fabricTable.FetchPendingNonFabricAssociatedRootCert(fetchedSpan), CHIP_NO_ERROR); EXPECT_TRUE(fetchedSpan.data_equal(rcac)); } + EXPECT_EQ(fabricTable.GetPendingNewFabricIndex(), kUndefinedFabricIndex); FabricIndex newFabricIndex = kUndefinedFabricIndex; bool keyIsExternallyOwned = true; @@ -614,6 +616,11 @@ TEST_F(TestFabricTable, TestBasicAddNocUpdateNocFlow) CHIP_NO_ERROR); EXPECT_EQ(newFabricIndex, 1); EXPECT_EQ(fabricTable.FabricCount(), 1); + + // After adding the pending new fabric (equivalent of AddNOC processing), the new + // fabric must be pending. + EXPECT_EQ(fabricTable.GetPendingNewFabricIndex(), 1); + { // No more pending root cert; it's associated with a fabric now. MutableByteSpan fetchedSpan{ rcacBuf }; @@ -661,6 +668,9 @@ TEST_F(TestFabricTable, TestBasicAddNocUpdateNocFlow) EXPECT_EQ(nextFabricIndex, 2); } + // Fabric can't be pending anymore. + EXPECT_EQ(fabricTable.GetPendingNewFabricIndex(), kUndefinedFabricIndex); + // Validate contents const auto * fabricInfo = fabricTable.FindFabricWithIndex(1); ASSERT_NE(fabricInfo, nullptr); @@ -732,12 +742,16 @@ TEST_F(TestFabricTable, TestBasicAddNocUpdateNocFlow) } EXPECT_EQ(fabricTable.AddNewPendingTrustedRootCert(rcac), CHIP_NO_ERROR); + EXPECT_EQ(fabricTable.GetPendingNewFabricIndex(), kUndefinedFabricIndex); + FabricIndex newFabricIndex = kUndefinedFabricIndex; EXPECT_EQ(fabricTable.FabricCount(), 1); EXPECT_EQ(fabricTable.AddNewPendingFabricWithOperationalKeystore(noc, icac, kVendorId, &newFabricIndex), CHIP_NO_ERROR); EXPECT_EQ(fabricTable.FabricCount(), 2); EXPECT_EQ(newFabricIndex, 2); + EXPECT_EQ(fabricTable.GetPendingNewFabricIndex(), 2); + // No storage yet EXPECT_EQ(storage.GetNumKeys(), numStorageAfterFirstAdd); // Next fabric index has not been updated yet. @@ -1897,6 +1911,8 @@ TEST_F(TestFabricTable, TestUpdateNocFailSafe) uint8_t csrBuf[chip::Crypto::kMIN_CSR_Buffer_Size]; MutableByteSpan csrSpan{ csrBuf }; + EXPECT_EQ(fabricTable.GetPendingNewFabricIndex(), kUndefinedFabricIndex); + // Make sure to tag fabric index to pending opkey: otherwise the UpdateNOC fails EXPECT_EQ(fabricTable.AllocatePendingOperationalKey(chip::MakeOptional(static_cast(1)), csrSpan), CHIP_NO_ERROR); @@ -1908,6 +1924,7 @@ TEST_F(TestFabricTable, TestUpdateNocFailSafe) EXPECT_EQ(fabricTable.FabricCount(), 1); EXPECT_EQ(fabricTable.UpdatePendingFabricWithOperationalKeystore(1, noc, ByteSpan{}), CHIP_NO_ERROR); + EXPECT_EQ(fabricTable.GetPendingNewFabricIndex(), kUndefinedFabricIndex); EXPECT_EQ(fabricTable.FabricCount(), 1); // No storage yet @@ -1936,6 +1953,7 @@ TEST_F(TestFabricTable, TestUpdateNocFailSafe) // Revert, should see Node ID 999 again fabricTable.RevertPendingFabricData(); EXPECT_EQ(fabricTable.FabricCount(), 1); + EXPECT_EQ(fabricTable.GetPendingNewFabricIndex(), kUndefinedFabricIndex); EXPECT_EQ(storage.GetNumKeys(), numStorageAfterAdd); diff --git a/src/darwin/Framework/CHIP/MTRCommissionableBrowser.mm b/src/darwin/Framework/CHIP/MTRCommissionableBrowser.mm index 276fb5e3460682..8a111a6a019bdb 100644 --- a/src/darwin/Framework/CHIP/MTRCommissionableBrowser.mm +++ b/src/darwin/Framework/CHIP/MTRCommissionableBrowser.mm @@ -268,9 +268,14 @@ void OnBrowseRemove(DnssdService service) override // If there is nothing else to resolve for the given instance name, just remove it // too and informs the delegate that it is gone. if ([interfaces count] == 0) { - dispatch_async(mDispatchQueue, ^{ - [mDelegate controller:mController didRemoveCommissionableDevice:result]; - }); + // If result.instanceName is nil, that means we never notified our + // delegate about this result (because we did not get that far in + // resolving it), so don't bother notifying about the removal either. + if (result.instanceName != nil) { + dispatch_async(mDispatchQueue, ^{ + [mDelegate controller:mController didRemoveCommissionableDevice:result]; + }); + } mDiscoveredResults[key] = nil; } @@ -325,7 +330,7 @@ void OnBleScanRemove(BLE_CONNECTION_OBJECT connObj) override MATTER_LOG_METRIC(kMetricBLEDevicesRemoved, ++mBLEDevicesRemoved); dispatch_async(mDispatchQueue, ^{ - [mDelegate controller:mController didFindCommissionableDevice:result]; + [mDelegate controller:mController didRemoveCommissionableDevice:result]; }); } diff --git a/src/darwin/Framework/CHIP/MTRDefines_Internal.h b/src/darwin/Framework/CHIP/MTRDefines_Internal.h index 7894f31835a142..94a1cbb3da61f4 100644 --- a/src/darwin/Framework/CHIP/MTRDefines_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDefines_Internal.h @@ -111,3 +111,46 @@ typedef struct {} variable_hidden_by_mtr_hide; \ return outValue; \ } + +#ifndef MTR_OPTIONAL_ATTRIBUTE +#if __has_feature(objc_arc) +#define MTR_OPTIONAL_ATTRIBUTE(ATTRIBUTE, VALUE, DICTIONARY) \ + { \ + id valueToAdd = VALUE; \ + if (valueToAdd != nil) { \ + CFDictionarySetValue((CFMutableDictionaryRef) DICTIONARY, (CFStringRef) (__bridge const void *) ATTRIBUTE, (const void *) valueToAdd); \ + } \ + } +#else +#define MTR_OPTIONAL_ATTRIBUTE(ATTRIBUTE, VALUE, DICTIONARY) \ + { \ + id valueToAdd = VALUE; \ + if (valueToAdd != nil) { \ + CFDictionarySetValue((CFMutableDictionaryRef) DICTIONARY, (CFStringRef) (const void *) ATTRIBUTE, (const void *) valueToAdd); \ + } \ + } +#endif +#endif + +#ifndef MTR_REMOVE_ATTRIBUTE +#define MTR_REMOVE_ATTRIBUTE(ATTRIBUTE, DICTIONARY) \ + if (ATTRIBUTE != nil && DICTIONARY) { \ + CFDictionaryRemoveValue((CFMutableDictionaryRef) DICTIONARY, (CFStringRef) ATTRIBUTE); \ + } +#endif + +#ifndef MTR_REQUIRED_ATTRIBUTE +#define MTR_REQUIRED_ATTRIBUTE(ATTRIBUTE, VALUE, DICTIONARY) \ + { \ + id valueToAdd = VALUE; \ + if (valueToAdd != nil) { \ + CFDictionarySetValue((CFMutableDictionaryRef) DICTIONARY, (CFStringRef) ATTRIBUTE, (const void *) valueToAdd); \ + } else { \ + MTR_LOG_ERROR("Warning, missing %@ to add to %s", ATTRIBUTE, #DICTIONARY); \ + } \ + } +#endif + +#ifndef YES_NO +#define YES_NO(x) ((x) ? @"YES" : @"NO") +#endif diff --git a/src/darwin/Framework/CHIP/MTRDevice.h b/src/darwin/Framework/CHIP/MTRDevice.h index 1c31cbc26a661b..2858ae56924af9 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.h +++ b/src/darwin/Framework/CHIP/MTRDevice.h @@ -37,13 +37,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) + (instancetype)new NS_UNAVAILABLE; /** - * TODO: Document usage better + * Get an MTRDevice object representing a device with a specific node ID + * associated with a specific controller. * - * Directly instantiate a MTRDevice with a MTRDeviceController as a shim. - * - * All device-specific information would be stored on the device controller, and - * retrieved when performing actions using a combination of MTRBaseDevice - * and MTRAsyncCallbackQueue. + * MTRDevice objects are stateful, and callers should hold on to the MTRDevice + * while they are using it. */ + (MTRDevice *)deviceWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -290,90 +288,6 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) completion:(MTRDeviceOpenCommissioningWindowHandler)completion MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); -/** - * - * This set of functions allows clients to store metadata for either an entire device or for a specific endpoint. - * - * Notes: - * • Client data will be removed automatically when devices are deleted from the fabric - * • Supported client data object types are currently only: - * NSData, NSString, NSArray, NSDictionary, NSNumber - */ - -/** - * - * List of all client data types supported - * - */ -- (NSArray *)supportedClientDataClasses MTR_UNSTABLE_API; - -/** - * - * List of all client data keys stored - * - */ -- (NSArray * _Nullable)clientDataKeys MTR_UNSTABLE_API; - -/** - * - * Retrieve client metadata for a key, returns nil if no value is set - * - * @param key NSString * for the key to store the value as - */ -- (id _Nullable)clientDataForKey:(NSString *)key MTR_UNSTABLE_API; - -/** - * - * Set client metadata for a key. The value must conform to NSSecureCoding - * - * @param key NSString * for the key to store the value as - * @param value id for the value to store - */ -- (void)setClientDataForKey:(NSString *)key value:(id)value MTR_UNSTABLE_API; - -/** - * - * Remove client metadata for a key. - * - * @param key NSString * for the key to store the value as - */ -- (void)removeClientDataForKey:(NSString *)key MTR_UNSTABLE_API; - -/** - * - * List of all client data keys stored - * - */ -- (NSArray * _Nullable)clientDataKeysForEndpointID:(NSNumber *)endpointID MTR_UNSTABLE_API; - -/** - * - * Retrieve client metadata for a key, returns nil if no value is set - * - * @param key NSString * for the key to store the value as - * @param endpointID NSNumber * for the endpoint to associate the metadata with - */ -- (id _Nullable)clientDataForKey:(NSString *)key endpointID:(NSNumber *)endpointID MTR_UNSTABLE_API; - -/** - * - * Set client metadata for a key. The value must conform to NSSecureCoding. - * - * @param key NSString * for the key to store the value as. - * @param endpointID NSNumber * for the endpoint to associate the metadata with - * @param value id for the value to store - */ -- (void)setClientDataForKey:(NSString *)key endpointID:(NSNumber *)endpointID value:(id)value MTR_UNSTABLE_API; - -/** - * - * Remove client metadata for a key. - * - * @param key NSString * for the key to store the value as - * @param endpointID NSNumber * for the endpoint to associate the metadata with - */ -- (void)removeClientDataForKey:(NSString *)key endpointID:(NSNumber *)endpointID MTR_UNSTABLE_API; - /** * Download log of the desired type from the device. * diff --git a/src/darwin/Framework/CHIP/MTRDevice.mm b/src/darwin/Framework/CHIP/MTRDevice.mm index f913f29388f5fb..ddc47965f9c8b1 100644 --- a/src/darwin/Framework/CHIP/MTRDevice.mm +++ b/src/darwin/Framework/CHIP/MTRDevice.mm @@ -111,33 +111,6 @@ - (void)_deviceInternalStateChanged:(MTRDevice *)device; #pragma mark - MTRDevice -typedef NS_ENUM(NSUInteger, MTRDeviceExpectedValueFieldIndex) { - MTRDeviceExpectedValueFieldExpirationTimeIndex = 0, - MTRDeviceExpectedValueFieldValueIndex = 1, - MTRDeviceExpectedValueFieldIDIndex = 2 -}; - -typedef NS_ENUM(NSUInteger, MTRDeviceReadRequestFieldIndex) { - MTRDeviceReadRequestFieldPathIndex = 0, - MTRDeviceReadRequestFieldParamsIndex = 1 -}; - -typedef NS_ENUM(NSUInteger, MTRDeviceWriteRequestFieldIndex) { - MTRDeviceWriteRequestFieldPathIndex = 0, - MTRDeviceWriteRequestFieldValueIndex = 1, - MTRDeviceWriteRequestFieldTimeoutIndex = 2, - MTRDeviceWriteRequestFieldExpectedValueIDIndex = 3, -}; - -typedef NS_ENUM(NSUInteger, MTRDeviceWorkItemBatchingID) { - MTRDeviceWorkItemBatchingReadID = 1, - MTRDeviceWorkItemBatchingWriteID = 2, -}; - -typedef NS_ENUM(NSUInteger, MTRDeviceWorkItemDuplicateTypeID) { - MTRDeviceWorkItemDuplicateReadTypeID = 1, -}; - @implementation MTRDeviceClusterData { NSMutableDictionary * _attributes; } @@ -238,20 +211,6 @@ - (BOOL)isEqual:(id)object @end -// Minimal time to wait since our last resubscribe failure before we will allow -// a read attempt to prod our subscription. -// -// TODO: Figure out a better value for this, but for now don't allow this to -// happen more often than once every 10 minutes. -#define MTRDEVICE_MIN_RESUBSCRIBE_DUE_TO_READ_INTERVAL_SECONDS (10 * 60) - -// Weight of new data in determining subscription latencies. To avoid random -// outliers causing too much noise in the value, treat an existing value (if -// any) as having 2/3 weight and the new value as having 1/3 weight. These -// weights are subject to change, if it's determined that different ones give -// better behavior. -#define MTRDEVICE_SUBSCRIPTION_LATENCY_NEW_VALUE_WEIGHT (1.0 / 3.0) - @interface MTRDevice () // protects against concurrent time updates by guarding timeUpdateScheduled flag which manages time updates scheduling, // and protects device calls to setUTCTime and setDSTOffset. This can't just be replaced with "lock", because the time @@ -260,9 +219,6 @@ @interface MTRDevice () @property (nonatomic, readonly) os_unfair_lock timeSyncLock; @property (nonatomic) chip::FabricIndex fabricIndex; -@property (nonatomic) NSMutableArray *> * unreportedEvents; -@property (nonatomic) BOOL receivingReport; -@property (nonatomic) BOOL receivingPrimingReport; // TODO: instead of all the BOOL properties that are some facet of the state, move to internal state machine that has (at least): // Actively receiving report @@ -270,25 +226,8 @@ @interface MTRDevice () @property (nonatomic) MTRInternalDeviceState internalDeviceState; -#define MTRDEVICE_SUBSCRIPTION_ATTEMPT_MIN_WAIT_SECONDS (1) -#define MTRDEVICE_SUBSCRIPTION_ATTEMPT_MAX_WAIT_SECONDS (3600) -@property (nonatomic) uint32_t lastSubscriptionAttemptWait; - -// Expected value cache is attributePath => NSArray of [NSDate of expiration time, NSDictionary of value, expected value ID] -// - See MTRDeviceExpectedValueFieldIndex for the definitions of indices into this array. -// See MTRDeviceResponseHandler definition for value dictionary details. -@property (nonatomic) NSMutableDictionary * expectedValueCache; - -// This is a monotonically increasing value used when adding entries to expectedValueCache -// Currently used/updated only in _getAttributesToReportWithNewExpectedValues:expirationTime:expectedValueID: -@property (nonatomic) uint64_t expectedValueNextID; - -@property (nonatomic) BOOL expirationCheckScheduled; - @property (nonatomic) BOOL timeUpdateScheduled; -@property (nonatomic) NSDate * estimatedStartTimeFromGeneralDiagnosticsUpTime; - @property (nonatomic) NSMutableDictionary * temporaryMetaDataCache; @end @@ -327,10 +266,6 @@ @implementation MTRDevice { // right now (because they have been evicted). NSMutableSet * _persistedClusters; - // This boolean keeps track of any device configuration changes received in an attribute report. - // If this is true when the report ends, we notify the delegate. - BOOL _deviceConfigurationChanged; - // Storage behavior configuration and variables to keep track of the logic // _clusterDataPersistenceFirstScheduledTime is used to track the start time of the delay between // report and persistence. @@ -371,6 +306,8 @@ - (instancetype)initForSubclassesWithNodeID:(NSNumber *)nodeID controller:(MTRDe _delegates = [NSMutableSet set]; _deviceController = controller; _nodeID = nodeID; + _accessedViaPublicAPI = NO; + _state = MTRDeviceStateUnknown; } return self; @@ -385,9 +322,9 @@ - (instancetype)initWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceControlle _nodeID = [nodeID copy]; _fabricIndex = controller.fabricIndex; _deviceController = controller; + _accessedViaPublicAPI = NO; _queue = dispatch_queue_create("org.csa-iot.matter.framework.device.workqueue", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - _expectedValueCache = [NSMutableDictionary dictionary]; _asyncWorkQueue = [[MTRAsyncWorkQueue alloc] initWithContext:self]; _state = MTRDeviceStateUnknown; _internalDeviceState = MTRInternalDeviceStateUnsubscribed; @@ -425,11 +362,21 @@ - (void)dealloc MTR_LOG("MTRDevice dealloc: %p", self); } -+ (MTRDevice *)deviceWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller ++ (MTRDevice *)_deviceWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller { return [controller deviceForNodeID:nodeID]; } ++ (MTRDevice *)deviceWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller +{ + auto * device = [self _deviceWithNodeID:nodeID controller:controller]; + if (device) { + std::lock_guard lock(device->_lock); + device->_accessedViaPublicAPI = YES; + } + return device; +} + #pragma mark - Time Synchronization - (void)_setTimeOnDevice @@ -701,8 +648,9 @@ - (void)_addDelegate:(id)delegate queue:(dispatch_queue_t)que - (void)_delegateAdded { - // Nothing to do; this is a hook for subclasses. If that ever changes for - // some reason, subclasses need to start calling this hook on their super. + os_unfair_lock_assert_owner(&self->_lock); + + // Nothing to do for now. At the moment this is a hook for subclasses. } - (void)removeDelegate:(id)delegate @@ -820,41 +768,6 @@ - (void)_callFirstDelegateSynchronouslyWithBlock:(void (^)(id } #endif -- (void)_callDelegateDeviceCachePrimed -{ - os_unfair_lock_assert_owner(&self->_lock); - [self _callDelegatesWithBlock:^(id delegate) { - if ([delegate respondsToSelector:@selector(deviceCachePrimed:)]) { - [delegate deviceCachePrimed:self]; - } - }]; -} - -// assume lock is held -- (void)_changeState:(MTRDeviceState)state -{ - os_unfair_lock_assert_owner(&self->_lock); - MTRDeviceState lastState = _state; - _state = state; - if (lastState != state) { - if (state != MTRDeviceStateReachable) { - MTR_LOG("%@ reachability state change %lu => %lu, set estimated start time to nil", self, static_cast(lastState), - static_cast(state)); - _estimatedStartTime = nil; - _estimatedStartTimeFromGeneralDiagnosticsUpTime = nil; - } else { - MTR_LOG( - "%@ reachability state change %lu => %lu", self, static_cast(lastState), static_cast(state)); - } - [self _callDelegatesWithBlock:^(id delegate) { - [delegate device:self stateChanged:state]; - }]; - } else { - MTR_LOG( - "%@ Not reporting reachability state change, since no change in state %lu => %lu", self, static_cast(lastState), static_cast(state)); - } -} - #ifdef DEBUG - (MTRInternalDeviceState)_getInternalState { @@ -906,20 +819,6 @@ - (BOOL)_deviceUsesThread return (networkCommissioningClusterFeatureMapValue & MTRNetworkCommissioningFeatureThreadNetworkInterface) != 0 ? YES : NO; } -- (void)_handleReportBegin -{ - std::lock_guard lock(_lock); - - _receivingReport = YES; - if (_state != MTRDeviceStateReachable) { - [self _changeState:MTRDeviceStateReachable]; - } - - // If we currently don't have an established subscription, this must be a - // priming report. - _receivingPrimingReport = YES; -} - - (NSDictionary *)_clusterDataToPersistSnapshot { os_unfair_lock_assert_owner(&self->_lock); @@ -1202,305 +1101,18 @@ - (void)setStorageBehaviorConfiguration:(MTRDeviceStorageBehaviorConfiguration * [self _resetStorageBehaviorState]; } -- (void)_handleReportEnd -{ - std::lock_guard lock(_lock); - _receivingReport = NO; - _receivingPrimingReport = NO; - _estimatedStartTimeFromGeneralDiagnosticsUpTime = nil; - - [self _scheduleClusterDataPersistence]; - - // After the handling of the report, if we detected a device configuration change, notify the delegate - // of the same. - if (_deviceConfigurationChanged) { - [self _callDelegatesWithBlock:^(id delegate) { - if ([delegate respondsToSelector:@selector(deviceConfigurationChanged:)]) { - [delegate deviceConfigurationChanged:self]; - } - }]; - _deviceConfigurationChanged = NO; - } - - // Do this after the _deviceConfigurationChanged check, so that we don't - // call deviceConfigurationChanged: immediately after telling our delegate - // we are now primed. - // - // TODO: Maybe we shouldn't dispatch deviceConfigurationChanged: for the - // initial priming bits? - if (!_deviceCachePrimed) { - // This is the end of the priming sequence of data reports, so we have - // all the data for the device now. - _deviceCachePrimed = YES; - [self _callDelegateDeviceCachePrimed]; - } - -// For unit testing only -#ifdef DEBUG - [self _callDelegatesWithBlock:^(id testDelegate) { - if ([testDelegate respondsToSelector:@selector(unitTestReportEndForDevice:)]) { - [testDelegate unitTestReportEndForDevice:self]; - } - }]; -#endif -} - -- (BOOL)_interestedPaths:(NSArray * _Nullable)interestedPaths includesAttributePath:(MTRAttributePath *)attributePath -{ - for (id interestedPath in interestedPaths) { - if ([interestedPath isKindOfClass:[NSNumber class]]) { - NSNumber * interestedEndpointIDNumber = interestedPath; - if ([interestedEndpointIDNumber isEqualToNumber:attributePath.endpoint]) { - return YES; - } - } else if ([interestedPath isKindOfClass:[MTRClusterPath class]]) { - MTRClusterPath * interestedClusterPath = interestedPath; - if ([interestedClusterPath.cluster isEqualToNumber:attributePath.cluster]) { - return YES; - } - } else if ([interestedPath isKindOfClass:[MTRAttributePath class]]) { - MTRAttributePath * interestedAttributePath = interestedPath; - if (([interestedAttributePath.cluster isEqualToNumber:attributePath.cluster]) && ([interestedAttributePath.attribute isEqualToNumber:attributePath.attribute])) { - return YES; - } - } - } - - return NO; -} - -// Returns filtered set of attributes using an interestedPaths array. -// Returns nil if no attribute report has a path that matches the paths in the interestedPaths array. -- (NSArray *> *)_filteredAttributes:(NSArray *> *)attributes forInterestedPaths:(NSArray * _Nullable)interestedPaths -{ - if (!interestedPaths) { - return attributes; - } - - if (!interestedPaths.count) { - return nil; - } - - NSMutableArray * filteredAttributes = nil; - for (NSDictionary * responseValue in attributes) { - MTRAttributePath * attributePath = responseValue[MTRAttributePathKey]; - if ([self _interestedPaths:interestedPaths includesAttributePath:attributePath]) { - if (!filteredAttributes) { - filteredAttributes = [NSMutableArray array]; - } - [filteredAttributes addObject:responseValue]; - } - } - - if (filteredAttributes.count && (filteredAttributes.count != attributes.count)) { - MTR_LOG("%@ filtered attribute report %lu => %lu", self, static_cast(attributes.count), static_cast(filteredAttributes.count)); - } - - return filteredAttributes; -} - -// assume lock is held -- (void)_reportAttributes:(NSArray *> *)attributes -{ - os_unfair_lock_assert_owner(&self->_lock); - if (attributes.count) { - [self _iterateDelegatesWithBlock:^(MTRDeviceDelegateInfo * delegateInfo) { - // _iterateDelegatesWithBlock calls this with an autorelease pool, and so temporary filtered attributes reports don't bloat memory - NSArray *> * filteredAttributes = [self _filteredAttributes:attributes forInterestedPaths:delegateInfo.interestedPathsForAttributes]; - if (filteredAttributes.count) { - [delegateInfo callDelegateWithBlock:^(id delegate) { - [delegate device:self receivedAttributeReport:filteredAttributes]; - }]; - } - }]; - } -} - -- (void)_handleAttributeReport:(NSArray *> *)attributeReport fromSubscription:(BOOL)isFromSubscription -{ - std::lock_guard lock(_lock); - - // _getAttributesToReportWithReportedValues will log attribute paths reported - [self _reportAttributes:[self _getAttributesToReportWithReportedValues:attributeReport fromSubscription:isFromSubscription]]; -} - #ifdef DEBUG - (void)unitTestInjectEventReport:(NSArray *> *)eventReport { - dispatch_async(self.queue, ^{ - [self _handleEventReport:eventReport]; - }); + NSAssert(NO, @"Unit test injection of reports needs to be handled by subclasses"); } - (void)unitTestInjectAttributeReport:(NSArray *> *)attributeReport fromSubscription:(BOOL)isFromSubscription { - dispatch_async(self.queue, ^{ - [self _handleReportBegin]; - [self _handleAttributeReport:attributeReport fromSubscription:isFromSubscription]; - [self _handleReportEnd]; - }); + NSAssert(NO, @"Unit test injection of reports needs to be handled by subclasses"); } #endif -- (BOOL)_interestedPaths:(NSArray * _Nullable)interestedPaths includesEventPath:(MTREventPath *)eventPath -{ - for (id interestedPath in interestedPaths) { - if ([interestedPath isKindOfClass:[NSNumber class]]) { - NSNumber * interestedEndpointIDNumber = interestedPath; - if ([interestedEndpointIDNumber isEqualToNumber:eventPath.endpoint]) { - return YES; - } - } else if ([interestedPath isKindOfClass:[MTRClusterPath class]]) { - MTRClusterPath * interestedClusterPath = interestedPath; - if ([interestedClusterPath.cluster isEqualToNumber:eventPath.cluster]) { - return YES; - } - } else if ([interestedPath isKindOfClass:[MTREventPath class]]) { - MTREventPath * interestedEventPath = interestedPath; - if (([interestedEventPath.cluster isEqualToNumber:eventPath.cluster]) && ([interestedEventPath.event isEqualToNumber:eventPath.event])) { - return YES; - } - } - } - - return NO; -} - -// Returns filtered set of events using an interestedPaths array. -// Returns nil if no event report has a path that matches the paths in the interestedPaths array. -- (NSArray *> *)_filteredEvents:(NSArray *> *)events forInterestedPaths:(NSArray * _Nullable)interestedPaths -{ - if (!interestedPaths) { - return events; - } - - if (!interestedPaths.count) { - return nil; - } - - NSMutableArray * filteredEvents = nil; - for (NSDictionary * responseValue in events) { - MTREventPath * eventPath = responseValue[MTREventPathKey]; - if ([self _interestedPaths:interestedPaths includesEventPath:eventPath]) { - if (!filteredEvents) { - filteredEvents = [NSMutableArray array]; - } - [filteredEvents addObject:responseValue]; - } - } - - if (filteredEvents.count && (filteredEvents.count != events.count)) { - MTR_LOG("%@ filtered event report %lu => %lu", self, static_cast(events.count), static_cast(filteredEvents.count)); - } - - return filteredEvents; -} - -- (void)_handleEventReport:(NSArray *> *)eventReport -{ - std::lock_guard lock(_lock); - - NSDate * oldEstimatedStartTime = _estimatedStartTime; - // Combine with previous unreported events, if they exist - NSMutableArray * reportToReturn; - if (_unreportedEvents) { - reportToReturn = _unreportedEvents; - } else { - reportToReturn = [NSMutableArray array]; - } - for (NSDictionary * eventDict in eventReport) { - // Whenever a StartUp event is received, reset the estimated start time - // New subscription case - // - Starts Unreachable - // - Start CASE and send subscription request - // - Receive priming report ReportBegin - // - Optionally receive UpTime attribute - update time and save start time estimate - // - Optionally receive StartUp event - // - Set estimated system time from event receipt time, or saved UpTime estimate if exists - // - ReportEnd handler clears the saved start time estimate based on UpTime - // Subscription dropped from client point of view case - // - Starts Unreachable - // - Resubscribe happens after some time, and then same as the above - // Server resuming subscription after reboot case - // - Starts Reachable - // - Receive priming report ReportBegin - // - Optionally receive UpTime attribute - update time and save value - // - Optionally receive StartUp event - // - Set estimated system time from event receipt time, or saved UpTime estimate if exists - // - ReportEnd handler clears the saved start time estimate based on UpTime - // Server resuming subscription after timeout case - // - Starts Reachable - // - Receive priming report ReportBegin - // - Optionally receive UpTime attribute - update time and save value - // - ReportEnd handler clears the saved start time estimate based on UpTime - MTREventPath * eventPath = eventDict[MTREventPathKey]; - BOOL isStartUpEvent = (eventPath.cluster.unsignedLongValue == MTRClusterIDTypeBasicInformationID) - && (eventPath.event.unsignedLongValue == MTREventIDTypeClusterBasicInformationEventStartUpID); - if (isStartUpEvent) { - if (_estimatedStartTimeFromGeneralDiagnosticsUpTime) { - // If UpTime was received, make use of it as mark of system start time - MTR_LOG("%@ StartUp event: set estimated start time forward to %@", self, - _estimatedStartTimeFromGeneralDiagnosticsUpTime); - _estimatedStartTime = _estimatedStartTimeFromGeneralDiagnosticsUpTime; - } else { - // If UpTime was not received, reset estimated start time in case of reboot - MTR_LOG("%@ StartUp event: set estimated start time to nil", self); - _estimatedStartTime = nil; - } - } - - // If event time is of MTREventTimeTypeSystemUpTime type, then update estimated start time as needed - NSNumber * eventTimeTypeNumber = eventDict[MTREventTimeTypeKey]; - if (!eventTimeTypeNumber) { - MTR_LOG_ERROR("%@ Event %@ missing event time type", self, eventDict); - continue; - } - MTREventTimeType eventTimeType = (MTREventTimeType) eventTimeTypeNumber.unsignedIntegerValue; - if (eventTimeType == MTREventTimeTypeSystemUpTime) { - NSNumber * eventTimeValueNumber = eventDict[MTREventSystemUpTimeKey]; - if (!eventTimeValueNumber) { - MTR_LOG_ERROR("%@ Event %@ missing event time value", self, eventDict); - continue; - } - NSTimeInterval eventTimeValue = eventTimeValueNumber.doubleValue; - NSDate * potentialSystemStartTime = [NSDate dateWithTimeIntervalSinceNow:-eventTimeValue]; - if (!_estimatedStartTime || ([potentialSystemStartTime compare:_estimatedStartTime] == NSOrderedAscending)) { - _estimatedStartTime = potentialSystemStartTime; - } - } - - NSMutableDictionary * eventToReturn = eventDict.mutableCopy; - if (_receivingPrimingReport) { - eventToReturn[MTREventIsHistoricalKey] = @(YES); - } else { - eventToReturn[MTREventIsHistoricalKey] = @(NO); - } - - [reportToReturn addObject:eventToReturn]; - } - if (oldEstimatedStartTime != _estimatedStartTime) { - MTR_LOG("%@ updated estimated start time to %@", self, _estimatedStartTime); - } - - __block BOOL delegatesCalled = NO; - [self _iterateDelegatesWithBlock:^(MTRDeviceDelegateInfo * delegateInfo) { - // _iterateDelegatesWithBlock calls this with an autorelease pool, and so temporary filtered event reports don't bloat memory - NSArray *> * filteredEvents = [self _filteredEvents:reportToReturn forInterestedPaths:delegateInfo.interestedPathsForEvents]; - if (filteredEvents.count) { - [delegateInfo callDelegateWithBlock:^(id delegate) { - [delegate device:self receivedEventReport:filteredEvents]; - }]; - delegatesCalled = YES; - } - }]; - if (delegatesCalled) { - _unreportedEvents = nil; - } else { - // save unreported events - _unreportedEvents = reportToReturn; - } -} - #ifdef DEBUG - (void)unitTestClearClusterData { @@ -1614,63 +1226,6 @@ - (MTRDeviceDataValueDictionary _Nullable)_cachedAttributeValueForPath:(MTRAttri return clusterData.attributes[path.attribute]; } -- (void)_setCachedAttributeValue:(MTRDeviceDataValueDictionary _Nullable)value forPath:(MTRAttributePath *)path fromSubscription:(BOOL)isFromSubscription -{ - os_unfair_lock_assert_owner(&self->_lock); - - // We need an actual MTRClusterPath, not a subclass, to do _clusterDataForPath. - auto * clusterPath = [MTRClusterPath clusterPathWithEndpointID:path.endpoint clusterID:path.cluster]; - - MTRDeviceClusterData * clusterData = [self _clusterDataForPath:clusterPath]; - if (clusterData == nil) { - if (value == nil) { - // Nothing to do. - return; - } - - clusterData = [[MTRDeviceClusterData alloc] init]; - } - - [clusterData storeValue:value forAttribute:path.attribute]; - - if ([self _attributePathAffectsDescriptionData:path]) { - [self _updateAttributeDependentDescriptionData]; - } - - if (value != nil - && isFromSubscription - && !_receivingPrimingReport - && AttributeHasChangesOmittedQuality(path)) { - // Do not persist new values for Changes Omitted Quality (aka C Quality) - // attributes unless they're part of a Priming Report or from a read response. - // (removals are OK) - - // log when a device violates expectations for Changes Omitted Quality attributes. - using namespace chip::Tracing::DarwinFramework; - MATTER_LOG_METRIC_BEGIN(kMetricUnexpectedCQualityUpdate); - [self _addInformationalAttributesToCurrentMetricScope]; - MATTER_LOG_METRIC_END(kMetricUnexpectedCQualityUpdate); - - return; - } - - if (_clusterDataToPersist == nil) { - _clusterDataToPersist = [NSMutableDictionary dictionary]; - } - _clusterDataToPersist[clusterPath] = clusterData; -} - -- (void)_removeCachedAttribute:(NSNumber *)attributeID fromCluster:(MTRClusterPath *)clusterPath -{ - os_unfair_lock_assert_owner(&self->_lock); - - if (_clusterDataToPersist == nil) { - return; - } - auto * clusterData = _clusterDataToPersist[clusterPath]; - [clusterData removeValueForAttribute:attributeID]; -} - #ifdef DEBUG - (void)unitTestResetSubscription { @@ -1700,132 +1255,6 @@ - (NSUInteger)unitTestNonnullDelegateCount #pragma mark Device Interactions -// Helper function to determine whether an attribute has "Changes Omitted" quality, which indicates that past the priming report in -// a subscription, this attribute is not expected to be reported when its value changes -// * TODO: xml+codegen version to replace this hardcoded list. -static BOOL AttributeHasChangesOmittedQuality(MTRAttributePath * attributePath) -{ - switch (attributePath.cluster.unsignedLongValue) { - case MTRClusterEthernetNetworkDiagnosticsID: - switch (attributePath.attribute.unsignedLongValue) { - case MTRClusterEthernetNetworkDiagnosticsAttributePacketRxCountID: - case MTRClusterEthernetNetworkDiagnosticsAttributePacketTxCountID: - case MTRClusterEthernetNetworkDiagnosticsAttributeTxErrCountID: - case MTRClusterEthernetNetworkDiagnosticsAttributeCollisionCountID: - case MTRClusterEthernetNetworkDiagnosticsAttributeOverrunCountID: - case MTRClusterEthernetNetworkDiagnosticsAttributeCarrierDetectID: - case MTRClusterEthernetNetworkDiagnosticsAttributeTimeSinceResetID: - return YES; - default: - return NO; - } - case MTRClusterGeneralDiagnosticsID: - switch (attributePath.attribute.unsignedLongValue) { - case MTRClusterGeneralDiagnosticsAttributeUpTimeID: - case MTRClusterGeneralDiagnosticsAttributeTotalOperationalHoursID: - return YES; - default: - return NO; - } - case MTRClusterThreadNetworkDiagnosticsID: - switch (attributePath.attribute.unsignedLongValue) { - case MTRClusterThreadNetworkDiagnosticsAttributeOverrunCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeDetachedRoleCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeChildRoleCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeRouterRoleCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeLeaderRoleCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeAttachAttemptCountID: - case MTRClusterThreadNetworkDiagnosticsAttributePartitionIdChangeCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeBetterPartitionAttachAttemptCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeParentChangeCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeTxTotalCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeTxUnicastCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeTxBroadcastCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeTxAckRequestedCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeTxAckedCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeTxNoAckRequestedCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeTxDataCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeTxDataPollCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeTxBeaconCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeTxBeaconRequestCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeTxOtherCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeTxRetryCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeTxDirectMaxRetryExpiryCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeTxIndirectMaxRetryExpiryCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeTxErrCcaCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeTxErrAbortCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeTxErrBusyChannelCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeRxTotalCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeRxUnicastCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeRxBroadcastCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeRxDataCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeRxDataPollCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeRxBeaconCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeRxBeaconRequestCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeRxOtherCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeRxAddressFilteredCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeRxDestAddrFilteredCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeRxDuplicatedCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeRxErrNoFrameCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeRxErrUnknownNeighborCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeRxErrInvalidSrcAddrCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeRxErrSecCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeRxErrFcsCountID: - case MTRClusterThreadNetworkDiagnosticsAttributeRxErrOtherCountID: - return YES; - default: - return NO; - } - case MTRClusterWiFiNetworkDiagnosticsID: - switch (attributePath.attribute.unsignedLongValue) { - case MTRClusterWiFiNetworkDiagnosticsAttributeRssiID: - case MTRClusterWiFiNetworkDiagnosticsAttributeBeaconLostCountID: - case MTRClusterWiFiNetworkDiagnosticsAttributeBeaconRxCountID: - case MTRClusterWiFiNetworkDiagnosticsAttributePacketMulticastRxCountID: - case MTRClusterWiFiNetworkDiagnosticsAttributePacketMulticastTxCountID: - case MTRClusterWiFiNetworkDiagnosticsAttributePacketUnicastRxCountID: - case MTRClusterWiFiNetworkDiagnosticsAttributePacketUnicastTxCountID: - case MTRClusterWiFiNetworkDiagnosticsAttributeCurrentMaxRateID: - case MTRClusterWiFiNetworkDiagnosticsAttributeOverrunCountID: - return YES; - default: - return NO; - } - case MTRClusterOperationalCredentialsID: - switch (attributePath.attribute.unsignedLongValue) { - case MTRClusterOperationalCredentialsAttributeNOCsID: - case MTRClusterOperationalCredentialsAttributeTrustedRootCertificatesID: - return YES; - default: - return NO; - } - case MTRClusterPowerSourceID: - switch (attributePath.attribute.unsignedLongValue) { - case MTRClusterPowerSourceAttributeWiredAssessedInputVoltageID: - case MTRClusterPowerSourceAttributeWiredAssessedInputFrequencyID: - case MTRClusterPowerSourceAttributeWiredAssessedCurrentID: - case MTRClusterPowerSourceAttributeBatVoltageID: - case MTRClusterPowerSourceAttributeBatPercentRemainingID: - case MTRClusterPowerSourceAttributeBatTimeRemainingID: - case MTRClusterPowerSourceAttributeBatTimeToFullChargeID: - case MTRClusterPowerSourceAttributeBatChargingCurrentID: - return YES; - default: - return NO; - } - case MTRClusterTimeSynchronizationID: - switch (attributePath.attribute.unsignedLongValue) { - case MTRClusterTimeSynchronizationAttributeUTCTimeID: - case MTRClusterTimeSynchronizationAttributeLocalTimeID: - return YES; - default: - return NO; - } - default: - return NO; - } -} - - (NSDictionary * _Nullable)readAttributeWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID attributeID:(NSNumber *)attributeID @@ -1919,90 +1348,12 @@ - (void)_invokeCommandWithEndpointID:(NSNumber *)endpointID queue:(dispatch_queue_t)queue completion:(MTRDeviceResponseHandler)completion { - if (!expectedValueInterval || ([expectedValueInterval compare:@(0)] == NSOrderedAscending)) { - expectedValues = nil; - } else { - expectedValueInterval = MTRClampedNumber(expectedValueInterval, @(1), @(UINT32_MAX)); - } - - serverSideProcessingTimeout = [serverSideProcessingTimeout copy]; - timeout = [timeout copy]; - - if (timeout == nil && MTRCommandNeedsTimedInvoke(clusterID, commandID)) { - timeout = @(MTR_DEFAULT_TIMED_INTERACTION_TIMEOUT_MS); - } - - NSDate * cutoffTime; - if (timeout) { - cutoffTime = [NSDate dateWithTimeIntervalSinceNow:(timeout.doubleValue / 1000)]; - } - - uint64_t expectedValueID = 0; - NSMutableArray * attributePaths = nil; - if (expectedValues) { - [self setExpectedValues:expectedValues expectedValueInterval:expectedValueInterval expectedValueID:&expectedValueID]; - attributePaths = [NSMutableArray array]; - for (NSDictionary * expectedValue in expectedValues) { - [attributePaths addObject:expectedValue[MTRAttributePathKey]]; - } - } - MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.queue]; - uint64_t workItemID = workItem.uniqueID; // capture only the ID, not the work item - // The command operation will install a duplicate check handler, to return NO for "isDuplicate". Since a command operation may - // change values, only read requests after this should be considered for duplicate requests. - [workItem setDuplicateTypeID:MTRDeviceWorkItemDuplicateReadTypeID handler:^(id opaqueItemData, BOOL * isDuplicate, BOOL * stop) { - *isDuplicate = NO; - *stop = YES; - }]; - [workItem setReadyHandler:^(MTRDevice * self, NSInteger retryCount, MTRAsyncWorkCompletionBlock workCompletion) { - auto workDone = ^(NSArray *> * _Nullable values, NSError * _Nullable error) { - dispatch_async(queue, ^{ - completion(values, error); - }); - if (error && expectedValues) { - [self removeExpectedValuesForAttributePaths:attributePaths expectedValueID:expectedValueID]; - } - workCompletion(MTRAsyncWorkComplete); - }; - - NSNumber * timedInvokeTimeout = nil; - if (timeout) { - auto * now = [NSDate now]; - if ([now compare:cutoffTime] == NSOrderedDescending) { - // Our timed invoke timeout has expired already. Command - // was queued for too long. Do not send it out. - workDone(nil, [MTRError errorForIMStatusCode:Status::Timeout]); - return; - } - - // Recompute the actual timeout left, accounting for time spent - // in our queuing and retries. - timedInvokeTimeout = @([cutoffTime timeIntervalSinceDate:now] * 1000); - } - MTRBaseDevice * baseDevice = [self newBaseDevice]; - [baseDevice - _invokeCommandWithEndpointID:endpointID - clusterID:clusterID - commandID:commandID - commandFields:commandFields - timedInvokeTimeout:timedInvokeTimeout - serverSideProcessingTimeout:serverSideProcessingTimeout - queue:self.queue - completion:^(NSArray *> * _Nullable values, NSError * _Nullable error) { - // Log the data at the INFO level (not usually persisted permanently), - // but make sure we log the work completion at the DEFAULT level. - MTR_LOG("Invoke work item [%llu] received command response: %@ error: %@", workItemID, values, error); - // TODO: This 5-retry cap is very arbitrary. - // TODO: Should there be some sort of backoff here? - if (error != nil && error.domain == MTRInteractionErrorDomain && error.code == MTRInteractionErrorCodeBusy && retryCount < 5) { - workCompletion(MTRAsyncWorkNeedsRetry); - return; - } - - workDone(values, error); - }]; - }]; - [_asyncWorkQueue enqueueWorkItem:workItem descriptionWithFormat:@"invoke %@ 0x%llx 0x%llx", endpointID, clusterID.unsignedLongLongValue, commandID.unsignedLongLongValue]; +#define MTRDeviceErrorStr "MTRDevice _invokeCommandWithEndpointID: must be handled by subclasses" + MTR_LOG_ERROR(MTRDeviceErrorStr); +#ifdef DEBUG + NSAssert(NO, @MTRDeviceErrorStr); +#endif // DEBUG +#undef MTRDeviceErrorStr } - (void)_invokeKnownCommandWithEndpointID:(NSNumber *)endpointID @@ -2094,93 +1445,6 @@ - (void)downloadLogOfType:(MTRDiagnosticLogType)type #pragma mark - Cache management -// assume lock is held -- (void)_checkExpiredExpectedValues -{ - os_unfair_lock_assert_owner(&self->_lock); - - // find expired attributes, and calculate next timer fire date - NSDate * now = [NSDate date]; - NSDate * nextExpirationDate = nil; - // Set of NSArray with 2 elements [path, value] - this is used in this method only - NSMutableSet * attributeInfoToRemove = [NSMutableSet set]; - for (MTRAttributePath * attributePath in _expectedValueCache) { - NSArray * expectedValue = _expectedValueCache[attributePath]; - NSDate * attributeExpirationDate = expectedValue[MTRDeviceExpectedValueFieldExpirationTimeIndex]; - if (expectedValue) { - if ([now compare:attributeExpirationDate] == NSOrderedDescending) { - // expired - save [path, values] pair to attributeToRemove - [attributeInfoToRemove addObject:@[ attributePath, expectedValue[MTRDeviceExpectedValueFieldValueIndex] ]]; - } else { - // get the next expiration date - if (!nextExpirationDate || [nextExpirationDate compare:attributeExpirationDate] == NSOrderedDescending) { - nextExpirationDate = attributeExpirationDate; - } - } - } - } - - // remove from expected value cache and report attributes as needed - NSMutableArray * attributesToReport = [NSMutableArray array]; - NSMutableArray * attributePathsToReport = [NSMutableArray array]; - for (NSArray * attributeInfo in attributeInfoToRemove) { - // compare with known value and mark for report if different - MTRAttributePath * attributePath = attributeInfo[0]; - NSDictionary * attributeDataValue = attributeInfo[1]; - NSDictionary * cachedAttributeDataValue = [self _cachedAttributeValueForPath:attributePath]; - if (cachedAttributeDataValue - && ![self _attributeDataValue:attributeDataValue isEqualToDataValue:cachedAttributeDataValue]) { - [attributesToReport addObject:@{ MTRAttributePathKey : attributePath, MTRDataKey : cachedAttributeDataValue, MTRPreviousDataKey : attributeDataValue }]; - [attributePathsToReport addObject:attributePath]; - } - - _expectedValueCache[attributePath] = nil; - } - - // log attribute paths - MTR_LOG("%@ report from expired expected values %@", self, attributePathsToReport); - [self _reportAttributes:attributesToReport]; - -// Have a reasonable minimum wait time for expiration timers -#define MTR_DEVICE_EXPIRATION_CHECK_TIMER_MINIMUM_WAIT_TIME (0.1) - - if (nextExpirationDate && _expectedValueCache.count && !self.expirationCheckScheduled) { - NSTimeInterval waitTime = [nextExpirationDate timeIntervalSinceDate:now]; - if (waitTime < MTR_DEVICE_EXPIRATION_CHECK_TIMER_MINIMUM_WAIT_TIME) { - waitTime = MTR_DEVICE_EXPIRATION_CHECK_TIMER_MINIMUM_WAIT_TIME; - } - mtr_weakify(self); - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t) (waitTime * NSEC_PER_SEC)), self.queue, ^{ - mtr_strongify(self); - [self _performScheduledExpirationCheck]; - }); - } -} - -- (void)_performScheduledExpirationCheck -{ - std::lock_guard lock(_lock); - - self.expirationCheckScheduled = NO; - [self _checkExpiredExpectedValues]; -} - -- (BOOL)_attributeDataValue:(NSDictionary *)one isEqualToDataValue:(NSDictionary *)theOther -{ - // Sanity check for nil cases - if (!one && !theOther) { - MTR_LOG_ERROR("%@ attribute data-value comparison does not expect comparing two nil dictionaries", self); - return YES; - } - if (!one || !theOther) { - // Comparing against nil is expected, and should return NO quietly - return NO; - } - - // Attribute data-value dictionaries are equal if type and value are equal, and specifically, this should return true if values are both nil - return [one[MTRTypeKey] isEqual:theOther[MTRTypeKey]] && ((one[MTRValueKey] == theOther[MTRValueKey]) || [one[MTRValueKey] isEqual:theOther[MTRValueKey]]); -} - // Utility to return data value dictionary without data version - (NSDictionary *)_dataValueWithoutDataVersion:(NSDictionary *)attributeValue { @@ -2196,302 +1460,15 @@ - (NSDictionary *)_dataValueWithoutDataVersion:(NSDictionary *)attributeValue } } -// Update cluster data version and also note the change, so at onReportEnd it can be persisted -- (void)_noteDataVersion:(NSNumber *)dataVersion forClusterPath:(MTRClusterPath *)clusterPath -{ - os_unfair_lock_assert_owner(&self->_lock); - - BOOL dataVersionChanged = NO; - // Update data version used for subscription filtering - MTRDeviceClusterData * clusterData = [self _clusterDataForPath:clusterPath]; - if (!clusterData) { - clusterData = [[MTRDeviceClusterData alloc] initWithDataVersion:dataVersion attributes:nil]; - dataVersionChanged = YES; - } else if (![clusterData.dataVersion isEqualToNumber:dataVersion]) { - clusterData.dataVersion = dataVersion; - dataVersionChanged = YES; - } - - if (dataVersionChanged) { - if (_clusterDataToPersist == nil) { - _clusterDataToPersist = [NSMutableDictionary dictionary]; - } - _clusterDataToPersist[clusterPath] = clusterData; - } -} - -- (BOOL)_attributeAffectsDeviceConfiguration:(MTRAttributePath *)attributePath -{ - // Check for attributes in the descriptor cluster that affect device configuration. - if (attributePath.cluster.unsignedLongValue == MTRClusterIDTypeDescriptorID) { - switch (attributePath.attribute.unsignedLongValue) { - case MTRAttributeIDTypeClusterDescriptorAttributePartsListID: - case MTRAttributeIDTypeClusterDescriptorAttributeServerListID: - case MTRAttributeIDTypeClusterDescriptorAttributeDeviceTypeListID: { - return YES; - } - } - } - - // Check for global attributes that affect device configuration. - switch (attributePath.attribute.unsignedLongValue) { - case MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID: - case MTRAttributeIDTypeGlobalAttributeAttributeListID: - case MTRAttributeIDTypeGlobalAttributeClusterRevisionID: - case MTRAttributeIDTypeGlobalAttributeFeatureMapID: - return YES; - } - return NO; -} - -- (void)_removeClusters:(NSSet *)clusterPathsToRemove - doRemoveFromDataStore:(BOOL)doRemoveFromDataStore -{ - os_unfair_lock_assert_owner(&self->_lock); - - [_persistedClusters minusSet:clusterPathsToRemove]; - - for (MTRClusterPath * path in clusterPathsToRemove) { - [_persistedClusterData removeObjectForKey:path]; - [_clusterDataToPersist removeObjectForKey:path]; - if (doRemoveFromDataStore) { - [self.deviceController.controllerDataStore clearStoredClusterDataForNodeID:self.nodeID endpointID:path.endpoint clusterID:path.cluster]; - } - } -} - -- (void)_removeAttributes:(NSSet *)attributes fromCluster:(MTRClusterPath *)clusterPath -{ - os_unfair_lock_assert_owner(&self->_lock); - - for (NSNumber * attribute in attributes) { - [self _removeCachedAttribute:attribute fromCluster:clusterPath]; - } - // Just clear out the NSCache entry for this cluster, so we'll load it from storage as needed. - [_persistedClusterData removeObjectForKey:clusterPath]; - [self.deviceController.controllerDataStore removeAttributes:attributes fromCluster:clusterPath forNodeID:self.nodeID]; -} - -- (void)_pruneEndpointsIn:(MTRDeviceDataValueDictionary)previousPartsListValue - missingFrom:(MTRDeviceDataValueDictionary)newPartsListValue -{ - // If the parts list changed and one or more endpoints were removed, remove all the - // clusters for all those endpoints from our data structures. - // Also remove those endpoints from the data store. - NSMutableSet * toBeRemovedEndpoints = [NSMutableSet setWithArray:[self arrayOfNumbersFromAttributeValue:previousPartsListValue]]; - NSSet * endpointsOnDevice = [NSSet setWithArray:[self arrayOfNumbersFromAttributeValue:newPartsListValue]]; - [toBeRemovedEndpoints minusSet:endpointsOnDevice]; - - for (NSNumber * endpoint in toBeRemovedEndpoints) { - NSMutableSet * clusterPathsToRemove = [[NSMutableSet alloc] init]; - for (MTRClusterPath * path in _persistedClusters) { - if ([path.endpoint isEqualToNumber:endpoint]) { - [clusterPathsToRemove addObject:path]; - } - } - [self _removeClusters:clusterPathsToRemove doRemoveFromDataStore:NO]; - [self.deviceController.controllerDataStore clearStoredClusterDataForNodeID:self.nodeID endpointID:endpoint]; - } -} - -- (void)_pruneClustersIn:(MTRDeviceDataValueDictionary)previousServerListValue - missingFrom:(MTRDeviceDataValueDictionary)newServerListValue - forEndpoint:(NSNumber *)endpointID -{ - // If the server list changed and clusters were removed, remove those clusters from our data structures. - // Also remove them from the data store. - NSMutableSet * toBeRemovedClusters = [NSMutableSet setWithArray:[self arrayOfNumbersFromAttributeValue:previousServerListValue]]; - NSSet * clustersStillOnEndpoint = [NSSet setWithArray:[self arrayOfNumbersFromAttributeValue:newServerListValue]]; - [toBeRemovedClusters minusSet:clustersStillOnEndpoint]; - - NSMutableSet * clusterPathsToRemove = [[NSMutableSet alloc] init]; - for (MTRClusterPath * path in _persistedClusters) { - if ([path.endpoint isEqualToNumber:endpointID] && [toBeRemovedClusters containsObject:path.cluster]) { - [clusterPathsToRemove addObject:path]; - } - } - [self _removeClusters:clusterPathsToRemove doRemoveFromDataStore:YES]; -} - -- (void)_pruneAttributesIn:(MTRDeviceDataValueDictionary)previousAttributeListValue - missingFrom:(MTRDeviceDataValueDictionary)newAttributeListValue - forCluster:(MTRClusterPath *)clusterPath -{ - // If the attribute list changed and attributes were removed, remove the attributes from our - // data structures. - NSMutableSet * toBeRemovedAttributes = [NSMutableSet setWithArray:[self arrayOfNumbersFromAttributeValue:previousAttributeListValue]]; - NSSet * attributesStillInCluster = [NSSet setWithArray:[self arrayOfNumbersFromAttributeValue:newAttributeListValue]]; - - [toBeRemovedAttributes minusSet:attributesStillInCluster]; - [self _removeAttributes:toBeRemovedAttributes fromCluster:clusterPath]; -} - -- (void)_pruneStoredDataForPath:(MTRAttributePath *)attributePath - missingFrom:(MTRDeviceDataValueDictionary)newAttributeDataValue -{ - os_unfair_lock_assert_owner(&self->_lock); - - if (![self _dataStoreExists] && !_clusterDataToPersist.count) { - MTR_LOG_DEBUG("%@ No data store to prune from", self); - return; - } - - // Check if parts list changed or server list changed for the descriptor cluster or the attribute list changed for a cluster. - // If yes, we might need to prune any deleted endpoints, clusters or attributes from the storage and persisted cluster data. - if (attributePath.cluster.unsignedLongValue == MTRClusterIDTypeDescriptorID) { - if (attributePath.attribute.unsignedLongValue == MTRAttributeIDTypeClusterDescriptorAttributePartsListID && [attributePath.endpoint isEqualToNumber:@(kRootEndpointId)]) { - [self _pruneEndpointsIn:[self _cachedAttributeValueForPath:attributePath] missingFrom:newAttributeDataValue]; - return; - } - - if (attributePath.attribute.unsignedLongValue == MTRAttributeIDTypeClusterDescriptorAttributeServerListID) { - [self _pruneClustersIn:[self _cachedAttributeValueForPath:attributePath] missingFrom:newAttributeDataValue forEndpoint:attributePath.endpoint]; - return; - } - } - - if (attributePath.attribute.unsignedLongValue == MTRAttributeIDTypeGlobalAttributeAttributeListID) { - [self _pruneAttributesIn:[self _cachedAttributeValueForPath:attributePath] missingFrom:newAttributeDataValue forCluster:[MTRClusterPath clusterPathWithEndpointID:attributePath.endpoint clusterID:attributePath.cluster]]; - } -} - -// assume lock is held -- (NSArray *)_getAttributesToReportWithReportedValues:(NSArray *> *)reportedAttributeValues fromSubscription:(BOOL)isFromSubscription +- (NSArray *> *)getAllAttributesReport { - os_unfair_lock_assert_owner(&self->_lock); - - NSMutableArray * attributesToReport = [NSMutableArray array]; - NSMutableArray * attributePathsToReport = [NSMutableArray array]; - for (NSDictionary * attributeResponseValue in reportedAttributeValues) { - MTRAttributePath * attributePath = attributeResponseValue[MTRAttributePathKey]; - NSDictionary * attributeDataValue = attributeResponseValue[MTRDataKey]; - NSError * attributeError = attributeResponseValue[MTRErrorKey]; - NSDictionary * previousValue; - - // sanity check either data value or error must exist - if (!attributeDataValue && !attributeError) { - MTR_LOG("%@ report %@ no data value or error: %@", self, attributePath, attributeResponseValue); - continue; - } - - // Additional signal to help mark events as being received during priming report in the event the device rebooted and we get a subscription resumption priming report without noticing it became unreachable first - if (_receivingReport && AttributeHasChangesOmittedQuality(attributePath)) { - _receivingPrimingReport = YES; - } - - // check if value is different than cache, and report if needed - BOOL shouldReportAttribute = NO; - - // if this is an error, report and purge cache - if (attributeError) { - shouldReportAttribute = YES; - previousValue = [self _cachedAttributeValueForPath:attributePath]; - MTR_LOG_ERROR("%@ report %@ error %@ purge expected value %@ read cache %@", self, attributePath, attributeError, - _expectedValueCache[attributePath], previousValue); - _expectedValueCache[attributePath] = nil; - // TODO: Is this clearing business really what we want? - [self _setCachedAttributeValue:nil forPath:attributePath fromSubscription:isFromSubscription]; - } else { - // First separate data version and restore data value to a form without data version - NSNumber * dataVersion = attributeDataValue[MTRDataVersionKey]; - MTRClusterPath * clusterPath = [MTRClusterPath clusterPathWithEndpointID:attributePath.endpoint clusterID:attributePath.cluster]; - if (dataVersion) { - // Remove data version from what we cache in memory - attributeDataValue = [self _dataValueWithoutDataVersion:attributeDataValue]; - } - - previousValue = [self _cachedAttributeValueForPath:attributePath]; -#ifdef DEBUG - __block BOOL readCacheValueChanged = ![self _attributeDataValue:attributeDataValue isEqualToDataValue:previousValue]; -#else - BOOL readCacheValueChanged = ![self _attributeDataValue:attributeDataValue isEqualToDataValue:previousValue]; -#endif - // Now that we have grabbed previousValue, update our cache with the attribute value. - if (readCacheValueChanged) { - if (dataVersion) { - [self _noteDataVersion:dataVersion forClusterPath:clusterPath]; - } - - [self _pruneStoredDataForPath:attributePath missingFrom:attributeDataValue]; - - if (!_deviceConfigurationChanged) { - _deviceConfigurationChanged = [self _attributeAffectsDeviceConfiguration:attributePath]; - if (_deviceConfigurationChanged) { - MTR_LOG("%@ device configuration changed due to changes in attribute %@", self, attributePath); - } - } - - [self _setCachedAttributeValue:attributeDataValue forPath:attributePath fromSubscription:isFromSubscription]; - } - +#define MTRDeviceErrorStr "MTRDevice getAllAttributesReport must be handled by subclasses that support it" + MTR_LOG_ERROR(MTRDeviceErrorStr); #ifdef DEBUG - // Unit test only code. - if (!readCacheValueChanged) { - [self _callFirstDelegateSynchronouslyWithBlock:^(id delegate) { - if ([delegate respondsToSelector:@selector(unitTestForceAttributeReportsIfMatchingCache:)]) { - readCacheValueChanged = [delegate unitTestForceAttributeReportsIfMatchingCache:self]; - } - }]; - } + NSAssert(NO, @MTRDeviceErrorStr); #endif // DEBUG - - NSArray * expectedValue = _expectedValueCache[attributePath]; - - // Report the attribute if a read would get a changed value. This happens - // when our cached value changes and no expected value exists. - if (readCacheValueChanged && !expectedValue) { - shouldReportAttribute = YES; - } - - if (!shouldReportAttribute) { - // If an expected value exists, the attribute will not be reported at this time. - // When the expected value interval expires, the correct value will be reported, - // if needed. - if (expectedValue) { - MTR_LOG("%@ report %@ value filtered - expected value still present", self, attributePath); - } else { - MTR_LOG("%@ report %@ value filtered - same as read cache", self, attributePath); - } - } - - // If General Diagnostics UpTime attribute, update the estimated start time as needed. - if ((attributePath.cluster.unsignedLongValue == MTRClusterGeneralDiagnosticsID) - && (attributePath.attribute.unsignedLongValue == MTRClusterGeneralDiagnosticsAttributeUpTimeID)) { - // verify that the uptime is indeed the data type we want - if ([attributeDataValue[MTRTypeKey] isEqual:MTRUnsignedIntegerValueType]) { - NSNumber * upTimeNumber = attributeDataValue[MTRValueKey]; - NSTimeInterval upTime = upTimeNumber.unsignedLongLongValue; // UpTime unit is defined as seconds in the spec - NSDate * potentialSystemStartTime = [NSDate dateWithTimeIntervalSinceNow:-upTime]; - NSDate * oldSystemStartTime = _estimatedStartTime; - if (!_estimatedStartTime || ([potentialSystemStartTime compare:_estimatedStartTime] == NSOrderedAscending)) { - MTR_LOG("%@ General Diagnostics UpTime %.3lf: estimated start time %@ => %@", self, upTime, - oldSystemStartTime, potentialSystemStartTime); - _estimatedStartTime = potentialSystemStartTime; - } - - // Save estimate in the subscription resumption case, for when StartUp event uses it - _estimatedStartTimeFromGeneralDiagnosticsUpTime = potentialSystemStartTime; - } - } - } - - if (shouldReportAttribute) { - if (previousValue) { - NSMutableDictionary * mutableAttributeResponseValue = attributeResponseValue.mutableCopy; - mutableAttributeResponseValue[MTRPreviousDataKey] = previousValue; - [attributesToReport addObject:mutableAttributeResponseValue]; - } else { - [attributesToReport addObject:attributeResponseValue]; - } - [attributePathsToReport addObject:attributePath]; - } - } - - if (attributePathsToReport.count > 0) { - MTR_LOG("%@ report from reported values %@", self, attributePathsToReport); - } - - return attributesToReport; +#undef MTRDeviceErrorStr + return nil; } #ifdef DEBUG @@ -2587,254 +1564,11 @@ - (BOOL)deviceCachePrimed return _deviceCachePrimed; } -// If value is non-nil, associate with expectedValueID -// If value is nil, remove only if expectedValueID matches -// previousValue is an out parameter -- (void)_setExpectedValue:(NSDictionary *)expectedAttributeValue - attributePath:(MTRAttributePath *)attributePath - expirationTime:(NSDate *)expirationTime - shouldReportValue:(BOOL *)shouldReportValue - attributeValueToReport:(NSDictionary **)attributeValueToReport - expectedValueID:(uint64_t)expectedValueID - previousValue:(NSDictionary **)previousValue -{ - os_unfair_lock_assert_owner(&self->_lock); - - *shouldReportValue = NO; - - NSArray * previousExpectedValue = _expectedValueCache[attributePath]; - if (previousExpectedValue) { - if (expectedAttributeValue - && ![self _attributeDataValue:expectedAttributeValue - isEqualToDataValue:previousExpectedValue[MTRDeviceExpectedValueFieldValueIndex]]) { - // Case where new expected value overrides previous expected value - report new expected value - *shouldReportValue = YES; - *attributeValueToReport = expectedAttributeValue; - *previousValue = previousExpectedValue[MTRDeviceExpectedValueFieldValueIndex]; - } else if (!expectedAttributeValue) { - // Remove previous expected value only if it's from the same setExpectedValues operation - NSNumber * previousExpectedValueID = previousExpectedValue[MTRDeviceExpectedValueFieldIDIndex]; - if (previousExpectedValueID.unsignedLongLongValue == expectedValueID) { - MTRDeviceDataValueDictionary cachedValue = [self _cachedAttributeValueForPath:attributePath]; - if (![self _attributeDataValue:previousExpectedValue[MTRDeviceExpectedValueFieldValueIndex] - isEqualToDataValue:cachedValue]) { - // Case of removing expected value that is different than read cache - report read cache value - *shouldReportValue = YES; - *attributeValueToReport = cachedValue; - *previousValue = previousExpectedValue[MTRDeviceExpectedValueFieldValueIndex]; - _expectedValueCache[attributePath] = nil; - } - } - } - } else { - MTRDeviceDataValueDictionary cachedValue = [self _cachedAttributeValueForPath:attributePath]; - if (expectedAttributeValue - && ![self _attributeDataValue:expectedAttributeValue isEqualToDataValue:cachedValue]) { - // Case where new expected value is different than read cache - report new expected value - *shouldReportValue = YES; - *attributeValueToReport = expectedAttributeValue; - *previousValue = cachedValue; - } else { - *previousValue = nil; - } - - // No need to report if new and previous expected value are both nil - } - - if (expectedAttributeValue) { - _expectedValueCache[attributePath] = @[ expirationTime, expectedAttributeValue, @(expectedValueID) ]; - } -} - -// assume lock is held -- (NSArray *)_getAttributesToReportWithNewExpectedValues:(NSArray *> *)expectedAttributeValues - expirationTime:(NSDate *)expirationTime - expectedValueID:(uint64_t *)expectedValueID -{ - os_unfair_lock_assert_owner(&self->_lock); - uint64_t expectedValueIDToReturn = _expectedValueNextID++; - - NSMutableArray * attributesToReport = [NSMutableArray array]; - NSMutableArray * attributePathsToReport = [NSMutableArray array]; - for (NSDictionary * attributeResponseValue in expectedAttributeValues) { - MTRAttributePath * attributePath = attributeResponseValue[MTRAttributePathKey]; - NSDictionary * attributeDataValue = attributeResponseValue[MTRDataKey]; - - BOOL shouldReportValue = NO; - NSDictionary * attributeValueToReport; - NSDictionary * previousValue; - [self _setExpectedValue:attributeDataValue - attributePath:attributePath - expirationTime:expirationTime - shouldReportValue:&shouldReportValue - attributeValueToReport:&attributeValueToReport - expectedValueID:expectedValueIDToReturn - previousValue:&previousValue]; - - if (shouldReportValue) { - if (previousValue) { - [attributesToReport addObject:@{ MTRAttributePathKey : attributePath, MTRDataKey : attributeValueToReport, MTRPreviousDataKey : previousValue }]; - } else { - [attributesToReport addObject:@{ MTRAttributePathKey : attributePath, MTRDataKey : attributeValueToReport }]; - } - [attributePathsToReport addObject:attributePath]; - } - } - if (expectedValueID) { - *expectedValueID = expectedValueIDToReturn; - } - - MTR_LOG("%@ report from new expected values %@", self, attributePathsToReport); - - return attributesToReport; -} - -// expectedValueID is an out-argument that returns an identifier to be used when removing expected values -- (void)setExpectedValues:(NSArray *> *)values - expectedValueInterval:(NSNumber *)expectedValueInterval - expectedValueID:(uint64_t *)expectedValueID -{ - // since NSTimeInterval is in seconds, convert ms into seconds in double - NSDate * expirationTime = [NSDate dateWithTimeIntervalSinceNow:expectedValueInterval.doubleValue / 1000]; - - MTR_LOG( - "%@ Setting expected values %@ with expiration time %f seconds from now", self, values, [expirationTime timeIntervalSinceNow]); - - std::lock_guard lock(_lock); - - // _getAttributesToReportWithNewExpectedValues will log attribute paths reported - NSArray * attributesToReport = [self _getAttributesToReportWithNewExpectedValues:values - expirationTime:expirationTime - expectedValueID:expectedValueID]; - [self _reportAttributes:attributesToReport]; - - [self _checkExpiredExpectedValues]; -} - -- (void)removeExpectedValuesForAttributePaths:(NSArray *)attributePaths - expectedValueID:(uint64_t)expectedValueID -{ - std::lock_guard lock(_lock); - - for (MTRAttributePath * attributePath in attributePaths) { - [self _removeExpectedValueForAttributePath:attributePath expectedValueID:expectedValueID]; - } -} - -- (void)_removeExpectedValueForAttributePath:(MTRAttributePath *)attributePath expectedValueID:(uint64_t)expectedValueID -{ - os_unfair_lock_assert_owner(&self->_lock); - - BOOL shouldReportValue; - NSDictionary * attributeValueToReport; - NSDictionary * previousValue; - [self _setExpectedValue:nil - attributePath:attributePath - expirationTime:nil - shouldReportValue:&shouldReportValue - attributeValueToReport:&attributeValueToReport - expectedValueID:expectedValueID - previousValue:&previousValue]; - - MTR_LOG("%@ remove expected value for path %@ should report %@", self, attributePath, shouldReportValue ? @"YES" : @"NO"); - - if (shouldReportValue) { - NSMutableDictionary * attribute = [NSMutableDictionary dictionaryWithObject:attributePath forKey:MTRAttributePathKey]; - if (attributeValueToReport) { - attribute[MTRDataKey] = attributeValueToReport; - } - if (previousValue) { - attribute[MTRPreviousDataKey] = previousValue; - } - [self _reportAttributes:@[ attribute ]]; - } -} - - (MTRBaseDevice *)newBaseDevice { return [MTRBaseDevice deviceWithNodeID:self.nodeID controller:self.deviceController]; } -// Client Metadata Storage - -- (NSArray *)supportedClientDataClasses -{ - return @[ [NSData class], [NSString class], [NSNumber class], [NSDictionary class], [NSArray class] ]; -} - -- (NSArray * _Nullable)clientDataKeys -{ - return [self.temporaryMetaDataCache allKeys]; -} - -- (id _Nullable)clientDataForKey:(NSString *)key -{ - if (key == nil) - return nil; - - return [self.temporaryMetaDataCache objectForKey:[NSString stringWithFormat:@"%@:-1", key]]; -} - -- (void)setClientDataForKey:(NSString *)key value:(id)value -{ - // TODO: Check supported data types, and also if they conform to NSSecureCoding, when we store these - // TODO: Need to add a delegate method, so when this value changes we call back to the client - - if (key == nil || value == nil) - return; - - if (self.temporaryMetaDataCache == nil) { - self.temporaryMetaDataCache = [NSMutableDictionary dictionary]; - } - - [self.temporaryMetaDataCache setObject:value forKey:[NSString stringWithFormat:@"%@:-1", key]]; -} - -- (void)removeClientDataForKey:(NSString *)key -{ - if (key == nil) - return; - - [self.temporaryMetaDataCache removeObjectForKey:[NSString stringWithFormat:@"%@:-1", key]]; -} - -- (NSArray * _Nullable)clientDataKeysForEndpointID:(NSNumber *)endpointID -{ - if (endpointID == nil) - return nil; - // TODO: When hooked up to storage, enumerate this better - - return [self.temporaryMetaDataCache allKeys]; -} - -- (id _Nullable)clientDataForKey:(NSString *)key endpointID:(NSNumber *)endpointID -{ - if (key == nil || endpointID == nil) - return nil; - - return [self.temporaryMetaDataCache objectForKey:[NSString stringWithFormat:@"%@:%@", key, endpointID]]; -} - -- (void)setClientDataForKey:(NSString *)key endpointID:(NSNumber *)endpointID value:(id)value -{ - if (key == nil || value == nil || endpointID == nil) - return; - - if (self.temporaryMetaDataCache == nil) { - self.temporaryMetaDataCache = [NSMutableDictionary dictionary]; - } - - [self.temporaryMetaDataCache setObject:value forKey:[NSString stringWithFormat:@"%@:%@", key, endpointID]]; -} - -- (void)removeClientDataForKey:(NSString *)key endpointID:(NSNumber *)endpointID -{ - if (key == nil || endpointID == nil) - return; - - [self.temporaryMetaDataCache removeObjectForKey:[NSString stringWithFormat:@"%@:%@", key, endpointID]]; -} - #pragma mark Log Help - (nullable NSNumber *)_informationalNumberAtAttributePath:(MTRAttributePath *)attributePath @@ -2872,44 +1606,8 @@ - (nullable NSNumber *)_informationalProductID return [self _informationalNumberAtAttributePath:productIDPath]; } -- (void)_addInformationalAttributesToCurrentMetricScope -{ - os_unfair_lock_assert_owner(&self->_lock); - - using namespace chip::Tracing::DarwinFramework; - MATTER_LOG_METRIC(kMetricDeviceVendorID, [self _informationalVendorID].unsignedShortValue); - MATTER_LOG_METRIC(kMetricDeviceProductID, [self _informationalProductID].unsignedShortValue); - BOOL usesThread = [self _deviceUsesThread]; - MATTER_LOG_METRIC(kMetricDeviceUsesThread, usesThread); -} - #pragma mark - Description handling -- (BOOL)_attributePathAffectsDescriptionData:(MTRAttributePath *)path -{ - // Technically this does not need to be called while locked, but in - // practice it is, and we want to make sure it's clear that this function - // should never start taking our data lock. - os_unfair_lock_assert_owner(&_lock); - - switch (path.cluster.unsignedLongLongValue) { - case MTRClusterIDTypeBasicInformationID: { - switch (path.attribute.unsignedLongLongValue) { - case MTRAttributeIDTypeClusterBasicInformationAttributeVendorIDID: - case MTRAttributeIDTypeClusterBasicInformationAttributeProductIDID: - return YES; - default: - return NO; - } - } - case MTRClusterIDTypeNetworkCommissioningID: { - return path.attribute.unsignedLongLongValue == MTRAttributeIDTypeGlobalAttributeFeatureMapID; - } - default: - return NO; - } -} - - (void)_updateAttributeDependentDescriptionData { os_unfair_lock_assert_owner(&_lock); @@ -2966,6 +1664,16 @@ - (NSNumber * _Nullable)_networkFeatures return result; } +- (void)controllerSuspended +{ + // Nothing to do for now. +} + +- (void)controllerResumed +{ + // Nothing to do for now. +} + @end /* BEGIN DRAGONS: Note methods here cannot be renamed, and are used by private callers, do not rename, remove or modify behavior here */ diff --git a/src/darwin/Framework/CHIP/MTRDeviceController+XPC.mm b/src/darwin/Framework/CHIP/MTRDeviceController+XPC.mm index 87ce5560381cca..1cd02e24648867 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController+XPC.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController+XPC.mm @@ -34,7 +34,13 @@ static NSSet * GetXPCAllowedClasses() { static NSSet * const sXPCAllowedClasses = [NSSet setWithArray:@[ - [NSString class], [NSNumber class], [NSData class], [NSArray class], [NSDictionary class], [NSError class] + [NSString class], + [NSNumber class], + [NSData class], + [NSArray class], + [NSDictionary class], + [NSError class], + [NSDate class], ]]; return sXPCAllowedClasses; } diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.h b/src/darwin/Framework/CHIP/MTRDeviceController.h index 9e2c833f6ef93b..d731b13052798c 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController.h @@ -65,6 +65,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) */ @property (readonly, nonatomic, getter=isRunning) BOOL running; +/** + * If true, the controller has been suspended via `suspend` and not resumed yet. + */ +@property (readonly, nonatomic, getter=isSuspended) BOOL suspended MTR_NEWLY_AVAILABLE; + /** * The ID assigned to this controller at creation time. */ @@ -181,7 +186,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)preWarmCommissioningSession MTR_DEPRECATED("-[MTRDeviceControllerFactory preWarmCommissioningSession]", ios(16.4, 17.6), macos(13.3, 14.6), watchos(9.4, 10.6), tvos(16.4, 17.6)); /** - * Set the Delegate for the device controller as well as the Queue on which the Delegate callbacks will be triggered + * Set the Delegate for the device controller as well as the Queue on which the Delegate callbacks will be triggered * * @param[in] delegate The delegate the commissioning process should use * @@ -190,6 +195,23 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) - (void)setDeviceControllerDelegate:(id)delegate queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Adds a Delegate to the device controller as well as the Queue on which the Delegate callbacks will be triggered + * + * @param[in] delegate The delegate the commissioning process should use + * + * @param[in] queue The queue on which the callbacks will be delivered + */ +- (void)addDeviceControllerDelegate:(id)delegate + queue:(dispatch_queue_t)queue MTR_NEWLY_AVAILABLE; + +/** + * Removes a Delegate from the device controller + * + * @param[in] delegate The delegate to be removed + */ +- (void)removeDeviceControllerDelegate:(id)delegate MTR_NEWLY_AVAILABLE; + /** * Start scanning for commissionable devices. * @@ -253,6 +275,24 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) error:(NSError * __autoreleasing *)error MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +/** + * Suspend the controller. This will attempt to stop all network traffic associated + * with the controller. The controller will remain suspended until it is + * resumed. + * + * Suspending an already-suspended controller has no effect. + */ +- (void)suspend MTR_NEWLY_AVAILABLE; + +/** + * Resume the controller. This has no effect if the controller is not + * suspended. + * + * A resume following any number of suspend calls will resume the controller; + * there does not need to be a resume call to match every suspend call. + */ +- (void)resume MTR_NEWLY_AVAILABLE; + /** * Shut down the controller. Calls to shutdown after the first one are NO-OPs. * This must be called, either directly or via shutting down the diff --git a/src/darwin/Framework/CHIP/MTRDeviceController.mm b/src/darwin/Framework/CHIP/MTRDeviceController.mm index 4630ff7fe00b4f..69bb02d5f1f03d 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController.mm @@ -31,6 +31,7 @@ #import "MTRDeviceControllerLocalTestStorage.h" #import "MTRDeviceControllerStartupParams.h" #import "MTRDeviceControllerStartupParams_Internal.h" +#import "MTRDeviceController_Concrete.h" #import "MTRDeviceController_XPC.h" #import "MTRDevice_Concrete.h" #import "MTRDevice_Internal.h" @@ -82,6 +83,8 @@ #import +// TODO: These strings and their consumers in this file should probably go away, +// since none of them really apply to all controllers. static NSString * const kErrorCommissionerInit = @"Init failure while initializing a commissioner"; static NSString * const kErrorIPKInit = @"Init failure while initializing IPK"; static NSString * const kErrorSigningKeypairInit = @"Init failure while creating signing keypair bridge"; @@ -109,6 +112,27 @@ using namespace chip::Tracing::DarwinFramework; +@interface MTRDeviceControllerDelegateInfo : NSObject +- (instancetype)initWithDelegate:(id)delegate queue:(dispatch_queue_t)queue; +@property (nonatomic, weak, readonly) id delegate; +@property (nonatomic, readonly) dispatch_queue_t queue; +@end + +@implementation MTRDeviceControllerDelegateInfo +@synthesize delegate = _delegate, queue = _queue; +- (instancetype)initWithDelegate:(id)delegate queue:(dispatch_queue_t)queue +{ + if (!(self = [super init])) { + return nil; + } + + _delegate = delegate; + _queue = queue; + + return self; +} +@end + @implementation MTRDeviceController { chip::Controller::DeviceCommissioner * _cppCommissioner; chip::Credentials::PartialDACVerifier * _partialDACVerifier; @@ -117,7 +141,6 @@ @implementation MTRDeviceController { MTROperationalCredentialsDelegate * _operationalCredentialsDelegate; MTRDeviceAttestationDelegateBridge * _deviceAttestationDelegateBridge; MTRDeviceControllerFactory * _factory; - NSMapTable * _nodeIDToDeviceMap; os_unfair_lock _underlyingDeviceMapLock; MTRCommissionableBrowser * _commissionableBrowser; MTRAttestationTrustStoreBridge * _attestationTrustStoreBridge; @@ -131,18 +154,25 @@ @implementation MTRDeviceController { MTRP256KeypairBridge _signingKeypairBridge; MTRP256KeypairBridge _operationalKeypairBridge; + BOOL _suspended; + // Counters to track assertion status and access controlled by the _assertionLock NSUInteger _keepRunningAssertionCounter; BOOL _shutdownPending; os_unfair_lock _assertionLock; + + NSMutableSet * _delegates; + id _strongDelegateForSetDelegateAPI; } +@synthesize uniqueIdentifier = _uniqueIdentifier; + - (os_unfair_lock_t)deviceMapLock { return &_underlyingDeviceMapLock; } -- (instancetype)initForSubclasses +- (instancetype)initForSubclasses:(BOOL)startSuspended { if (self = [super init]) { // nothing, as superclass of MTRDeviceController is NSObject @@ -153,15 +183,25 @@ - (instancetype)initForSubclasses _keepRunningAssertionCounter = 0; _shutdownPending = NO; _assertionLock = OS_UNFAIR_LOCK_INIT; + + // All synchronous suspend/resume activity has to be protected by + // @synchronized(self), so that parts of suspend/resume can't + // interleave with each other. Using @synchronized here because + // MTRDevice may call isSuspended. + _suspended = startSuspended; + + _nodeIDToDeviceMap = [NSMapTable strongToWeakObjectsMapTable]; + + _delegates = [NSMutableSet set]; + return self; } - (nullable MTRDeviceController *)initWithParameters:(MTRDeviceControllerAbstractParameters *)parameters error:(NSError * __autoreleasing *)error { if ([parameters isKindOfClass:MTRXPCDeviceControllerParameters.class]) { - MTRXPCDeviceControllerParameters * resolvedParameters = (MTRXPCDeviceControllerParameters *) parameters; MTR_LOG("Starting up with XPC Device Controller Parameters: %@", parameters); - return [[MTRDeviceController_XPC alloc] initWithUniqueIdentifier:resolvedParameters.uniqueIdentifier xpConnectionBlock:resolvedParameters.xpcConnectionBlock]; + return [[MTRDeviceController_XPC alloc] initWithParameters:parameters error:error]; } else if (![parameters isKindOfClass:MTRDeviceControllerParameters.class]) { MTR_LOG_ERROR("Unsupported type of MTRDeviceControllerAbstractParameters: %@", parameters); if (error) { @@ -172,7 +212,7 @@ - (nullable MTRDeviceController *)initWithParameters:(MTRDeviceControllerAbstrac auto * controllerParameters = static_cast(parameters); // MTRDeviceControllerFactory will auto-start in per-controller-storage mode if necessary - return [MTRDeviceControllerFactory.sharedInstance initializeController:self withParameters:controllerParameters error:error]; + return [MTRDeviceControllerFactory.sharedInstance initializeController:[MTRDeviceController_Concrete alloc] withParameters:controllerParameters error:error]; } - (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory @@ -184,6 +224,7 @@ - (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory uniqueIdentifier:(NSUUID *)uniqueIdentifier concurrentSubscriptionPoolSize:(NSUInteger)concurrentSubscriptionPoolSize storageBehaviorConfiguration:(MTRDeviceStorageBehaviorConfiguration *)storageBehaviorConfiguration + startSuspended:(BOOL)startSuspended { if (self = [super init]) { // Make sure our storage is all set up to work as early as possible, @@ -195,6 +236,8 @@ - (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory _shutdownPending = NO; _assertionLock = OS_UNFAIR_LOCK_INIT; + _suspended = startSuspended; + if (storageDelegate != nil) { if (storageDelegateQueue == nil) { MTR_LOG_ERROR("storageDelegate provided without storageDelegateQueue"); @@ -323,7 +366,7 @@ - (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory - (NSString *)description { - return [NSString stringWithFormat:@"<%@: %p uuid %@>", NSStringFromClass(self.class), self, _uniqueIdentifier]; + return [NSString stringWithFormat:@"<%@: %p uuid %@>", NSStringFromClass(self.class), self, self.uniqueIdentifier]; } - (BOOL)isRunning @@ -331,14 +374,81 @@ - (BOOL)isRunning return _cppCommissioner != nullptr; } -- (BOOL)matchesPendingShutdownWithParams:(MTRDeviceControllerParameters *)parameters +#pragma mark - Suspend/resume support + +- (BOOL)isSuspended +{ + @synchronized(self) { + return _suspended; + } +} + +- (void)_notifyDelegatesOfSuspendState { - if (!parameters.operationalCertificate || !parameters.rootCertificate) { + BOOL isSuspended = [self isSuspended]; + [self _callDelegatesWithBlock:^(id delegate) { + if ([delegate respondsToSelector:@selector(controller:isSuspended:)]) { + [delegate controller:self isSuspended:isSuspended]; + } + } logString:__PRETTY_FUNCTION__]; +} + +- (void)suspend +{ + MTR_LOG("%@ suspending", self); + + @synchronized(self) { + _suspended = YES; + + NSArray * devicesToSuspend; + { + std::lock_guard lock(*self.deviceMapLock); + devicesToSuspend = [self.nodeIDToDeviceMap objectEnumerator].allObjects; + } + + for (MTRDevice * device in devicesToSuspend) { + [device controllerSuspended]; + } + + // TODO: In the concrete class, consider what should happen with: + // + // * Active commissioning sessions (presumably close them?) + // * CASE sessions in general. + // * Possibly try to see whether we can change our fabric entry to not advertise and restart advertising. + + [self _notifyDelegatesOfSuspendState]; + } +} + +- (void)resume +{ + MTR_LOG("%@ resuming", self); + + @synchronized(self) { + _suspended = NO; + + NSArray * devicesToResume; + { + std::lock_guard lock(*self.deviceMapLock); + devicesToResume = [self.nodeIDToDeviceMap objectEnumerator].allObjects; + } + + for (MTRDevice * device in devicesToResume) { + [device controllerResumed]; + } + + [self _notifyDelegatesOfSuspendState]; + } +} + +- (BOOL)matchesPendingShutdownControllerWithOperationalCertificate:(nullable MTRCertificateDERBytes)operationalCertificate andRootCertificate:(nullable MTRCertificateDERBytes)rootCertificate +{ + if (!operationalCertificate || !rootCertificate) { return FALSE; } - NSNumber * nodeID = [MTRDeviceControllerParameters nodeIDFromNOC:parameters.operationalCertificate]; - NSNumber * fabricID = [MTRDeviceControllerParameters fabricIDFromNOC:parameters.operationalCertificate]; - NSData * publicKey = [MTRDeviceControllerParameters publicKeyFromCertificate:parameters.rootCertificate]; + NSNumber * nodeID = [MTRDeviceControllerParameters nodeIDFromNOC:operationalCertificate]; + NSNumber * fabricID = [MTRDeviceControllerParameters fabricIDFromNOC:operationalCertificate]; + NSData * publicKey = [MTRDeviceControllerParameters publicKeyFromCertificate:rootCertificate]; std::lock_guard lock(_assertionLock); @@ -414,7 +524,7 @@ - (void)cleanupAfterStartup // devices before we start invalidating. MTR_LOG("%s: %@", __PRETTY_FUNCTION__, self); os_unfair_lock_lock(self.deviceMapLock); - NSEnumerator * devices = [_nodeIDToDeviceMap objectEnumerator]; + auto * devices = [self.nodeIDToDeviceMap objectEnumerator].allObjects; [_nodeIDToDeviceMap removeAllObjects]; os_unfair_lock_unlock(self.deviceMapLock); @@ -497,6 +607,10 @@ - (void)cleanup if (_deviceControllerDelegateBridge) { delete _deviceControllerDelegateBridge; _deviceControllerDelegateBridge = nullptr; + @synchronized(self) { + _strongDelegateForSetDelegateAPI = nil; + [_delegates removeAllObjects]; + } } } @@ -745,7 +859,7 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams // // Note that this is just an optimization to avoid throwing the information away and immediately // re-reading it from storage. - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t) (kSecondsToWaitBeforeAPIClientRetainsMTRDevice * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t) (kSecondsToWaitBeforeAPIClientRetainsMTRDevice * NSEC_PER_SEC)), self.chipWorkQueue, ^{ MTR_LOG("%@ un-retain devices loaded at startup %lu", self, static_cast(deviceList.count)); }); }]; @@ -1173,15 +1287,6 @@ - (void)removeDevice:(MTRDevice *)device } #endif -- (void)setDeviceControllerDelegate:(id)delegate queue:(dispatch_queue_t)queue -{ - [self - asyncDispatchToMatterQueue:^() { - self->_deviceControllerDelegateBridge->setDelegate(self, delegate, queue); - } - errorHandler:nil]; -} - - (BOOL)setOperationalCertificateIssuer:(nullable id)operationalCertificateIssuer queue:(nullable dispatch_queue_t)queue { @@ -1681,8 +1786,163 @@ + (void)forceLocalhostAdvertisingOnly } #endif // DEBUG +#pragma mark - MTRDeviceControllerDelegate management + +// Note these are implemented in the base class so that XPC subclass can use it as well when it +- (void)setDeviceControllerDelegate:(id)delegate queue:(dispatch_queue_t)queue +{ + @synchronized(self) { + if (_strongDelegateForSetDelegateAPI) { + if (_strongDelegateForSetDelegateAPI == delegate) { + MTR_LOG("%@ setDeviceControllerDelegate: delegate %p is already set", self, delegate); + return; + } + + MTR_LOG("%@ setDeviceControllerDelegate: replacing %p with %p", self, _strongDelegateForSetDelegateAPI, delegate); + [self removeDeviceControllerDelegate:_strongDelegateForSetDelegateAPI]; + } + _strongDelegateForSetDelegateAPI = delegate; + [self addDeviceControllerDelegate:delegate queue:queue]; + } +} + +- (void)addDeviceControllerDelegate:(id)delegate queue:(dispatch_queue_t)queue +{ + @synchronized(self) { + MTRDeviceControllerDelegateInfo * newDelegateInfo = [[MTRDeviceControllerDelegateInfo alloc] initWithDelegate:delegate queue:queue]; + [_delegates addObject:newDelegateInfo]; + MTR_LOG("%@ addDeviceControllerDelegate: added %p total %lu", self, delegate, static_cast(_delegates.count)); + } +} + +- (void)removeDeviceControllerDelegate:(id)delegate +{ + @synchronized(self) { + if (_strongDelegateForSetDelegateAPI == delegate) { + _strongDelegateForSetDelegateAPI = nil; + } + + __block MTRDeviceControllerDelegateInfo * delegateInfoToRemove = nil; + [self _iterateDelegateInfoWithBlock:^(MTRDeviceControllerDelegateInfo * delegateInfo) { + if (delegateInfo.delegate == delegate) { + delegateInfoToRemove = delegateInfo; + } + }]; + + if (delegateInfoToRemove) { + [_delegates removeObject:delegateInfoToRemove]; + if (_strongDelegateForSetDelegateAPI == delegate) { + _strongDelegateForSetDelegateAPI = nil; + } + MTR_LOG("%@ removeDeviceControllerDelegate: removed %p remaining %lu", self, delegate, static_cast(_delegates.count)); + } else { + MTR_LOG("%@ removeDeviceControllerDelegate: delegate %p not found in %lu", self, delegate, static_cast(_delegates.count)); + } + } +} + +// Iterates the delegates, and remove delegate info objects if the delegate object has dealloc'ed +// Returns number of delegates called +- (NSUInteger)_iterateDelegateInfoWithBlock:(void (^_Nullable)(MTRDeviceControllerDelegateInfo * delegateInfo))block +{ + @synchronized(self) { + if (!_delegates.count) { + MTR_LOG("%@ No delegates to iterate", self); + return 0; + } + + // Opportunistically remove defunct delegate references on every iteration + NSMutableSet * delegatesToRemove = nil; + for (MTRDeviceControllerDelegateInfo * delegateInfo in _delegates) { + id strongDelegate = delegateInfo.delegate; + if (strongDelegate) { + if (block) { + block(delegateInfo); + } + } else { + if (!delegatesToRemove) { + delegatesToRemove = [NSMutableSet set]; + } + [delegatesToRemove addObject:delegateInfo]; + } + } + + if (delegatesToRemove.count) { + [_delegates minusSet:delegatesToRemove]; + MTR_LOG("%@ _iterateDelegatesWithBlock: removed %lu remaining %lu", self, static_cast(delegatesToRemove.count), static_cast(_delegates.count)); + } + + return _delegates.count; + } +} + +- (void)_callDelegatesWithBlock:(void (^_Nullable)(id delegate))block logString:(const char *)logString; +{ + NSUInteger delegatesCalled = [self _iterateDelegateInfoWithBlock:^(MTRDeviceControllerDelegateInfo * delegateInfo) { + id strongDelegate = delegateInfo.delegate; + dispatch_async(delegateInfo.queue, ^{ + block(strongDelegate); + }); + }]; + + MTR_LOG("%@ %lu delegates called for %s", self, static_cast(delegatesCalled), logString); +} + +#if DEBUG +- (NSUInteger)unitTestDelegateCount +{ + return [self _iterateDelegateInfoWithBlock:nil]; +} +#endif + +- (void)controller:(MTRDeviceController *)controller statusUpdate:(MTRCommissioningStatus)status +{ + [self _callDelegatesWithBlock:^(id delegate) { + if ([delegate respondsToSelector:@selector(controller:statusUpdate:)]) { + [delegate controller:controller statusUpdate:status]; + } + } logString:__PRETTY_FUNCTION__]; +} + +- (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError * _Nullable)error +{ + [self _callDelegatesWithBlock:^(id delegate) { + if ([delegate respondsToSelector:@selector(controller:commissioningSessionEstablishmentDone:)]) { + [delegate controller:controller commissioningSessionEstablishmentDone:error]; + } + } logString:__PRETTY_FUNCTION__]; +} + +- (void)controller:(MTRDeviceController *)controller + commissioningComplete:(NSError * _Nullable)error + nodeID:(NSNumber * _Nullable)nodeID + metrics:(MTRMetrics *)metrics +{ + [self _callDelegatesWithBlock:^(id delegate) { + if ([delegate respondsToSelector:@selector(controller:commissioningComplete:nodeID:metrics:)]) { + [delegate controller:controller commissioningComplete:error nodeID:nodeID metrics:metrics]; + } else if ([delegate respondsToSelector:@selector(controller:commissioningComplete:nodeID:)]) { + [delegate controller:controller commissioningComplete:error nodeID:nodeID]; + } else if ([delegate respondsToSelector:@selector(controller:commissioningComplete:)]) { + [delegate controller:controller commissioningComplete:error]; + } + } logString:__PRETTY_FUNCTION__]; +} + +- (void)controller:(MTRDeviceController *)controller readCommissioningInfo:(MTRProductIdentity *)info +{ + [self _callDelegatesWithBlock:^(id delegate) { + if ([delegate respondsToSelector:@selector(controller:readCommissioningInfo:)]) { + [delegate controller:controller readCommissioningInfo:info]; + } + } logString:__PRETTY_FUNCTION__]; +} + @end +// TODO: This should not be in the superclass: either move to +// MTRDeviceController_Concrete.mm, or move into a separate .h/.mm pair of +// files. @implementation MTRDevicePairingDelegateShim - (instancetype)initWithDelegate:(id)delegate { @@ -1735,6 +1995,9 @@ - (void)onPairingDeleted:(NSError * _Nullable)error * Shim to allow us to treat an MTRNOCChainIssuer as an * MTROperationalCertificateIssuer. */ +// TODO: This should not be in the superclass: either move to +// MTRDeviceController_Concrete.mm, or move into a separate .h/.mm pair of +// files. @interface MTROperationalCertificateChainIssuerShim : NSObject @property (nonatomic, readonly) id nocChainIssuer; @property (nonatomic, readonly) BOOL shouldSkipAttestationCertificateValidation; diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h b/src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h index b8b9be9967ebd1..40382c95ade9d9 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerDelegate.h @@ -106,6 +106,13 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) */ - (void)controller:(MTRDeviceController *)controller readCommissioningInfo:(MTRProductIdentity *)info MTR_AVAILABLE(ios(17.0), macos(14.0), watchos(10.0), tvos(17.0)); + +/** + * Notify the delegate when the suspended state changed of the controller, after this happens + * the controller will be in the specified state. + */ +- (void)controller:(MTRDeviceController *)controller + isSuspended:(BOOL)suspended MTR_NEWLY_AVAILABLE; @end typedef NS_ENUM(NSUInteger, MTRPairingStatus) { diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm index bd0b90450b9ac4..9cd3b62340d20a 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerFactory.mm @@ -28,6 +28,7 @@ #import "MTRDeviceController.h" #import "MTRDeviceControllerStartupParams.h" #import "MTRDeviceControllerStartupParams_Internal.h" +#import "MTRDeviceController_Concrete.h" #import "MTRDeviceController_Internal.h" #import "MTRDiagnosticLogsDownloader.h" #import "MTRError_Internal.h" @@ -474,6 +475,7 @@ - (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceController * dispatch_queue_t _Nullable otaProviderDelegateQueue; NSUInteger concurrentSubscriptionPoolSize = 0; MTRDeviceStorageBehaviorConfiguration * storageBehaviorConfiguration = nil; + BOOL startSuspended = NO; if ([startupParams isKindOfClass:[MTRDeviceControllerParameters class]]) { MTRDeviceControllerParameters * params = startupParams; storageDelegate = params.storageDelegate; @@ -483,6 +485,7 @@ - (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceController * otaProviderDelegateQueue = params.otaProviderDelegateQueue; concurrentSubscriptionPoolSize = params.concurrentSubscriptionEstablishmentsAllowedOnThread; storageBehaviorConfiguration = params.storageBehaviorConfiguration; + startSuspended = params.startSuspended; } else if ([startupParams isKindOfClass:[MTRDeviceControllerStartupParams class]]) { MTRDeviceControllerStartupParams * params = startupParams; storageDelegate = nil; @@ -545,7 +548,8 @@ - (MTRDeviceController * _Nullable)_startDeviceController:(MTRDeviceController * otaProviderDelegateQueue:otaProviderDelegateQueue uniqueIdentifier:uniqueIdentifier concurrentSubscriptionPoolSize:concurrentSubscriptionPoolSize - storageBehaviorConfiguration:storageBehaviorConfiguration]; + storageBehaviorConfiguration:storageBehaviorConfiguration + startSuspended:startSuspended]; if (controller == nil) { if (error != nil) { *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INVALID_ARGUMENT]; @@ -660,7 +664,13 @@ - (MTRDeviceController * _Nullable)createControllerOnExistingFabric:(MTRDeviceCo return nil; } - return [self _startDeviceController:[MTRDeviceController alloc] + // If there is a controller already running with matching parameters that is conceptually shut down from the API consumer's viewpoint, re-use it. + MTRDeviceController * existingController = [self _findPendingShutdownControllerWithOperationalCertificate:startupParams.operationalCertificate andRootCertificate:startupParams.rootCertificate]; + if (existingController) { + return existingController; + } + + return [self _startDeviceController:[MTRDeviceController_Concrete alloc] startupParams:startupParams fabricChecker:^MTRDeviceControllerStartupParamsInternal *( FabricTable * fabricTable, MTRDeviceController * controller, CHIP_ERROR & fabricError) { @@ -732,7 +742,7 @@ - (MTRDeviceController * _Nullable)createControllerOnNewFabric:(MTRDeviceControl return nil; } - return [self _startDeviceController:[MTRDeviceController alloc] + return [self _startDeviceController:[MTRDeviceController_Concrete alloc] startupParams:startupParams fabricChecker:^MTRDeviceControllerStartupParamsInternal *( FabricTable * fabricTable, MTRDeviceController * controller, CHIP_ERROR & fabricError) { @@ -951,6 +961,10 @@ - (void)controllerShuttingDown:(MTRDeviceController *)controller _otaProviderDelegateBridge->ControllerShuttingDown(controller); } + if (_diagnosticLogsDownloader != nil) { + [_diagnosticLogsDownloader abortDownloadsForController:controller]; + } + [controller shutDownCppController]; self->_controllerBeingShutDown = nil; @@ -1133,11 +1147,11 @@ - (void)operationalInstanceAdded:(chip::PeerId &)operationalID } } -- (nullable MTRDeviceController *)_findControllerWithPendingShutdownMatchingParams:(MTRDeviceControllerParameters *)parameters +- (nullable MTRDeviceController *)_findPendingShutdownControllerWithOperationalCertificate:(nullable MTRCertificateDERBytes)operationalCertificate andRootCertificate:(nullable MTRCertificateDERBytes)rootCertificate { std::lock_guard lock(_controllersLock); for (MTRDeviceController * controller in _controllers) { - if ([controller matchesPendingShutdownWithParams:parameters]) { + if ([controller matchesPendingShutdownControllerWithOperationalCertificate:operationalCertificate andRootCertificate:rootCertificate]) { MTR_LOG("%@ Found existing controller %@ that is pending shutdown and matching parameters, re-using it", self, controller); [controller clearPendingShutdown]; return controller; @@ -1153,7 +1167,7 @@ - (nullable MTRDeviceController *)initializeController:(MTRDeviceController *)co [self _assertCurrentQueueIsNotMatterQueue]; // If there is a controller already running with matching parameters that is conceptually shut down from the API consumer's viewpoint, re-use it. - MTRDeviceController * existingController = [self _findControllerWithPendingShutdownMatchingParams:parameters]; + MTRDeviceController * existingController = [self _findPendingShutdownControllerWithOperationalCertificate:parameters.operationalCertificate andRootCertificate:parameters.rootCertificate]; if (existingController) { return existingController; } diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerParameters.h b/src/darwin/Framework/CHIP/MTRDeviceControllerParameters.h index caedc20229eb89..171c91c889a493 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerParameters.h +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerParameters.h @@ -31,6 +31,13 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) @interface MTRDeviceControllerAbstractParameters : NSObject - (instancetype)init NS_UNAVAILABLE; + (instancetype)new NS_UNAVAILABLE; + +/** + * Whether the controller should start out suspended. + * + * Defaults to NO. + */ +@property (nonatomic, assign) BOOL startSuspended; @end /** @@ -143,6 +150,11 @@ MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)) intermediateCertificate:(MTRCertificateDERBytes _Nullable)intermediateCertificate rootCertificate:(MTRCertificateDERBytes)rootCertificate; +/** + * The root certificate we were initialized with. + */ +@property (nonatomic, copy, readonly) MTRCertificateDERBytes rootCertificate MTR_NEWLY_AVAILABLE; + @end MTR_NEWLY_AVAILABLE diff --git a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm index 5850a8c4efe384..6a64b6ee84ac8d 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceControllerStartupParams.mm @@ -250,7 +250,13 @@ - (instancetype)initWithOperationalKeypair:(id)operationalKeypair @implementation MTRDeviceControllerAbstractParameters - (instancetype)_initInternal { - return [super init]; + if (!(self = [super init])) { + return nil; + } + + _startSuspended = NO; + + return self; } @end @@ -332,6 +338,9 @@ + (nullable NSData *)publicKeyFromCertificate:(MTRCertificateDERBytes)certificat @end @implementation MTRDeviceControllerExternalCertificateParameters + +@dynamic rootCertificate; + - (instancetype)initWithStorageDelegate:(id)storageDelegate storageDelegateQueue:(dispatch_queue_t)storageDelegateQueue uniqueIdentifier:(NSUUID *)uniqueIdentifier diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.h b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.h index c9587e910d3b1a..3e83317d8fe780 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.h @@ -58,11 +58,6 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS */ @property (readonly, nonatomic, getter=isRunning) BOOL running; -/** - * The ID assigned to this controller at creation time. - */ -@property (readonly, nonatomic) NSUUID * uniqueIdentifier MTR_AVAILABLE(ios(17.6), macos(14.6), watchos(10.6), tvos(17.6)); - /** * Return the Node ID assigned to the controller. Will return nil if the * controller is not running (and hence does not know its node id). @@ -173,15 +168,7 @@ typedef void (^MTRDeviceConnectionCallback)(MTRBaseDevice * _Nullable device, NS - (void)preWarmCommissioningSession MTR_DEPRECATED("-[MTRDeviceControllerFactory preWarmCommissioningSession]", ios(16.4, 17.6), macos(13.3, 14.6), watchos(9.4, 10.6), tvos(16.4, 17.6)); -/** - * Set the Delegate for the device controller as well as the Queue on which the Delegate callbacks will be triggered - * - * @param[in] delegate The delegate the commissioning process should use - * - * @param[in] queue The queue on which the callbacks will be delivered - */ -- (void)setDeviceControllerDelegate:(id)delegate - queue:(dispatch_queue_t)queue MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +// Use super class implementation for -setDeviceControllerDelegate:queue: /** * Start scanning for commissionable devices. diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm index 0ea7bf9232d766..c8f8950579b350 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Concrete.mm @@ -26,7 +26,6 @@ #import "MTRCommissionableBrowserResult_Internal.h" #import "MTRCommissioningParameters.h" #import "MTRConversion.h" -#import "MTRDeviceController.h" #import "MTRDeviceControllerDelegateBridge.h" #import "MTRDeviceControllerFactory_Internal.h" #import "MTRDeviceControllerLocalTestStorage.h" @@ -50,6 +49,7 @@ #import "MTRSetupPayload.h" #import "MTRTimeUtils.h" #import "MTRUnfairLock.h" +#import "MTRUtilities.h" #import "NSDataSpanConversion.h" #import "NSStringSpanConversion.h" #import @@ -80,8 +80,11 @@ #include #include +#include #include +#import + typedef void (^SyncWorkQueueBlock)(void); typedef id (^SyncWorkQueueBlockWithReturnValue)(void); typedef BOOL (^SyncWorkQueueBlockWithBoolReturnValue)(void); @@ -98,7 +101,6 @@ @interface MTRDeviceController_Concrete () @property (nonatomic, readonly) MTRDeviceControllerDelegateBridge * deviceControllerDelegateBridge; @property (nonatomic, readonly) MTROperationalCredentialsDelegate * operationalCredentialsDelegate; @property (nonatomic, readonly) MTRDeviceAttestationDelegateBridge * deviceAttestationDelegateBridge; -@property (nonatomic, readwrite) NSUUID * uniqueIdentifier; @property (nonatomic, readonly) dispatch_queue_t chipWorkQueue; @property (nonatomic, readonly, nullable) MTRDeviceControllerFactory * factory; @property (nonatomic, readonly, nullable) id otaProviderDelegate; @@ -114,19 +116,26 @@ @interface MTRDeviceController_Concrete () @end @implementation MTRDeviceController_Concrete { - // queue used to serialize all work performed by the MTRDeviceController std::atomic _storedFabricIndex; std::atomic> _storedCompressedFabricID; MTRP256KeypairBridge _signingKeypairBridge; MTRP256KeypairBridge _operationalKeypairBridge; + + // Counters to track assertion status and access controlled by the _assertionLock + // TODO: Figure out whether they should live here or in the base class (or + // go away completely!), which depends on how the shutdown codepaths get set up. + NSUInteger _keepRunningAssertionCounter; + BOOL _shutdownPending; + os_unfair_lock _assertionLock; } -// MTRDeviceController ivar internal access -@synthesize uniqueIdentifier = _uniqueIdentifier; +// TODO: Figure out whether the work queue storage lives here or in the superclass +// Right now we seem to have both? @synthesize chipWorkQueue = _chipWorkQueue; @synthesize controllerDataStore = _controllerDataStore; +// TODO: For these remaining ivars, figure out whether they should live here or +// on the superclass. Should not be both. @synthesize factory = _factory; -@synthesize deviceMapLock = _deviceMapLock; @synthesize otaProviderDelegate = _otaProviderDelegate; @synthesize otaProviderDelegateQueue = _otaProviderDelegateQueue; @synthesize commissionableBrowser = _commissionableBrowser; @@ -165,7 +174,7 @@ - (nullable instancetype)initWithParameters:(MTRDeviceControllerAbstractParamete MTR_LOG_DEBUG("%s: got standard parameters, getting standard device controller from factory", __PRETTY_FUNCTION__); auto * controllerParameters = static_cast(parameters); - // or, if necessary, MTRDeviceControllerFactory will auto-start in per-controller-storage mode if necessary + // Start us up normally. MTRDeviceControllerFactory will auto-start in per-controller-storage mode if necessary. MTRDeviceControllerFactory * factory = MTRDeviceControllerFactory.sharedInstance; id controller = [factory initializeController:self withParameters:controllerParameters @@ -190,11 +199,18 @@ - (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory uniqueIdentifier:(NSUUID *)uniqueIdentifier concurrentSubscriptionPoolSize:(NSUInteger)concurrentSubscriptionPoolSize storageBehaviorConfiguration:(MTRDeviceStorageBehaviorConfiguration *)storageBehaviorConfiguration + startSuspended:(BOOL)startSuspended { - if (self = [super initForSubclasses]) { + if (self = [super initForSubclasses:startSuspended]) { // Make sure our storage is all set up to work as early as possible, // before we start doing anything else with the controller. - _uniqueIdentifier = uniqueIdentifier; + self.uniqueIdentifier = uniqueIdentifier; + + // Setup assertion variables + _keepRunningAssertionCounter = 0; + _shutdownPending = NO; + _assertionLock = OS_UNFAIR_LOCK_INIT; + if (storageDelegate != nil) { if (storageDelegateQueue == nil) { MTR_LOG_ERROR("storageDelegate provided without storageDelegateQueue"); @@ -268,7 +284,6 @@ - (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory _otaProviderDelegateQueue = otaProviderDelegateQueue; _chipWorkQueue = queue; _factory = factory; - self.nodeIDToDeviceMap = [NSMapTable strongToWeakObjectsMapTable]; _serverEndpoints = [[NSMutableArray alloc] init]; _commissionableBrowser = nil; @@ -309,6 +324,10 @@ - (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory _concurrentSubscriptionPool = [[MTRAsyncWorkQueue alloc] initWithContext:self width:concurrentSubscriptionPoolSize]; _storedFabricIndex = chip::kUndefinedFabricIndex; + _storedCompressedFabricID = std::nullopt; + self.nodeID = nil; + self.fabricID = nil; + self.rootPublicKey = nil; _storageBehaviorConfiguration = storageBehaviorConfiguration; } @@ -317,7 +336,7 @@ - (instancetype)initWithFactory:(MTRDeviceControllerFactory *)factory - (NSString *)description { - return [NSString stringWithFormat:@"<%@: %p uuid %@>", NSStringFromClass(self.class), self, _uniqueIdentifier]; + return [NSString stringWithFormat:@"<%@: %p uuid %@>", NSStringFromClass(self.class), self, self.uniqueIdentifier]; } - (BOOL)isRunning @@ -325,8 +344,68 @@ - (BOOL)isRunning return _cppCommissioner != nullptr; } +- (BOOL)matchesPendingShutdownControllerWithOperationalCertificate:(nullable MTRCertificateDERBytes)operationalCertificate andRootCertificate:(nullable MTRCertificateDERBytes)rootCertificate +{ + if (!operationalCertificate || !rootCertificate) { + return FALSE; + } + NSNumber * nodeID = [MTRDeviceControllerParameters nodeIDFromNOC:operationalCertificate]; + NSNumber * fabricID = [MTRDeviceControllerParameters fabricIDFromNOC:operationalCertificate]; + NSData * publicKey = [MTRDeviceControllerParameters publicKeyFromCertificate:rootCertificate]; + + std::lock_guard lock(_assertionLock); + + // If any of the local above are nil, the return will be false since MTREqualObjects handles them correctly + return _keepRunningAssertionCounter > 0 && _shutdownPending && MTREqualObjects(nodeID, self.nodeID) && MTREqualObjects(fabricID, self.fabricID) && MTREqualObjects(publicKey, self.rootPublicKey); +} + +- (void)addRunAssertion +{ + std::lock_guard lock(_assertionLock); + + // Only take an assertion if running + if ([self isRunning]) { + ++_keepRunningAssertionCounter; + MTR_LOG("%@ Adding keep running assertion, total %lu", self, static_cast(_keepRunningAssertionCounter)); + } +} + +- (void)removeRunAssertion; +{ + std::lock_guard lock(_assertionLock); + + if (_keepRunningAssertionCounter > 0) { + --_keepRunningAssertionCounter; + MTR_LOG("%@ Removing keep running assertion, total %lu", self, static_cast(_keepRunningAssertionCounter)); + + if ([self isRunning] && _keepRunningAssertionCounter == 0 && _shutdownPending) { + MTR_LOG("%@ All assertions removed and shutdown is pending, shutting down", self); + [self finalShutdown]; + } + } +} + +- (void)clearPendingShutdown +{ + std::lock_guard lock(_assertionLock); + _shutdownPending = NO; +} + - (void)shutdown { + std::lock_guard lock(_assertionLock); + + if (_keepRunningAssertionCounter > 0) { + MTR_LOG("%@ Pending shutdown since %lu assertions are present", self, static_cast(_keepRunningAssertionCounter)); + _shutdownPending = YES; + return; + } + [self finalShutdown]; +} + +- (void)finalShutdown +{ + os_unfair_lock_assert_owner(&_assertionLock); MTR_LOG("%@ shutdown called", self); if (_cppCommissioner == nullptr) { // Already shut down. @@ -347,7 +426,7 @@ - (void)cleanupAfterStartup // devices before we start invalidating. MTR_LOG("%s: %@", __PRETTY_FUNCTION__, self); os_unfair_lock_lock(self.deviceMapLock); - NSEnumerator * devices = [self.nodeIDToDeviceMap objectEnumerator]; + auto * devices = [self.nodeIDToDeviceMap objectEnumerator].allObjects; [self.nodeIDToDeviceMap removeAllObjects]; os_unfair_lock_unlock(self.deviceMapLock); @@ -382,11 +461,17 @@ - (void)shutDownCppController // shutdown completes, in case it wants to write to storage as it // shuts down. _storedFabricIndex = chip::kUndefinedFabricIndex; + _storedCompressedFabricID = std::nullopt; + self.nodeID = nil; + self.fabricID = nil; + self.rootPublicKey = nil; + delete commissionerToShutDown; if (_operationalCredentialsDelegate != nil) { _operationalCredentialsDelegate->SetDeviceCommissioner(nullptr); } } + _shutdownPending = NO; } - (void)deinitFromFactory @@ -621,8 +706,21 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams } self->_storedFabricIndex = fabricIdx; + self->_storedCompressedFabricID = _cppCommissioner->GetCompressedFabricId(); + + chip::Crypto::P256PublicKey rootPublicKey; + if (_cppCommissioner->GetRootPublicKey(rootPublicKey) == CHIP_NO_ERROR) { + self.rootPublicKey = [NSData dataWithBytes:rootPublicKey.Bytes() length:rootPublicKey.Length()]; + self.nodeID = @(_cppCommissioner->GetNodeId()); + self.fabricID = @(_cppCommissioner->GetFabricId()); + } + commissionerInitialized = YES; + // Set self as delegate, which fans out delegate callbacks to all added delegates + id selfDelegate = static_cast>(self); + self->_deviceControllerDelegateBridge->setDelegate(self, selfDelegate, _chipWorkQueue); + MTR_LOG("%@ startup succeeded for nodeID 0x%016llX", self, self->_cppCommissioner->GetNodeId()); }); @@ -646,7 +744,7 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams if (_controllerDataStore) { // If the storage delegate supports the bulk read API, then a dictionary of nodeID => cluster data dictionary would be passed to the handler. Otherwise this would be a no-op, and stored attributes for MTRDevice objects will be loaded lazily in -deviceForNodeID:. [_controllerDataStore fetchAttributeDataForAllDevices:^(NSDictionary *> * _Nonnull clusterDataByNode) { - MTR_LOG("%@ Loaded attribute values for %lu nodes from storage for controller uuid %@", self, static_cast(clusterDataByNode.count), self->_uniqueIdentifier); + MTR_LOG("%@ Loaded attribute values for %lu nodes from storage for controller uuid %@", self, static_cast(clusterDataByNode.count), self.uniqueIdentifier); std::lock_guard lock(*self.deviceMapLock); NSMutableArray * deviceList = [NSMutableArray array]; @@ -663,12 +761,12 @@ - (BOOL)startup:(MTRDeviceControllerStartupParamsInternal *)startupParams // // Note that this is just an optimization to avoid throwing the information away and immediately // re-reading it from storage. - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t) (kSecondsToWaitBeforeAPIClientRetainsMTRDevice * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t) (kSecondsToWaitBeforeAPIClientRetainsMTRDevice * NSEC_PER_SEC)), self.chipWorkQueue, ^{ MTR_LOG("%@ un-retain devices loaded at startup %lu", self, static_cast(deviceList.count)); }); }]; } - MTR_LOG("%s: startup: %@", __PRETTY_FUNCTION__, self); + MTR_LOG("%@ startup: %@", NSStringFromClass(self.class), self); return YES; } @@ -1091,15 +1189,6 @@ - (void)removeDevice:(MTRDevice *)device } #endif -- (void)setDeviceControllerDelegate:(id)delegate queue:(dispatch_queue_t)queue -{ - [self - asyncDispatchToMatterQueue:^() { - self->_deviceControllerDelegateBridge->setDelegate(self, delegate, queue); - } - errorHandler:nil]; -} - - (BOOL)setOperationalCertificateIssuer:(nullable id)operationalCertificateIssuer queue:(nullable dispatch_queue_t)queue { @@ -1192,7 +1281,7 @@ - (BOOL)addServerEndpoint:(MTRServerEndpoint *)endpoint [self->_serverEndpoints addObject:endpoint]; [endpoint registerMatterEndpoint]; MTR_LOG("%@ Added server endpoint %u to controller %@", self, static_cast(endpoint.endpointID.unsignedLongLongValue), - self->_uniqueIdentifier); + self.uniqueIdentifier); } errorHandler:^(NSError * error) { MTR_LOG_ERROR("%@ Unexpected failure dispatching to Matter queue on running controller in addServerEndpoint, adding endpoint %u", self, @@ -1219,8 +1308,7 @@ - (void)removeServerEndpointInternal:(MTRServerEndpoint *)endpoint queue:(dispat // tearing it down. [self asyncDispatchToMatterQueue:^() { [self removeServerEndpointOnMatterQueue:endpoint]; - MTR_LOG("%@ Removed server endpoint %u from controller %@", self, static_cast(endpoint.endpointID.unsignedLongLongValue), - self->_uniqueIdentifier); + MTR_LOG("%@ Removed server endpoint %u from controller %@", self, static_cast(endpoint.endpointID.unsignedLongLongValue), self.uniqueIdentifier); if (queue != nil && completion != nil) { dispatch_async(queue, completion); } @@ -1278,6 +1366,9 @@ - (BOOL)checkForStartError:(CHIP_ERROR)errorCode logMsg:(NSString *)logMsg return YES; } +// TODO: Figure out whether this should live here or in superclass; we shouldn't +// have two copies of this thing. Probably after removing code from the +// superclass that should not be there. + (BOOL)checkForError:(CHIP_ERROR)errorCode logMsg:(NSString *)logMsg error:(NSError * __autoreleasing *)error { if (CHIP_NO_ERROR == errorCode) { @@ -1313,6 +1404,15 @@ - (BOOL)checkIsRunning:(NSError * __autoreleasing *)error - (void)getSessionForNode:(chip::NodeId)nodeID completion:(MTRInternalDeviceConnectionCallback)completion { + // TODO: Figure out whether the synchronization here makes sense. What + // happens if this call happens mid-suspend or mid-resume? + if (self.suspended) { + MTR_LOG_ERROR("%@ suspended: can't get session for node %016llX-%016llx (%llu)", self, self.compressedFabricID.unsignedLongLongValue, nodeID, nodeID); + // TODO: Can we do a better error here? + completion(nullptr, chip::NullOptional, [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + // Get the corresponding MTRDevice object to determine if the case/subscription pool is to be used MTRDevice * device = [self deviceForNodeID:@(nodeID)]; @@ -1337,6 +1437,15 @@ - (void)getSessionForNode:(chip::NodeId)nodeID completion:(MTRInternalDeviceConn - (void)directlyGetSessionForNode:(chip::NodeId)nodeID completion:(MTRInternalDeviceConnectionCallback)completion { + // TODO: Figure out whether the synchronization here makes sense. What + // happens if this call happens mid-suspend or mid-resume? + if (self.suspended) { + MTR_LOG_ERROR("%@ suspended: can't get session for node %016llX-%016llx (%llu)", self, self.compressedFabricID.unsignedLongLongValue, nodeID, nodeID); + // TODO: Can we do a better error here? + completion(nullptr, chip::NullOptional, [MTRError errorForCHIPErrorCode:CHIP_ERROR_INCORRECT_STATE], nil); + return; + } + [self asyncGetCommissionerOnMatterQueue:^(chip::Controller::DeviceCommissioner * commissioner) { auto connectionBridge = new MTRDeviceConnectionBridge(completion); @@ -1471,20 +1580,8 @@ - (BOOL)syncRunOnWorkQueueWithBoolReturnValue:(SyncWorkQueueBlockWithBoolReturnV - (nullable NSNumber *)compressedFabricID { - assertChipStackLockedByCurrentThread(); - - if (!_cppCommissioner) { - return nil; - } - - return @(_cppCommissioner->GetCompressedFabricId()); -} - -- (NSNumber * _Nullable)syncGetCompressedFabricID -{ - return [self syncRunOnWorkQueueWithReturnValue:^NSNumber * { - return [self compressedFabricID]; - } error:nil]; + auto storedValue = _storedCompressedFabricID.load(); + return storedValue.has_value() ? @(storedValue.value()) : nil; } - (CHIP_ERROR)isRunningOnFabric:(chip::FabricTable *)fabricTable diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h index e625d13a80e77e..993298234f33ef 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController_Internal.h @@ -66,14 +66,16 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRDeviceController () -@property (nonatomic, readwrite, nullable) NSMapTable * nodeIDToDeviceMap; +@property (nonatomic, readonly) NSMapTable * nodeIDToDeviceMap; @property (readonly, assign) os_unfair_lock_t deviceMapLock; +@property (readwrite, nonatomic) NSUUID * uniqueIdentifier; + // queue used to serialize all work performed by the MTRDeviceController // (moved here so subclasses can initialize differently) @property (readwrite, retain) dispatch_queue_t chipWorkQueue; -- (instancetype)initForSubclasses; +- (instancetype)initForSubclasses:(BOOL)startSuspended; #pragma mark - MTRDeviceControllerFactory methods @@ -146,7 +148,8 @@ NS_ASSUME_NONNULL_BEGIN otaProviderDelegateQueue:(dispatch_queue_t _Nullable)otaProviderDelegateQueue uniqueIdentifier:(NSUUID *)uniqueIdentifier concurrentSubscriptionPoolSize:(NSUInteger)concurrentSubscriptionPoolSize - storageBehaviorConfiguration:(MTRDeviceStorageBehaviorConfiguration *)storageBehaviorConfiguration; + storageBehaviorConfiguration:(MTRDeviceStorageBehaviorConfiguration *)storageBehaviorConfiguration + startSuspended:(BOOL)startSuspended; /** * Check whether this controller is running on the given fabric, as represented @@ -322,7 +325,7 @@ NS_ASSUME_NONNULL_BEGIN /** * This method returns TRUE if this controller matches the fabric reference and node ID as listed in the parameters. */ -- (BOOL)matchesPendingShutdownWithParams:(MTRDeviceControllerParameters *)parameters; +- (BOOL)matchesPendingShutdownControllerWithOperationalCertificate:(nullable MTRCertificateDERBytes)operationalCertificate andRootCertificate:(nullable MTRCertificateDERBytes)rootCertificate; /** * Clear any pending shutdown request. diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_XPC.h b/src/darwin/Framework/CHIP/MTRDeviceController_XPC.h index 574d3eac628f3d..87218b1f391a66 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_XPC.h +++ b/src/darwin/Framework/CHIP/MTRDeviceController_XPC.h @@ -23,12 +23,11 @@ NS_ASSUME_NONNULL_BEGIN MTR_TESTABLE @interface MTRDeviceController_XPC : MTRDeviceController -- (id)initWithUniqueIdentifier:(NSUUID *)UUID xpConnectionBlock:(NSXPCConnection * (^)(void) )connectionBlock; #ifdef MTR_HAVE_MACH_SERVICE_NAME_CONSTRUCTOR - (id)initWithUniqueIdentifier:(NSUUID *)UUID machServiceName:(NSString *)machServiceName options:(NSXPCConnectionOptions)options #endif - @property(atomic, retain, readwrite)NSXPCConnection * xpcConnection; + @property(nullable, atomic, retain, readwrite)NSXPCConnection * xpcConnection; @end diff --git a/src/darwin/Framework/CHIP/MTRDeviceController_XPC.mm b/src/darwin/Framework/CHIP/MTRDeviceController_XPC.mm index 67049b280d81f3..7ca9fde2099e03 100644 --- a/src/darwin/Framework/CHIP/MTRDeviceController_XPC.mm +++ b/src/darwin/Framework/CHIP/MTRDeviceController_XPC.mm @@ -19,6 +19,7 @@ #import "MTRDefines_Internal.h" #import "MTRDeviceController_Internal.h" #import "MTRDevice_XPC.h" +#import "MTRDevice_XPC_Internal.h" #import "MTRLogging_Internal.h" #import "MTRXPCClientProtocol.h" #import "MTRXPCServerProtocol.h" @@ -33,7 +34,9 @@ @interface MTRDeviceController_XPC () -@property (nonatomic, retain, readwrite) NSUUID * uniqueIdentifier; +@property (nonnull, atomic, readwrite, retain) MTRXPCDeviceControllerParameters * xpcParameters; +@property (atomic, readwrite, assign) NSTimeInterval xpcRetryTimeInterval; +@property (atomic, readwrite, assign) BOOL xpcConnectedOrConnecting; @end @@ -41,81 +44,203 @@ @interface MTRDeviceController_XPC () @implementation MTRDeviceController_XPC -@synthesize uniqueIdentifier = _uniqueIdentifier; ++ (NSMutableSet *)_allowedClasses +{ + static NSArray * sBaseAllowedClasses = @[ + [NSString class], + [NSNumber class], + [NSData class], + [NSArray class], + [NSDictionary class], + [NSError class], + [NSDate class], + ]; + + return [NSMutableSet setWithArray:sBaseAllowedClasses]; +} - (NSXPCInterface *)_interfaceForServerProtocol { NSXPCInterface * interface = [NSXPCInterface interfaceWithProtocol:@protocol(MTRXPCServerProtocol)]; - NSSet * allowedClasses = [NSSet setWithArray:@[ - [NSString class], [NSNumber class], [NSData class], [NSArray class], [NSDictionary class], [NSError class], [MTRCommandPath class], [MTRAttributePath class] + NSMutableSet * allowedClasses = [MTRDeviceController_XPC _allowedClasses]; + [allowedClasses addObjectsFromArray:@[ + [MTRCommandPath class], + [MTRAttributePath class] ]]; [interface setClasses:allowedClasses forSelector:@selector(deviceController:nodeID:invokeCommandWithEndpointID:clusterID:commandID:commandFields:expectedValues:expectedValueInterval:timedInvokeTimeout:serverSideProcessingTimeout:completion:) argumentIndex:0 ofReply:YES]; + return interface; } - (NSXPCInterface *)_interfaceForClientProtocol { NSXPCInterface * interface = [NSXPCInterface interfaceWithProtocol:@protocol(MTRXPCClientProtocol)]; - NSSet * allowedClasses = [NSSet setWithArray:@[ - [NSString class], [NSNumber class], [NSData class], [NSArray class], [NSDictionary class], [NSError class], [MTRAttributePath class] + NSMutableSet * allowedClasses = [MTRDeviceController_XPC _allowedClasses]; + [allowedClasses addObjectsFromArray:@[ + [MTRAttributePath class] ]]; + [interface setClasses:allowedClasses forSelector:@selector(device:receivedAttributeReport:) argumentIndex:1 ofReply:NO]; - allowedClasses = [NSSet setWithArray:@[ - [NSString class], [NSNumber class], [NSData class], [NSArray class], [NSDictionary class], [NSError class], [MTREventPath class] + + allowedClasses = [MTRDeviceController_XPC _allowedClasses]; + [allowedClasses addObjectsFromArray:@[ + [MTREventPath class] ]]; + [interface setClasses:allowedClasses forSelector:@selector(device:receivedEventReport:) argumentIndex:1 ofReply:NO]; + return interface; } -- (id)initWithUniqueIdentifier:(NSUUID *)UUID xpConnectionBlock:(NSXPCConnection * (^)(void) )connectionBlock +- (id)controllerXPCID +{ + return [self.uniqueIdentifier UUIDString]; +} + +- (void)_startXPCConnectionRetry +{ + if (!self.xpcConnectedOrConnecting) { + MTR_LOG("%@: XPC Connection retry - Starting retry for XPC Connection", self); + self.xpcRetryTimeInterval = 0.5; + mtr_weakify(self); + + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t) (self.xpcRetryTimeInterval * NSEC_PER_SEC)), self.chipWorkQueue, ^{ + mtr_strongify(self); + [self _xpcConnectionRetry]; + }); + } else { + MTR_LOG("%@: XPC Connection retry - Not starting retry for XPC Connection, already trying", self); + } +} + +- (void)_xpcConnectionRetry +{ + MTR_LOG("%@: XPC Connection retry - timer hit", self); + if (!self.xpcConnectedOrConnecting) { + if (![self _setupXPCConnection]) { +#if 0 // FIXME: Not sure why this retry is not working, but I will fix this later + MTR_LOG("%@: XPC Connection retry - Scheduling another retry", self); + self.xpcRetryTimeInterval = self.xpcRetryTimeInterval >= 1 ? self.xpcRetryTimeInterval * 2 : 1; + self.xpcRetryTimeInterval = MIN(60.0, self.xpcRetryTimeInterval); + mtr_weakify(self); + + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(self.xpcRetryTimeInterval * NSEC_PER_SEC)), self.chipWorkQueue, ^{ + mtr_strongify(self); + [self _xpcConnectionRetry]; + }); +#else + MTR_LOG("%@: XPC Connection failed retry - bailing", self); +#endif + } else { + MTR_LOG("%@: XPC Connection retry - connection attempt successful", self); + } + } else { + MTR_LOG("%@: XPC Connection retry - Mid retry, or connected, stopping retry timer", self); + } +} + +- (BOOL)_setupXPCConnection { - if (self = [super initForSubclasses]) { + self.xpcConnection = self.xpcParameters.xpcConnectionBlock(); + + MTR_LOG("%@ Set up XPC Connection: %@", self, self.xpcConnection); + if (self.xpcConnection) { + mtr_weakify(self); + self.xpcConnection.remoteObjectInterface = [self _interfaceForServerProtocol]; + + self.xpcConnection.exportedInterface = [self _interfaceForClientProtocol]; + self.xpcConnection.exportedObject = self; + + self.xpcConnection.interruptionHandler = ^{ + mtr_strongify(self); + MTR_LOG_ERROR("XPC Connection for device controller interrupted: %@", self.xpcParameters.uniqueIdentifier); + self.xpcConnectedOrConnecting = NO; + self.xpcConnection = nil; + [self _startXPCConnectionRetry]; + }; + + self.xpcConnection.invalidationHandler = ^{ + mtr_strongify(self); + MTR_LOG_ERROR("XPC Connection for device controller invalidated: %@", self.xpcParameters.uniqueIdentifier); + self.xpcConnectedOrConnecting = NO; + self.xpcConnection = nil; + [self _startXPCConnectionRetry]; + }; + + MTR_LOG("%@ Activating new XPC connection", self); + [self.xpcConnection activate]; + + [[self.xpcConnection synchronousRemoteObjectProxyWithErrorHandler:^(NSError * _Nonnull error) { + MTR_LOG_ERROR("Checkin error: %@", error); + }] deviceController:self.uniqueIdentifier checkInWithContext:[NSDictionary dictionary]]; + + // FIXME: Trying to kick all the MTRDevices attached to this controller to re-establish connections + // This state needs to be stored properly and re-established at connnection time + + MTR_LOG("%@ Starting existing NodeID Registration", self); + for (NSNumber * nodeID in [self.nodeIDToDeviceMap keyEnumerator]) { + MTR_LOG("%@ => Registering nodeID: %@", self, nodeID); + mtr_weakify(self); + + [[self.xpcConnection synchronousRemoteObjectProxyWithErrorHandler:^(NSError * _Nonnull error) { + mtr_strongify(self); + MTR_LOG_ERROR("%@ Registration error for device nodeID: %@ : %@", self, nodeID, error); + }] deviceController:self.uniqueIdentifier registerNodeID:nodeID]; + } + + MTR_LOG("%@ Done existing NodeID Registration", self); + self.xpcConnectedOrConnecting = YES; + } else { + MTR_LOG_ERROR("%@ Failed to set up XPC Connection", self); + self.xpcConnectedOrConnecting = NO; + } + + return (self.xpcConnectedOrConnecting); +} + +- (nullable instancetype)initWithParameters:(MTRDeviceControllerAbstractParameters *)parameters + error:(NSError * __autoreleasing *)error +{ + if (![parameters isKindOfClass:MTRXPCDeviceControllerParameters.class]) { + MTR_LOG_ERROR("Expected MTRXPCDeviceControllerParameters but got: %@", parameters); + if (error) { + *error = [MTRError errorForCHIPErrorCode:CHIP_ERROR_INVALID_ARGUMENT]; + } + return nil; + } + + if (self = [super initForSubclasses:parameters.startSuspended]) { + auto * xpcParameters = static_cast(parameters); + auto connectionBlock = xpcParameters.xpcConnectionBlock; + auto * UUID = xpcParameters.uniqueIdentifier; + MTR_LOG("Setting up XPC Controller for UUID: %@ with connection block: %p", UUID, connectionBlock); if (UUID == nil) { - MTR_LOG_ERROR("MTRDeviceController_XPC initWithUniqueIdentifier failed, nil UUID"); + MTR_LOG_ERROR("MTRDeviceController_XPC initWithParameters failed, nil UUID"); return nil; } if (connectionBlock == nil) { - MTR_LOG_ERROR("MTRDeviceController_XPC initWithUniqueIdentifier failed, nil connectionBlock"); + MTR_LOG_ERROR("MTRDeviceController_XPC initWithParameters failed, nil connectionBlock"); return nil; } - self.xpcConnection = connectionBlock(); self.uniqueIdentifier = UUID; + self.xpcParameters = xpcParameters; self.chipWorkQueue = dispatch_queue_create("MTRDeviceController_XPC_queue", DISPATCH_QUEUE_SERIAL_WITH_AUTORELEASE_POOL); - self.nodeIDToDeviceMap = [NSMapTable strongToWeakObjectsMapTable]; - - MTR_LOG("Set up XPC Connection: %@", self.xpcConnection); - if (self.xpcConnection) { - self.xpcConnection.remoteObjectInterface = [self _interfaceForServerProtocol]; - self.xpcConnection.exportedInterface = [self _interfaceForClientProtocol]; - self.xpcConnection.exportedObject = self; - - self.xpcConnection.interruptionHandler = ^{ - MTR_LOG_ERROR("XPC Connection for device controller interrupted: %@", UUID); - }; - - self.xpcConnection.invalidationHandler = ^{ - MTR_LOG_ERROR("XPC Connection for device controller invalidated: %@", UUID); - }; - - MTR_LOG("Activating new XPC connection"); - [self.xpcConnection activate]; - } else { - MTR_LOG_ERROR("Failed to set up XPC Connection"); + if (![self _setupXPCConnection]) { return nil; } } @@ -126,7 +251,9 @@ - (id)initWithUniqueIdentifier:(NSUUID *)UUID xpConnectionBlock:(NSXPCConnection #ifdef MTR_HAVE_MACH_SERVICE_NAME_CONSTRUCTOR - (id)initWithUniqueIdentifier:(NSUUID *)UUID machServiceName:(NSString *)machServiceName options:(NSXPCConnectionOptions)options { - if (self = [super initForSubclasses]) { + // TODO: Presumably this should end up doing some sort of + // MTRDeviceControllerAbstractParameters thing eventually? + if (self = [super initForSubclasses:NO]) { MTR_LOG("Setting up XPC Controller for UUID: %@ with machServiceName: %s options: %d", UUID, machServiceName, options); self.xpcConnection = [[NSXPCConnection alloc] initWithMachServiceName:machServiceName options:options]; self.uniqueIdentifier = UUID; @@ -139,7 +266,7 @@ - (id)initWithUniqueIdentifier:(NSUUID *)UUID machServiceName:(NSString *)machSe self.xpcConnection.exportedObject = self; MTR_LOG("%s: resuming new XPC connection"); - [self.xpcConnection resume]; + [self.xpcConnection activate]; } else { MTR_LOG_ERROR("Failed to set up XPC Connection"); return nil; @@ -150,13 +277,6 @@ - (id)initWithUniqueIdentifier:(NSUUID *)UUID machServiceName:(NSString *)machSe } #endif // MTR_HAVE_MACH_SERVICE_NAME_CONSTRUCTOR -- (nullable instancetype)initWithParameters:(MTRDeviceControllerAbstractParameters *)parameters - error:(NSError * __autoreleasing *)error -{ - MTR_LOG_ERROR("%s: unimplemented method called", __PRETTY_FUNCTION__); - return nil; -} - // If prefetchedClusterData is not provided, load attributes individually from controller data store - (MTRDevice *)_setupDeviceForNodeID:(NSNumber *)nodeID prefetchedClusterData:(NSDictionary *)prefetchedClusterData { @@ -164,14 +284,15 @@ - (MTRDevice *)_setupDeviceForNodeID:(NSNumber *)nodeID prefetchedClusterData:(N os_unfair_lock_assert_owner(self.deviceMapLock); MTRDevice * deviceToReturn = [[MTRDevice_XPC alloc] initWithNodeID:nodeID controller:self]; - // If we're not running, don't add the device to our map. That would - // create a cycle that nothing would break. Just return the device, - // which will be in exactly the state it would be in if it were created - // while we were running and then we got shut down. - if ([self isRunning]) { - [self.nodeIDToDeviceMap setObject:deviceToReturn forKey:nodeID]; - } + [self.nodeIDToDeviceMap setObject:deviceToReturn forKey:nodeID]; MTR_LOG("%s: returning XPC device for node id %@", __PRETTY_FUNCTION__, nodeID); + + mtr_weakify(self); + [[self.xpcConnection synchronousRemoteObjectProxyWithErrorHandler:^(NSError * _Nonnull error) { + mtr_strongify(self); + MTR_LOG_ERROR("%@ Registration error for device nodeID: %@ : %@", self, nodeID, error); + }] deviceController:self.uniqueIdentifier registerNodeID:nodeID]; + return deviceToReturn; } @@ -242,6 +363,14 @@ - (oneway void)deviceConfigurationChanged:(NSNumber *)nodeID [device deviceConfigurationChanged:nodeID]; } +- (oneway void)device:(NSNumber *)nodeID internalStateUpdated:(NSDictionary *)dictionary +{ + MTRDevice_XPC * device = (MTRDevice_XPC *) [self deviceForNodeID:nodeID]; + MTR_LOG("Received internalStateUpdated: %@ found device: %@", nodeID, device); + + [device device:nodeID internalStateUpdated:dictionary]; +} + #pragma mark - MTRDeviceController Protocol Client // Not Supported via XPC diff --git a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm index b7e7bf78027b4f..055c8a31ac45c5 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm +++ b/src/darwin/Framework/CHIP/MTRDevice_Concrete.mm @@ -461,12 +461,33 @@ - (NSString *)description } return [NSString - stringWithFormat:@"", self, _deviceController.compressedFabricID.unsignedLongLongValue, _nodeID.unsignedLongLongValue, _nodeID.unsignedLongLongValue, vid, pid, wifi, thread, InternalDeviceStateString(internalDeviceState), static_cast(lastSubscriptionAttemptWait), static_cast(_asyncWorkQueue.itemCount), mostRecentReportTime, reportAge, lastSubscriptionFailureTime, subscriptionFailureAge, _deviceController.uniqueIdentifier]; + stringWithFormat:@"<%@: %p, node: %016llX-%016llX (%llu), VID: %@, PID: %@, WiFi: %@, Thread: %@, state: %@, last subscription attempt wait: %lus, queued work: %lu, last report: %@%@, last subscription failure: %@%@, controller: %@>", NSStringFromClass(self.class), self, _deviceController.compressedFabricID.unsignedLongLongValue, _nodeID.unsignedLongLongValue, _nodeID.unsignedLongLongValue, vid, pid, wifi, thread, InternalDeviceStateString(internalDeviceState), static_cast(lastSubscriptionAttemptWait), static_cast(_asyncWorkQueue.itemCount), mostRecentReportTime, reportAge, lastSubscriptionFailureTime, subscriptionFailureAge, _deviceController.uniqueIdentifier]; } -+ (MTRDevice *)deviceWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller +- (NSDictionary *)_internalProperties { - return [controller deviceForNodeID:nodeID]; + NSMutableDictionary * properties = [NSMutableDictionary dictionary]; + std::lock_guard lock(_descriptionLock); + + MTR_OPTIONAL_ATTRIBUTE(kMTRDeviceInternalPropertyKeyVendorID, _vid, properties); + MTR_OPTIONAL_ATTRIBUTE(kMTRDeviceInternalPropertyKeyProductID, _pid, properties); + MTR_OPTIONAL_ATTRIBUTE(kMTRDeviceInternalPropertyNetworkFeatures, _allNetworkFeatures, properties); + MTR_OPTIONAL_ATTRIBUTE(kMTRDeviceInternalPropertyDeviceState, [NSNumber numberWithUnsignedInteger:_internalDeviceStateForDescription], properties); + MTR_OPTIONAL_ATTRIBUTE(kMTRDeviceInternalPropertyLastSubscriptionAttemptWait, [NSNumber numberWithUnsignedInt:_lastSubscriptionAttemptWaitForDescription], properties); + MTR_OPTIONAL_ATTRIBUTE(kMTRDeviceInternalPropertyMostRecentReportTime, _mostRecentReportTimeForDescription, properties); + MTR_OPTIONAL_ATTRIBUTE(kMTRDeviceInternalPropertyLastSubscriptionFailureTime, _lastSubscriptionFailureTimeForDescription, properties); + + return properties; +} + +- (void)_notifyDelegateOfPrivateInternalPropertiesChanges +{ + os_unfair_lock_assert_owner(&self->_lock); + [self _callDelegatesWithBlock:^(id delegate) { + if ([delegate respondsToSelector:@selector(device:internalStateUpdated:)]) { + [delegate performSelector:@selector(device:internalStateUpdated:) withObject:self withObject:[self _internalProperties]]; + } + }]; } #pragma mark - Time Synchronization @@ -698,14 +719,23 @@ - (BOOL)_subscriptionsAllowed { os_unfair_lock_assert_owner(&self->_lock); - // We should not allow a subscription for device controllers over XPC. - return ![_deviceController isKindOfClass:MTRDeviceControllerOverXPC.class]; + // We should not allow a subscription for suspended controllers or device controllers over XPC. + return _deviceController.isSuspended == NO && ![_deviceController isKindOfClass:MTRDeviceControllerOverXPC.class]; } - (void)_delegateAdded { os_unfair_lock_assert_owner(&self->_lock); + [super _delegateAdded]; + + [self _ensureSubscriptionForExistingDelegates:@"delegate is set"]; +} + +- (void)_ensureSubscriptionForExistingDelegates:(NSString *)reason +{ + os_unfair_lock_assert_owner(&self->_lock); + __block BOOL shouldSetUpSubscription = [self _subscriptionsAllowed]; // For unit testing only. If this ever changes to not being for unit testing purposes, @@ -727,13 +757,20 @@ - (void)_delegateAdded if ([self _deviceUsesThread]) { MTR_LOG(" => %@ - device is a thread device, scheduling in pool", self); [self _scheduleSubscriptionPoolWork:^{ - std::lock_guard lock(self->_lock); - [self _setupSubscriptionWithReason:@"delegate is set and scheduled subscription is happening"]; + [self->_deviceController asyncDispatchToMatterQueue:^{ + std::lock_guard lock(self->_lock); + [self _setupSubscriptionWithReason:[NSString stringWithFormat:@"%@ and scheduled subscription is happening", reason]]; + } errorHandler:nil]; } inNanoseconds:0 description:@"MTRDevice setDelegate first subscription"]; } else { - [self _setupSubscriptionWithReason:@"delegate is set and subscription is needed"]; + [_deviceController asyncDispatchToMatterQueue:^{ + std::lock_guard lock(self->_lock); + [self _setupSubscriptionWithReason:[NSString stringWithFormat:@"%@ and subscription is needed", reason]]; + } errorHandler:nil]; } } + + [self _notifyDelegateOfPrivateInternalPropertiesChanges]; } - (void)invalidate @@ -914,6 +951,15 @@ - (void)_callDelegateDeviceCachePrimed // assume lock is held - (void)_changeState:(MTRDeviceState)state { + // We want to avoid situations where something changes our state and then an + // async block that was queued earlier in response to something changes it + // again, to a value that no longer makes sense. To avoid that: + // + // 1) All state changes happen on the Matter queue. + // 2) All state changes happen synchronously with the event that actually + // triggers the state change. + assertChipStackLockedByCurrentThread(); + os_unfair_lock_assert_owner(&self->_lock); MTRDeviceState lastState = _state; _state = state; @@ -938,6 +984,15 @@ - (void)_changeState:(MTRDeviceState)state - (void)_changeInternalState:(MTRInternalDeviceState)state { + // We want to avoid situations where something changes our state and then an + // async block that was queued earlier in response to something changes it + // again, to a value that no longer makes sense. To avoid that: + // + // 1) All state changes happen on the Matter queue. + // 2) All state changes happen synchronously with the event that actually + // triggers the state change. + assertChipStackLockedByCurrentThread(); + os_unfair_lock_assert_owner(&self->_lock); MTRInternalDeviceState lastState = _internalDeviceState; _internalDeviceState = state; @@ -956,6 +1011,8 @@ - (void)_changeInternalState:(MTRInternalDeviceState)state } }]; /* END DRAGONS */ + + [self _notifyDelegateOfPrivateInternalPropertiesChanges]; } } @@ -976,6 +1033,7 @@ - (void)_handleSubscriptionEstablished // If subscription had reset since this handler was scheduled, do not execute "established" logic below if (!HaveSubscriptionEstablishedRightNow(_internalDeviceState)) { MTR_LOG("%@ _handleSubscriptionEstablished run with internal state %lu - skipping subscription establishment logic", self, static_cast(_internalDeviceState)); + os_unfair_lock_unlock(&self->_lock); return; } @@ -1018,12 +1076,16 @@ - (void)_handleSubscriptionEstablished - (void)_handleSubscriptionError:(NSError *)error { + assertChipStackLockedByCurrentThread(); + std::lock_guard lock(_lock); [self _doHandleSubscriptionError:error]; } - (void)_doHandleSubscriptionError:(NSError *)error { + assertChipStackLockedByCurrentThread(); + os_unfair_lock_assert_owner(&_lock); [self _changeInternalState:MTRInternalDeviceStateUnsubscribed]; @@ -1103,7 +1165,7 @@ - (void)_scheduleSubscriptionPoolWork:(dispatch_block_t)workBlock inNanoseconds: } // Wait the required amount of time, then put it in the subscription pool to wait additionally for a spot, if needed - dispatch_after(dispatch_time(DISPATCH_TIME_NOW, inNanoseconds), dispatch_get_main_queue(), ^{ + dispatch_after(dispatch_time(DISPATCH_TIME_NOW, inNanoseconds), self.queue, ^{ // In the case where a resubscription triggering event happened and already established, running the work block should result in a no-op MTRAsyncWorkItem * workItem = [[MTRAsyncWorkItem alloc] initWithQueue:self.queue]; [workItem setReadyHandler:^(id _Nonnull context, NSInteger retryCount, MTRAsyncWorkCompletionBlock _Nonnull completion) { @@ -1139,13 +1201,23 @@ - (void)_scheduleSubscriptionPoolWork:(dispatch_block_t)workBlock inNanoseconds: - (void)_handleResubscriptionNeededWithDelay:(NSNumber *)resubscriptionDelayMs { - BOOL deviceUsesThread; + assertChipStackLockedByCurrentThread(); - os_unfair_lock_lock(&self->_lock); + std::lock_guard lock(_lock); + // Change our state before going async. [self _changeState:MTRDeviceStateUnknown]; [self _changeInternalState:MTRInternalDeviceStateResubscribing]; + dispatch_async(self.queue, ^{ + [self _handleResubscriptionNeededWithDelayOnDeviceQueue:resubscriptionDelayMs]; + }); +} + +- (void)_handleResubscriptionNeededWithDelayOnDeviceQueue:(NSNumber *)resubscriptionDelayMs +{ + os_unfair_lock_lock(&self->_lock); + // If we are here, then the ReadClient either just detected a subscription // drop or just tried again and failed. Either way, count it as "tried and // failed to subscribe": in the latter case it's actually true, and in the @@ -1156,8 +1228,8 @@ - (void)_handleResubscriptionNeededWithDelay:(NSNumber *)resubscriptionDelayMs std::lock_guard lock(_descriptionLock); _lastSubscriptionFailureTimeForDescription = _lastSubscriptionFailureTime; } - - deviceUsesThread = [self _deviceUsesThread]; + [self _notifyDelegateOfPrivateInternalPropertiesChanges]; + BOOL deviceUsesThread = [self _deviceUsesThread]; // If a previous resubscription failed, remove the item from the subscription pool. [self _clearSubscriptionPoolWork]; @@ -1193,6 +1265,8 @@ - (void)_handleResubscriptionNeededWithDelay:(NSNumber *)resubscriptionDelayMs - (void)_handleSubscriptionReset:(NSNumber * _Nullable)retryDelay { + assertChipStackLockedByCurrentThread(); + std::lock_guard lock(_lock); [self _doHandleSubscriptionReset:retryDelay]; } @@ -1202,14 +1276,25 @@ - (void)_setLastSubscriptionAttemptWait:(uint32_t)lastSubscriptionAttemptWait os_unfair_lock_assert_owner(&_lock); _lastSubscriptionAttemptWait = lastSubscriptionAttemptWait; - std::lock_guard lock(_descriptionLock); - _lastSubscriptionAttemptWaitForDescription = lastSubscriptionAttemptWait; + { + std::lock_guard lock(_descriptionLock); + _lastSubscriptionAttemptWaitForDescription = lastSubscriptionAttemptWait; + } + + [self _notifyDelegateOfPrivateInternalPropertiesChanges]; } - (void)_doHandleSubscriptionReset:(NSNumber * _Nullable)retryDelay { + assertChipStackLockedByCurrentThread(); + os_unfair_lock_assert_owner(&_lock); + if (_deviceController.isSuspended) { + MTR_LOG("%@ ignoring expected subscription reset on controller suspend", self); + return; + } + // If we are here, then either we failed to establish initial CASE, or we // failed to send the initial SubscribeRequest message, or our ReadClient // has given up completely. Those all count as "we have tried and failed to @@ -1219,6 +1304,7 @@ - (void)_doHandleSubscriptionReset:(NSNumber * _Nullable)retryDelay std::lock_guard lock(_descriptionLock); _lastSubscriptionFailureTimeForDescription = _lastSubscriptionFailureTime; } + [self _notifyDelegateOfPrivateInternalPropertiesChanges]; // if there is no delegate then also do not retry if (![self _delegateExists]) { @@ -1264,8 +1350,11 @@ - (void)_doHandleSubscriptionReset:(NSNumber * _Nullable)retryDelay // Call _reattemptSubscriptionNowIfNeededWithReason when timer fires - if subscription is // in a better state at that time this will be a no-op. auto resubscriptionBlock = ^{ - std::lock_guard lock(self->_lock); - [self _reattemptSubscriptionNowIfNeededWithReason:@"got subscription reset"]; + [self->_deviceController asyncDispatchToMatterQueue:^{ + std::lock_guard lock(self->_lock); + [self _reattemptSubscriptionNowIfNeededWithReason:@"got subscription reset"]; + } + errorHandler:nil]; }; int64_t resubscriptionDelayNs = static_cast(secondsToWait * NSEC_PER_SEC); @@ -1276,10 +1365,13 @@ - (void)_doHandleSubscriptionReset:(NSNumber * _Nullable)retryDelay // For non-Thread-enabled devices, just call the resubscription block after the specified time dispatch_after(dispatch_time(DISPATCH_TIME_NOW, resubscriptionDelayNs), self.queue, resubscriptionBlock); } + [self _notifyDelegateOfPrivateInternalPropertiesChanges]; } - (void)_reattemptSubscriptionNowIfNeededWithReason:(NSString *)reason { + assertChipStackLockedByCurrentThread(); + os_unfair_lock_assert_owner(&self->_lock); if (!self.reattemptingSubscription) { return; @@ -1292,6 +1384,8 @@ - (void)_reattemptSubscriptionNowIfNeededWithReason:(NSString *)reason - (void)_handleUnsolicitedMessageFromPublisher { + assertChipStackLockedByCurrentThread(); + std::lock_guard lock(_lock); [self _changeState:MTRDeviceStateReachable]; @@ -1312,18 +1406,23 @@ - (void)_handleUnsolicitedMessageFromPublisher - (void)_markDeviceAsUnreachableIfNeverSubscribed { - os_unfair_lock_assert_owner(&self->_lock); + [_deviceController asyncDispatchToMatterQueue:^{ + std::lock_guard lock(self->_lock); - if (HadSubscriptionEstablishedOnce(_internalDeviceState)) { - return; - } + if (HadSubscriptionEstablishedOnce(self->_internalDeviceState)) { + return; + } - MTR_LOG("%@ still not subscribed, marking the device as unreachable", self); - [self _changeState:MTRDeviceStateUnreachable]; + MTR_LOG("%@ still not subscribed, marking the device as unreachable", self); + [self _changeState:MTRDeviceStateUnreachable]; + } + errorHandler:nil]; } - (void)_handleReportBegin { + assertChipStackLockedByCurrentThread(); + std::lock_guard lock(_lock); _receivingReport = YES; @@ -1469,8 +1568,12 @@ - (void)unitTestSetMostRecentReportTimes:(NSMutableArray *)mostRecentR { _mostRecentReportTimes = mostRecentReportTimes; - std::lock_guard lock(_descriptionLock); - _mostRecentReportTimeForDescription = [mostRecentReportTimes lastObject]; + { + std::lock_guard lock(_descriptionLock); + _mostRecentReportTimeForDescription = [mostRecentReportTimes lastObject]; + } + std::lock_guard lock(_lock); + [self _notifyDelegateOfPrivateInternalPropertiesChanges]; } #endif @@ -1575,6 +1678,8 @@ - (void)_scheduleClusterDataPersistence } } + [self _notifyDelegateOfPrivateInternalPropertiesChanges]; + // Do not schedule persistence if device is reporting excessively if ([self _deviceIsReportingExcessively]) { return; @@ -1599,6 +1704,7 @@ - (void)_resetStorageBehaviorState std::lock_guard lock(_descriptionLock); _mostRecentReportTimeForDescription = nil; } + _deviceReportingExcessivelyStartTime = nil; _reportToPersistenceDelayCurrentMultiplier = 1; @@ -1606,6 +1712,8 @@ - (void)_resetStorageBehaviorState if ([self _dataStoreExists]) { [self _persistClusterData]; } + + [self _notifyDelegateOfPrivateInternalPropertiesChanges]; } - (void)setStorageBehaviorConfiguration:(MTRDeviceStorageBehaviorConfiguration *)storageBehaviorConfiguration @@ -1659,6 +1767,8 @@ - (void)_handleReportEnd } }]; #endif + + [self _notifyDelegateOfPrivateInternalPropertiesChanges]; } - (BOOL)_interestedPaths:(NSArray * _Nullable)interestedPaths includesAttributePath:(MTRAttributePath *)attributePath @@ -1750,11 +1860,14 @@ - (void)unitTestInjectEventReport:(NSArray *> *)eve - (void)unitTestInjectAttributeReport:(NSArray *> *)attributeReport fromSubscription:(BOOL)isFromSubscription { - dispatch_async(self.queue, ^{ + [_deviceController asyncDispatchToMatterQueue:^{ [self _handleReportBegin]; - [self _handleAttributeReport:attributeReport fromSubscription:isFromSubscription]; - [self _handleReportEnd]; - }); + dispatch_async(self.queue, ^{ + [self _handleAttributeReport:attributeReport fromSubscription:isFromSubscription]; + [self _handleReportEnd]; + }); + } + errorHandler:nil]; } #endif @@ -2185,6 +2298,8 @@ - (void)unitTestResetSubscription // assume lock is held - (void)_setupSubscriptionWithReason:(NSString *)reason { + assertChipStackLockedByCurrentThread(); + os_unfair_lock_assert_owner(&self->_lock); if (![self _subscriptionsAllowed]) { @@ -2230,7 +2345,6 @@ - (void)_setupSubscriptionWithReason:(NSString *)reason dispatch_after(dispatch_time(DISPATCH_TIME_NOW, static_cast(kSecondsToWaitBeforeMarkingUnreachableAfterSettingUpSubscription) * static_cast(NSEC_PER_SEC)), self.queue, ^{ mtr_strongify(self); if (self != nil) { - std::lock_guard lock(self->_lock); [self _markDeviceAsUnreachableIfNeverSubscribed]; } }); @@ -2248,10 +2362,8 @@ - (void)_setupSubscriptionWithReason:(NSString *)reason NSNumber * _Nullable retryDelay) { if (error != nil) { MTR_LOG_ERROR("%@ getSessionForNode error %@", self, error); - dispatch_async(self.queue, ^{ - [self _handleSubscriptionError:error]; - [self _handleSubscriptionReset:retryDelay]; - }); + [self _handleSubscriptionError:error]; + [self _handleSubscriptionReset:retryDelay]; return; } @@ -2275,17 +2387,13 @@ - (void)_setupSubscriptionWithReason:(NSString *)reason }, ^(NSError * error) { MTR_LOG_ERROR("%@ got subscription error %@", self, error); - dispatch_async(self.queue, ^{ - // OnError - [self _handleSubscriptionError:error]; - }); + // OnError + [self _handleSubscriptionError:error]; }, ^(NSError * error, NSNumber * resubscriptionDelayMs) { MTR_LOG_ERROR("%@ got resubscription error %@ delay %@", self, error, resubscriptionDelayMs); - dispatch_async(self.queue, ^{ - // OnResubscriptionNeeded - [self _handleResubscriptionNeededWithDelay:resubscriptionDelayMs]; - }); + // OnResubscriptionNeeded + [self _handleResubscriptionNeededWithDelay:resubscriptionDelayMs]; }, ^(void) { MTR_LOG("%@ got subscription established", self); @@ -2316,23 +2424,17 @@ - (void)_setupSubscriptionWithReason:(NSString *)reason self->_currentReadClient = nullptr; self->_currentSubscriptionCallback = nullptr; - dispatch_async(self.queue, ^{ - // OnDone - [self _handleSubscriptionReset:nil]; - }); + // OnDone + [self _doHandleSubscriptionReset:nil]; }, ^(void) { MTR_LOG("%@ got unsolicited message from publisher", self); - dispatch_async(self.queue, ^{ - // OnUnsolicitedMessageFromPublisher - [self _handleUnsolicitedMessageFromPublisher]; - }); + // OnUnsolicitedMessageFromPublisher + [self _handleUnsolicitedMessageFromPublisher]; }, ^(void) { MTR_LOG("%@ got report begin", self); - dispatch_async(self.queue, ^{ - [self _handleReportBegin]; - }); + [self _handleReportBegin]; }, ^(void) { MTR_LOG("%@ got report end", self); @@ -2402,10 +2504,8 @@ - (void)_setupSubscriptionWithReason:(NSString *)reason if (err != CHIP_NO_ERROR) { NSError * error = [MTRError errorForCHIPErrorCode:err logContext:self]; MTR_LOG_ERROR("%@ SendAutoResubscribeRequest error %@", self, error); - dispatch_async(self.queue, ^{ - [self _handleSubscriptionError:error]; - [self _handleSubscriptionReset:nil]; - }); + [self _handleSubscriptionError:error]; + [self _handleSubscriptionReset:nil]; return; } @@ -2593,7 +2693,15 @@ static BOOL AttributeHasChangesOmittedQuality(MTRAttributePath * attributePath) // 2. The attribute has the Changes Omitted quality, so we won't get reports for it. // 3. The attribute is not in the spec, and the read params asks to assume // an unknown attribute has the Changes Omitted quality. - if (![self _subscriptionAbleToReport] || hasChangesOmittedQuality) { + // + // But all this only happens if this device has been accessed via the public + // API. If it's a device we just created internally, don't do read-throughs. + BOOL readThroughsAllowed; + { + std::lock_guard lock(_lock); + readThroughsAllowed = _accessedViaPublicAPI; + } + if (readThroughsAllowed && (![self _subscriptionAbleToReport] || hasChangesOmittedQuality)) { // Read requests container will be a mutable array of items, each being an array containing: // [attribute request path, params] // Batching handler should only coalesce when params are equal. @@ -3044,6 +3152,12 @@ - (void)_performScheduledExpirationCheck - (NSDictionary *)_attributeValueDictionaryForAttributePath:(MTRAttributePath *)attributePath { std::lock_guard lock(_lock); + return [self _lockedAttributeValueDictionaryForAttributePath:attributePath]; +} + +- (NSDictionary *)_lockedAttributeValueDictionaryForAttributePath:(MTRAttributePath *)attributePath +{ + os_unfair_lock_assert_owner(&self->_lock); // First check expected value cache NSArray * expectedValue = _expectedValueCache[attributePath]; @@ -3430,6 +3544,31 @@ - (NSArray *)_getAttributesToReportWithReportedValues:(NSArray *> *)getAllAttributesReport +{ + std::lock_guard lock(_lock); + + NSMutableArray * attributeReport = [NSMutableArray array]; + for (MTRClusterPath * clusterPath in [self _knownClusters]) { + MTRDeviceClusterData * clusterData = [self _clusterDataForPath:clusterPath]; + + for (NSNumber * attributeID in clusterData.attributes) { + auto * attributePath = [MTRAttributePath attributePathWithEndpointID:clusterPath.endpoint + clusterID:clusterPath.cluster + attributeID:attributeID]; + + // Construct response-value dictionary with the data-value dictionary returned by + // _lockedAttributeValueDictionaryForAttributePath, to takes into consideration expected values as well. + [attributeReport addObject:@{ + MTRAttributePathKey : attributePath, + MTRDataKey : [self _lockedAttributeValueDictionaryForAttributePath:attributePath] + }]; + } + } + + return attributeReport; +} + #ifdef DEBUG - (NSUInteger)unitTestAttributeCount { @@ -3716,86 +3855,6 @@ - (MTRBaseDevice *)newBaseDevice return [MTRBaseDevice deviceWithNodeID:self.nodeID controller:self.deviceController]; } -// Client Metadata Storage - -- (NSArray *)supportedClientDataClasses -{ - return @[ [NSData class], [NSString class], [NSNumber class], [NSDictionary class], [NSArray class] ]; -} - -- (NSArray * _Nullable)clientDataKeys -{ - return [self.temporaryMetaDataCache allKeys]; -} - -- (id _Nullable)clientDataForKey:(NSString *)key -{ - if (key == nil) - return nil; - - return [self.temporaryMetaDataCache objectForKey:[NSString stringWithFormat:@"%@:-1", key]]; -} - -- (void)setClientDataForKey:(NSString *)key value:(id)value -{ - // TODO: Check supported data types, and also if they conform to NSSecureCoding, when we store these - // TODO: Need to add a delegate method, so when this value changes we call back to the client - - if (key == nil || value == nil) - return; - - if (self.temporaryMetaDataCache == nil) { - self.temporaryMetaDataCache = [NSMutableDictionary dictionary]; - } - - [self.temporaryMetaDataCache setObject:value forKey:[NSString stringWithFormat:@"%@:-1", key]]; -} - -- (void)removeClientDataForKey:(NSString *)key -{ - if (key == nil) - return; - - [self.temporaryMetaDataCache removeObjectForKey:[NSString stringWithFormat:@"%@:-1", key]]; -} - -- (NSArray * _Nullable)clientDataKeysForEndpointID:(NSNumber *)endpointID -{ - if (endpointID == nil) - return nil; - // TODO: When hooked up to storage, enumerate this better - - return [self.temporaryMetaDataCache allKeys]; -} - -- (id _Nullable)clientDataForKey:(NSString *)key endpointID:(NSNumber *)endpointID -{ - if (key == nil || endpointID == nil) - return nil; - - return [self.temporaryMetaDataCache objectForKey:[NSString stringWithFormat:@"%@:%@", key, endpointID]]; -} - -- (void)setClientDataForKey:(NSString *)key endpointID:(NSNumber *)endpointID value:(id)value -{ - if (key == nil || value == nil || endpointID == nil) - return; - - if (self.temporaryMetaDataCache == nil) { - self.temporaryMetaDataCache = [NSMutableDictionary dictionary]; - } - - [self.temporaryMetaDataCache setObject:value forKey:[NSString stringWithFormat:@"%@:%@", key, endpointID]]; -} - -- (void)removeClientDataForKey:(NSString *)key endpointID:(NSNumber *)endpointID -{ - if (key == nil || endpointID == nil) - return; - - [self.temporaryMetaDataCache removeObjectForKey:[NSString stringWithFormat:@"%@:%@", key, endpointID]]; -} - #pragma mark Log Help - (nullable NSNumber *)_informationalNumberAtAttributePath:(MTRAttributePath *)attributePath @@ -3927,6 +3986,34 @@ - (NSNumber * _Nullable)_networkFeatures return result; } +- (void)controllerSuspended +{ + [super controllerSuspended]; + + std::lock_guard lock(self->_lock); + [self _resetSubscriptionWithReasonString:@"Controller suspended"]; + + // Ensure that any pre-existing resubscribe attempts we control don't try to + // do anything. + _reattemptingSubscription = NO; +} + +- (void)controllerResumed +{ + [super controllerResumed]; + + std::lock_guard lock(self->_lock); + + if (![self _delegateExists]) { + MTR_LOG("%@ ignoring controller resume: no delegates", self); + return; + } + + // Use _ensureSubscriptionForExistingDelegates so that the subscriptions + // will go through the pool as needed, not necessarily happen immediately. + [self _ensureSubscriptionForExistingDelegates:@"Controller resumed"]; +} + @end /* BEGIN DRAGONS: Note methods here cannot be renamed, and are used by private callers, do not rename, remove or modify behavior here */ diff --git a/src/darwin/Framework/CHIP/MTRDevice_Internal.h b/src/darwin/Framework/CHIP/MTRDevice_Internal.h index dae183eec217f6..7a91b926560f30 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_Internal.h +++ b/src/darwin/Framework/CHIP/MTRDevice_Internal.h @@ -120,8 +120,19 @@ MTR_DIRECT_MEMBERS // Our controller. Declared nullable because our property is, though in // practice it does not look like we ever set it to nil. MTRDeviceController * _Nullable _deviceController; + + // Whether this device has been accessed via the public deviceWithNodeID API + // (as opposed to just via the internal _deviceWithNodeID). + BOOL _accessedViaPublicAPI; } +/** + * Internal way of creating an MTRDevice that does not flag the device as being + * visible to external API consumers. + */ ++ (MTRDevice *)_deviceWithNodeID:(NSNumber *)nodeID + controller:(MTRDeviceController *)controller; + - (instancetype)initForSubclassesWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller; - (instancetype)initWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller; @@ -185,12 +196,27 @@ MTR_DIRECT_MEMBERS - (BOOL)_delegateExists; +// Must be called by subclasses or MTRDevice implementation only. +- (void)_delegateAdded; + #ifdef DEBUG // Only used for unit test purposes - normal delegate should not expect or handle being called back synchronously // Returns YES if a delegate is called - (void)_callFirstDelegateSynchronouslyWithBlock:(void (^)(id delegate))block; #endif +// Used to generate attribute report that contains all known attributes, taking into consideration expected values +- (NSArray *> *)getAllAttributesReport; + +// Hooks for controller suspend/resume. +- (void)controllerSuspended; +- (void)controllerResumed; + +@end + +#pragma mark - MTRDevice internal state monitoring +@protocol MTRDeviceInternalStateDelegate +- (void)devicePrivateInternalStateChanged:(MTRDevice *)device internalState:(NSDictionary *)state; @end #pragma mark - Constants @@ -206,4 +232,13 @@ static NSString * const sLastInitialSubscribeLatencyKey = @"lastInitialSubscribe // Declared inside platform, but noting here for reference // static NSString * const kSRPTimeoutInMsecsUserDefaultKey = @"SRPTimeoutInMSecsOverride"; +// Concrete to XPC internal state property dictionary keys +static NSString * const kMTRDeviceInternalPropertyKeyVendorID = @"MTRDeviceInternalStateKeyVendorID"; +static NSString * const kMTRDeviceInternalPropertyKeyProductID = @"MTRDeviceInternalStateKeyProductID"; +static NSString * const kMTRDeviceInternalPropertyNetworkFeatures = @"MTRDeviceInternalPropertyNetworkFeatures"; +static NSString * const kMTRDeviceInternalPropertyDeviceState = @"MTRDeviceInternalPropertyDeviceState"; +static NSString * const kMTRDeviceInternalPropertyLastSubscriptionAttemptWait = @"kMTRDeviceInternalPropertyLastSubscriptionAttemptWait"; +static NSString * const kMTRDeviceInternalPropertyMostRecentReportTime = @"MTRDeviceInternalPropertyMostRecentReportTime"; +static NSString * const kMTRDeviceInternalPropertyLastSubscriptionFailureTime = @"MTRDeviceInternalPropertyLastSubscriptionFailureTime"; + NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDevice_XPC.mm b/src/darwin/Framework/CHIP/MTRDevice_XPC.mm index 85be0db3436df9..46f143e4bc189e 100644 --- a/src/darwin/Framework/CHIP/MTRDevice_XPC.mm +++ b/src/darwin/Framework/CHIP/MTRDevice_XPC.mm @@ -44,6 +44,7 @@ #import "MTRDeviceController_XPC.h" #import "MTRDevice_Concrete.h" #import "MTRDevice_Internal.h" +#import "MTRDevice_XPC_Internal.h" #import "MTRError_Internal.h" #import "MTRKeypair.h" #import "MTRLogging_Internal.h" @@ -82,6 +83,8 @@ @implementation MTRDevice_XPC +@synthesize _internalState; + - (instancetype)initWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller { // TODO: Verify that this is a valid MTRDeviceController_XPC? @@ -93,14 +96,42 @@ - (instancetype)initWithNodeID:(NSNumber *)nodeID controller:(MTRDeviceControlle return self; } +- (void)dealloc +{ + [self _setInternalState:nil]; +} + - (NSString *)description { - // TODO: Figure out whether, and if so how, to log: VID, PID, WiFi, Thread, - // internalDeviceState (do we even have such a thing here?), last - // subscription attempt wait (does that apply to us?) queued work (do we - // have any?), last report, last subscription failure (does that apply to us?). + NSString * wifi; + NSString * thread; + NSNumber * networkFeatures = [self._internalState objectForKey:kMTRDeviceInternalPropertyNetworkFeatures]; + + if (networkFeatures == nil) { + wifi = @"NO"; + thread = @"NO"; + } else { + wifi = YES_NO(networkFeatures.unsignedLongLongValue & MTRNetworkCommissioningFeatureWiFiNetworkInterface); + thread = YES_NO(networkFeatures.unsignedLongLongValue & MTRNetworkCommissioningFeatureThreadNetworkInterface); + } + + // TODO: Add these to the description + // MTR_OPTIONAL_ATTRIBUTE(kMTRDeviceInternalPropertyDeviceState, _internalDeviceStateForDescription, properties); + // MTR_OPTIONAL_ATTRIBUTE(kMTRDeviceInternalPropertyLastSubscriptionAttemptWait, _lastSubscriptionAttemptWaitForDescription, properties); + // MTR_OPTIONAL_ATTRIBUTE(kMTRDeviceInternalPropertyMostRecentReportTime, _mostRecentReportTimeForDescription, properties); + // MTR_OPTIONAL_ATTRIBUTE(kMTRDeviceInternalPropertyLastSubscriptionFailureTime, _lastSubscriptionFailureTimeForDescription, properties); + return [NSString - stringWithFormat:@"", self, _deviceController.compressedFabricID.unsignedLongLongValue, _nodeID.unsignedLongLongValue, _nodeID.unsignedLongLongValue, _deviceController.uniqueIdentifier]; + stringWithFormat:@"<%@: %p, node: %016llX-%016llX (%llu), VID: %@, PID: %@, WiFi: %@, Thread: %@, controller: %@>", + NSStringFromClass(self.class), self, + _deviceController.compressedFabricID.unsignedLongLongValue, + _nodeID.unsignedLongLongValue, + _nodeID.unsignedLongLongValue, + [self._internalState objectForKey:kMTRDeviceInternalPropertyKeyVendorID], + [self._internalState objectForKey:kMTRDeviceInternalPropertyKeyProductID], + wifi, + thread, + _deviceController.uniqueIdentifier]; } #pragma mark - Client Callbacks (MTRDeviceDelegate) @@ -159,6 +190,12 @@ - (oneway void)deviceConfigurationChanged:(NSNumber *)nodeID }]; } +- (oneway void)device:(NSNumber *)nodeID internalStateUpdated:(NSDictionary *)dictionary +{ + [self _setInternalState:dictionary]; + MTR_LOG("%@ internal state updated", self); +} + #pragma mark - Remote Commands MTR_DEVICE_SIMPLE_REMOTE_XPC_GETTER(state, MTRDeviceState, MTRDeviceStateUnknown, getStateWithReply) @@ -226,43 +263,6 @@ - (void)_invokeCommandWithEndpointID:(NSNumber *)endpointID // Not Supported via XPC //- (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID openCommissioningWindowWithSetupPasscode:(NSNumber *)setupPasscode discriminator:(NSNumber *)discriminator duration:(NSNumber *)duration completion:(MTRDeviceOpenCommissioningWindowHandler)completion; -MTR_DEVICE_SIMPLE_REMOTE_XPC_GETTER(clientDataKeys, NSArray * _Nullable, nil, getClientDataKeysWithReply) -MTR_DEVICE_COMPLEX_REMOTE_XPC_GETTER(clientDataForKey - : (NSString *) key, id _Nullable, nil, clientDataForKey - : key withReply) - -MTR_DEVICE_SIMPLE_REMOTE_XPC_COMMAND(setClientDataForKey - : (NSString *) key value - : (id) value, setClientDataForKey - : key value - : value) -MTR_DEVICE_SIMPLE_REMOTE_XPC_COMMAND(removeClientDataForKey - : (NSString *) key, removeClientDataForKey - : key) - -MTR_DEVICE_COMPLEX_REMOTE_XPC_GETTER(clientDataKeysForEndpointID - : (NSNumber *) endpointID, NSArray * _Nullable, nil, clientDataKeysForEndpointID - : (NSNumber *) endpointID withReply) -MTR_DEVICE_COMPLEX_REMOTE_XPC_GETTER(clientDataForKey - : (NSString *) key endpointID - : (NSNumber *) endpointID, id _Nullable, nil, clientDataForKey - : key endpointID - : endpointID withReply) - -MTR_DEVICE_SIMPLE_REMOTE_XPC_COMMAND(setClientDataForKey - : (NSString *) key endpointID - : (NSNumber *) endpointID value - : (id) value, setClientDataForKey - : key endpointID - : endpointID value - : value) -MTR_DEVICE_SIMPLE_REMOTE_XPC_COMMAND(removeClientDataForKey - : (NSString *) key endpointID - : (NSNumber *) endpointID value - : (id) value, removeClientDataForKey - : key endpointID - : endpointID) - // Not Supported via XPC // - (oneway void)downloadLogOfType:(MTRDiagnosticLogType)type nodeID:(NSNumber *)nodeID timeout:(NSTimeInterval)timeout completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion; diff --git a/src/darwin/Framework/CHIP/MTRDevice_XPC_Internal.h b/src/darwin/Framework/CHIP/MTRDevice_XPC_Internal.h new file mode 100644 index 00000000000000..6cbc82d54cb36c --- /dev/null +++ b/src/darwin/Framework/CHIP/MTRDevice_XPC_Internal.h @@ -0,0 +1,26 @@ +/** + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#import "MTRDevice_XPC.h" +#import + +NS_ASSUME_NONNULL_BEGIN + +@interface MTRDevice_XPC () +@property (nullable, atomic, readwrite, retain, getter=_internalState, setter=_setInternalState:) NSDictionary * _internalState; +@end + +NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDiagnosticLogsDownloader.h b/src/darwin/Framework/CHIP/MTRDiagnosticLogsDownloader.h index f10fea520fb4fb..da7a780c1237f0 100644 --- a/src/darwin/Framework/CHIP/MTRDiagnosticLogsDownloader.h +++ b/src/darwin/Framework/CHIP/MTRDiagnosticLogsDownloader.h @@ -31,12 +31,17 @@ NS_ASSUME_NONNULL_BEGIN @interface MTRDiagnosticLogsDownloader : NSObject - (chip::bdx::BDXTransferServerDelegate *)getBridge; +// Must be called on Matter queue - (void)downloadLogFromNodeWithID:(NSNumber *)nodeID controller:(MTRDeviceController *)controller type:(MTRDiagnosticLogType)type timeout:(NSTimeInterval)timeout queue:(dispatch_queue_t)queue completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion; + +// Must be called on Matter queue +- (void)abortDownloadsForController:(MTRDeviceController *)controller; + @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIP/MTRDiagnosticLogsDownloader.mm b/src/darwin/Framework/CHIP/MTRDiagnosticLogsDownloader.mm index d412f5a497c3ce..69dfb86d1da40f 100644 --- a/src/darwin/Framework/CHIP/MTRDiagnosticLogsDownloader.mm +++ b/src/darwin/Framework/CHIP/MTRDiagnosticLogsDownloader.mm @@ -16,10 +16,13 @@ */ #import "MTRDiagnosticLogsDownloader.h" +#import +#include +#include #include +#include -#import "MTRDeviceControllerFactory_Internal.h" #import "MTRDeviceController_Internal.h" #import "MTRError_Internal.h" #import "MTRLogging_Internal.h" @@ -82,6 +85,9 @@ - (MTRDownload * _Nullable)add:(MTRDiagnosticLogType)type queue:(dispatch_queue_t)queue completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion done:(void (^)(MTRDownload * finishedDownload))done; + +- (void)abortDownloadsForController:(MTRDeviceController *)controller; + @end @interface MTRDiagnosticLogsDownloader () @@ -348,6 +354,21 @@ - (MTRDownload * _Nullable)add:(MTRDiagnosticLogType)type return download; } +- (void)abortDownloadsForController:(MTRDeviceController *)controller +{ + assertChipStackLockedByCurrentThread(); + + auto fabricIndex = @(controller.fabricIndex); + for (MTRDownload * download in [_downloads copy]) { + if (![download.fabricIndex isEqual:fabricIndex]) { + continue; + } + + [download failure:[MTRError errorForCHIPErrorCode:CHIP_ERROR_CANCELLED]]; + [self remove:download]; + } +} + - (void)remove:(MTRDownload *)download { assertChipStackLockedByCurrentThread(); @@ -425,15 +446,15 @@ - (void)downloadLogFromNodeWithID:(NSNumber *)nodeID [download checkInteractionModelResponse:response error:error]; }; - auto * device = [controller deviceForNodeID:nodeID]; - auto * cluster = [[MTRClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(kDiagnosticLogsEndPoint) queue:queue]; + auto * device = [MTRBaseDevice deviceWithNodeID:nodeID controller:controller]; + auto * cluster = [[MTRBaseClusterDiagnosticLogs alloc] initWithDevice:device endpointID:@(kDiagnosticLogsEndPoint) queue:queue]; auto * params = [[MTRDiagnosticLogsClusterRetrieveLogsRequestParams alloc] init]; params.intent = @(type); params.requestedProtocol = @(MTRDiagnosticLogsTransferProtocolBDX); params.transferFileDesignator = download.fileDesignator; - [cluster retrieveLogsRequestWithParams:params expectedValues:nil expectedValueInterval:nil completion:interactionModelDone]; + [cluster retrieveLogsRequestWithParams:params completion:interactionModelDone]; if (timeoutInSeconds > 0) { auto err = _bridge->StartBDXTransferTimeout(download, timeoutInSeconds); @@ -441,6 +462,13 @@ - (void)downloadLogFromNodeWithID:(NSNumber *)nodeID } } +- (void)abortDownloadsForController:(MTRDeviceController *)controller; +{ + assertChipStackLockedByCurrentThread(); + + [_downloads abortDownloadsForController:controller]; +} + - (void)handleBDXTransferSessionBeginForFileDesignator:(NSString *)fileDesignator fabricIndex:(NSNumber *)fabricIndex nodeID:(NSNumber *)nodeID diff --git a/src/darwin/Framework/CHIP/MTRError_Internal.h b/src/darwin/Framework/CHIP/MTRError_Internal.h index af19f4888ff050..c79cc17d95f198 100644 --- a/src/darwin/Framework/CHIP/MTRError_Internal.h +++ b/src/darwin/Framework/CHIP/MTRError_Internal.h @@ -26,10 +26,6 @@ NS_ASSUME_NONNULL_BEGIN -#ifndef YES_NO -#define YES_NO(x) ((x) ? @"YES" : @"NO") -#endif - MTR_DIRECT_MEMBERS @interface MTRError : NSObject + (NSError *)errorWithCode:(MTRErrorCode)code; diff --git a/src/darwin/Framework/CHIP/ServerEndpoint/MTRIMDispatch.mm b/src/darwin/Framework/CHIP/ServerEndpoint/MTRIMDispatch.mm index 1e2b7dc636f4f2..d21242956b01bf 100644 --- a/src/darwin/Framework/CHIP/ServerEndpoint/MTRIMDispatch.mm +++ b/src/darwin/Framework/CHIP/ServerEndpoint/MTRIMDispatch.mm @@ -19,6 +19,7 @@ #include #include #include +#include #include #include @@ -39,8 +40,8 @@ void emberAfClusterInitCallback(EndpointId endpoint, ClusterId clusterId) // clusters dont use it. } -Protocols::InteractionModel::Status emAfWriteAttributeExternal(EndpointId endpoint, ClusterId cluster, AttributeId attributeID, uint8_t * dataPtr, - EmberAfAttributeType dataType) +Protocols::InteractionModel::Status emAfWriteAttributeExternal(const ConcreteAttributePath & path, + const EmberAfWriteDataInput & input) { assertChipStackLockedByCurrentThread(); diff --git a/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCClientProtocol.h b/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCClientProtocol.h index 3e276eb25f760d..cfa59db8a73303 100644 --- a/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCClientProtocol.h +++ b/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCClientProtocol.h @@ -27,6 +27,7 @@ MTR_NEWLY_AVAILABLE - (oneway void)deviceBecameActive:(NSNumber *)nodeID; - (oneway void)deviceCachePrimed:(NSNumber *)nodeID; - (oneway void)deviceConfigurationChanged:(NSNumber *)nodeID; +- (oneway void)device:(NSNumber *)nodeID internalStateUpdated:(NSDictionary *)dictionary; @end MTR_NEWLY_AVAILABLE diff --git a/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCServerProtocol.h b/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCServerProtocol.h index 81d6ab930cb6aa..eaaa4b655e18e9 100644 --- a/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCServerProtocol.h +++ b/src/darwin/Framework/CHIP/XPC Protocol/MTRXPCServerProtocol.h @@ -27,25 +27,14 @@ MTR_NEWLY_AVAILABLE - (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID getEstimatedSubscriptionLatencyWithReply:(void (^)(NSNumber * _Nullable estimatedSubscriptionLatency))reply; - (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID readAttributeWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID attributeID:(NSNumber *)attributeID params:(MTRReadParams * _Nullable)params withReply:(void (^)(NSDictionary * _Nullable))reply; -- (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID writeAttributeWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID attributeID:(NSNumber *)attributeID value:(id _Nullable)value expectedValueInterval:(NSNumber * _Nullable)expectedValueInterval timedWriteTimeout:(NSNumber * _Nullable)timeout; +- (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID writeAttributeWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID attributeID:(NSNumber *)attributeID value:(id)value expectedValueInterval:(NSNumber * _Nullable)expectedValueInterval timedWriteTimeout:(NSNumber * _Nullable)timeout; - (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID invokeCommandWithEndpointID:(NSNumber *)endpointID clusterID:(NSNumber *)clusterID commandID:(NSNumber *)commandID commandFields:(id)commandFields expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueInterval timedInvokeTimeout:(NSNumber * _Nullable)timeout serverSideProcessingTimeout:(NSNumber * _Nullable)serverSideProcessingTimeout completion:(MTRDeviceResponseHandler)completion; -// Not Supported via XPC -//- (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID openCommissioningWindowWithSetupPasscode:(NSNumber *)setupPasscode discriminator:(NSNumber *)discriminator duration:(NSNumber *)duration completion:(MTRDeviceOpenCommissioningWindowHandler)completion; +- (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID openCommissioningWindowWithSetupPasscode:(NSNumber *)setupPasscode discriminator:(NSNumber *)discriminator duration:(NSNumber *)duration completion:(MTRDeviceOpenCommissioningWindowHandler)completion; -- (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID getClientDataKeysWithReply:(void (^)(NSArray * _Nullable))reply; -- (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID clientDataForKey:(NSString *)key withReply:(void (^)(id _Nullable))reply; -- (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID setClientDataForKey:(NSString *)key value:(id)value; -- (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID removeClientDataForKey:(NSString *)key; -- (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID clientDataKeysForEndpointID:(NSNumber *)endpointID withReply:(void (^)(NSArray * _Nullable))reply; -- (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID clientDataForKey:(NSString *)key endpointID:(NSNumber *)endpointID withReply:(void (^)(id _Nullable))reply; -- (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID setClientDataForKey:(NSString *)key endpointID:(NSNumber *)endpointID value:(id _Nullable)value; -- (oneway void)deviceController:(NSUUID *)controller nodeID:(NSNumber *)nodeID removeClientDataForKey:(NSString *)key endpointID:(NSNumber *)endpointID; - -// Not Supported via XPC -// - (oneway void)downloadLogOfType:(MTRDiagnosticLogType)type nodeID:(NSNumber *)nodeID timeout:(NSTimeInterval)timeout completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion; +- (oneway void)downloadLogOfType:(MTRDiagnosticLogType)type nodeID:(NSNumber *)nodeID timeout:(NSTimeInterval)timeout completion:(void (^)(NSURL * _Nullable url, NSError * _Nullable error))completion; @end MTR_NEWLY_AVAILABLE @@ -55,21 +44,22 @@ MTR_NEWLY_AVAILABLE - (oneway void)deviceController:(NSUUID *)controller getUniqueIdentifierWithReply:(void (^)(NSUUID *))reply; - (oneway void)deviceController:(NSUUID *)controller controllerNodeIDWithReply:(void (^)(NSNumber * nodeID))reply; -// Not Supported via XPC -// - (oneway void)deviceController:(NSUUID *)controller setupCommissioningSessionWithPayload:(MTRSetupPayload *)payload newNodeID:(NSNumber *)newNodeID withReply:(void(^)(BOOL success, NSError * _Nullable error))reply; -// - (oneway void)deviceController:(NSUUID *)controller setupCommissioningSessionWithDiscoveredDevice:(MTRCommissionableBrowserResult *)discoveredDevice payload:(MTRSetupPayload *)payload newNodeID:(NSNumber *)newNodeID withReply:(void(^)(BOOL success, NSError * _Nullable error))reply; -// - (oneway void)deviceController:(NSUUID *)controller commissionNodeWithID:(NSNumber *)nodeID commissioningParams:(MTRCommissioningParameters *)commissioningParams withReply:(void(^)(BOOL success, NSError * _Nullable error))reply; -// - (oneway void)deviceController:(NSUUID *)controller continueCommissioningDevice:(void *)opaqueDeviceHandle ignoreAttestationFailure:(BOOL)ignoreAttestationFailure withReply:(void(^)(BOOL success, NSError * _Nullable error))reply; -// - (oneway void)deviceController:(NSUUID *)controller cancelCommissioningForNodeID:(NSNumber *)nodeID withReply:(void(^)(BOOL success, NSError * _Nullable error))reply; +// - (oneway void)deviceController:(NSUUID *)controller setupCommissioningSessionWithPayload:(MTRSetupPayload *)payload newNodeID:(NSNumber *)newNodeID withReply:(void (^)(BOOL success, NSError * _Nullable error))reply; +// - (oneway void)deviceController:(NSUUID *)controller setupCommissioningSessionWithDiscoveredDevice:(MTRCommissionableBrowserResult *)discoveredDevice payload:(MTRSetupPayload *)payload newNodeID:(NSNumber *)newNodeID withReply:(void (^)(BOOL success, NSError * _Nullable error))reply; +// - (oneway void)deviceController:(NSUUID *)controller commissionNodeWithID:(NSNumber *)nodeID commissioningParams:(MTRCommissioningParameters *)commissioningParams withReply:(void (^)(BOOL success, NSError * _Nullable error))reply; +// - (oneway void)deviceController:(NSUUID *)controller continueCommissioningDevice:(void *)opaqueDeviceHandle ignoreAttestationFailure:(BOOL)ignoreAttestationFailure withReply:(void (^)(BOOL success, NSError * _Nullable error))reply; +// - (oneway void)deviceController:(NSUUID *)controller cancelCommissioningForNodeID:(NSNumber *)nodeID withReply:(void (^)(BOOL success, NSError * _Nullable error))reply; // - (nullable MTRBaseDevice *)deviceController:(NSUUID *)controller deviceBeingCommissionedWithNodeID:(NSNumber *)nodeID error:(NSError * __autoreleasing *)error; -// - (oneway void)deviceController:(NSUUID *)controller startBrowseForCommissionables:(id)delegate withReply:(void(^)(BOOL success))reply; -// - (oneway void)deviceController:(NSUUID *)controller stopBrowseForCommissionablesWithReply:(void(^)(BOOL success))reply; -// - (oneway void)deviceController:(NSUUID *)controller attestationChallengeForDeviceID:(NSNumber *)deviceID withReply:(void(^)(NSData * _Nullable))reply; +// - (oneway void)deviceController:(NSUUID *)controller startBrowseForCommissionables:(id)delegate withReply:(void (^)(BOOL success))reply; +// - (oneway void)deviceController:(NSUUID *)controller stopBrowseForCommissionablesWithReply:(void (^)(BOOL success))reply; +// - (oneway void)deviceController:(NSUUID *)controller attestationChallengeForDeviceID:(NSNumber *)deviceID withReply:(void (^)(NSData * _Nullable))reply; -//- (oneway void)deviceController:(NSUUID *)controller addServerEndpoint:(MTRServerEndpoint *)endpoint withReply:(void(^)(BOOL success))reply; -//- (oneway void)deviceController:(NSUUID *)controller removeServerEndpoint:(MTRServerEndpoint *)endpoint; +// - (oneway void)deviceController:(NSUUID *)controller addServerEndpoint:(MTRServerEndpoint *)endpoint withReply:(void (^)(BOOL success))reply; +// - (oneway void)deviceController:(NSUUID *)controller removeServerEndpoint:(MTRServerEndpoint *)endpoint; - (oneway void)deviceController:(NSUUID *)controller shutdownDeviceController:(NSUUID *)controller; +- (oneway void)deviceController:(NSUUID *)controller registerNodeID:(NSNumber *)nodeID; +- (oneway void)deviceController:(NSUUID *)controller unregisterNodeID:(NSNumber *)nodeID; @end diff --git a/src/darwin/Framework/CHIP/templates/availability.yaml b/src/darwin/Framework/CHIP/templates/availability.yaml index 2272d5256d934e..b46832a986d264 100644 --- a/src/darwin/Framework/CHIP/templates/availability.yaml +++ b/src/darwin/Framework/CHIP/templates/availability.yaml @@ -9681,16 +9681,6 @@ - Setpoints - Presets - MatterScheduleConfiguration - RVCRunMode: - Feature: - # Not really part of the spec, need to think about whether to - # expose this. - - NoFeatures - RVCCleanMode: - Feature: - # Not really part of the spec, need to think about whether to - # expose this. - - NoFeatures - release: "Future" versions: "future" @@ -9842,6 +9832,9 @@ BridgedDeviceBasicInformation: # Targeting 1.4 - ActiveChanged + OccupancySensing: + # Targeting 1.4 + - OccupancyChanged enums: AccessControl: # Targeting 1.4 @@ -9890,6 +9883,14 @@ Feature: # Targeting 1.4 - ActionSwitch + RVCCleanMode: + Feature: + # Targeting 1.4 + - DirectModeChange + RVCRunMode: + Feature: + # Targeting 1.4 + - DirectModeChange renames: enums: ColorControl: diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index 925ef9cb90f1dc..b2da0cf9db04ad 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -6060,9 +6060,6 @@ static BOOL AttributeIsSpecifiedInEcosystemInformationCluster(AttributeId aAttri { using namespace Clusters::EcosystemInformation; switch (aAttributeId) { - case Attributes::RemovedOn::Id: { - return YES; - } case Attributes::DeviceDirectory::Id: { return YES; } @@ -6687,6 +6684,12 @@ static BOOL AttributeIsSpecifiedInUnitTestingCluster(AttributeId aAttributeId) case Attributes::Unsupported::Id: { return YES; } + case Attributes::ReadFailureCode::Id: { + return YES; + } + case Attributes::FailureInt32U::Id: { + return YES; + } case Attributes::NullableBoolean::Id: { return YES; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm index 4b0e0bb96389b3..de61e4dd22cf7d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -17185,21 +17185,6 @@ static id _Nullable DecodeAttributeValueForEcosystemInformationCluster(Attribute { using namespace Clusters::EcosystemInformation; switch (aAttributeId) { - case Attributes::RemovedOn::Id: { - using TypeInfo = Attributes::RemovedOn::TypeInfo; - TypeInfo::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - NSNumber * _Nullable value; - if (cppValue.IsNull()) { - value = nil; - } else { - value = [NSNumber numberWithUnsignedLongLong:cppValue.Value()]; - } - return value; - } case Attributes::DeviceDirectory::Id: { using TypeInfo = Attributes::DeviceDirectory::TypeInfo; TypeInfo::DecodableType cppValue; @@ -19732,6 +19717,28 @@ static id _Nullable DecodeAttributeValueForUnitTestingCluster(AttributeId aAttri value = [NSNumber numberWithBool:cppValue]; return value; } + case Attributes::ReadFailureCode::Id: { + using TypeInfo = Attributes::ReadFailureCode::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedChar:cppValue]; + return value; + } + case Attributes::FailureInt32U::Id: { + using TypeInfo = Attributes::FailureInt32U::TypeInfo; + TypeInfo::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + NSNumber * _Nonnull value; + value = [NSNumber numberWithUnsignedInt:cppValue]; + return value; + } case Attributes::NullableBoolean::Id: { using TypeInfo = Attributes::NullableBoolean::TypeInfo; TypeInfo::DecodableType cppValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index f15337ff56f41c..2273d8ab191bd3 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -1012,7 +1012,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) * * This command signals to the service associated with the device vendor that the fabric administrator would like a review of the current restrictions on the accessing fabric. */ -- (void)reviewFabricRestrictionsWithParams:(MTRAccessControlClusterReviewFabricRestrictionsParams *)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)reviewFabricRestrictionsWithParams:(MTRAccessControlClusterReviewFabricRestrictionsParams *)params completion:(void (^)(MTRAccessControlClusterReviewFabricRestrictionsResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)readAttributeACLWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)writeAttributeACLWithValue:(NSArray * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -11910,7 +11910,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) /** * Cluster Occupancy Sensing * - * Attributes and commands for configuring occupancy sensing, and reporting occupancy status. + * The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRBaseClusterOccupancySensing : MTRGenericBaseCluster @@ -15114,12 +15114,6 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTRBaseClusterEcosystemInformation : MTRGenericBaseCluster -- (void)readAttributeRemovedOnWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; -- (void)subscribeAttributeRemovedOnWithParams:(MTRSubscribeParams *)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; -+ (void)readAttributeRemovedOnWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - - (void)readAttributeDeviceDirectoryWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (void)subscribeAttributeDeviceDirectoryWithParams:(MTRSubscribeParams *)params subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished @@ -16735,6 +16729,22 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); + (void)readAttributeUnsupportedWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (void)readAttributeReadFailureCodeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeReadFailureCodeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeReadFailureCodeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeReadFailureCodeWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeReadFailureCodeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + +- (void)readAttributeFailureInt32UWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeFailureInt32UWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeFailureInt32UWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)subscribeAttributeFailureInt32UWithParams:(MTRSubscribeParams *)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler MTR_PROVISIONALLY_AVAILABLE; ++ (void)readAttributeFailureInt32UWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; + - (void)readAttributeNullableBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)writeAttributeNullableBooleanWithValue:(NSNumber * _Nullable)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -18512,6 +18522,16 @@ typedef NS_ENUM(uint8_t, MTROvenCavityOperationalStateOperationalState) { } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint16_t, MTROvenModeModeTag) { + MTROvenModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTROvenModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTROvenModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTROvenModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTROvenModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTROvenModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTROvenModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTROvenModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTROvenModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTROvenModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, MTROvenModeModeTagBake MTR_PROVISIONALLY_AVAILABLE = 0x4000, MTROvenModeModeTagConvection MTR_PROVISIONALLY_AVAILABLE = 0x4001, MTROvenModeModeTagGrill MTR_PROVISIONALLY_AVAILABLE = 0x4002, @@ -18540,6 +18560,16 @@ typedef NS_OPTIONS(uint32_t, MTRModeSelectFeature) { } MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); typedef NS_ENUM(uint16_t, MTRLaundryWasherModeModeTag) { + MTRLaundryWasherModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRLaundryWasherModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRLaundryWasherModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRLaundryWasherModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRLaundryWasherModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRLaundryWasherModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRLaundryWasherModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRLaundryWasherModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRLaundryWasherModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRLaundryWasherModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, MTRLaundryWasherModeModeTagNormal MTR_PROVISIONALLY_AVAILABLE = 0x4000, MTRLaundryWasherModeModeTagDelicate MTR_PROVISIONALLY_AVAILABLE = 0x4001, MTRLaundryWasherModeModeTagHeavy MTR_PROVISIONALLY_AVAILABLE = 0x4002, @@ -18551,6 +18581,16 @@ typedef NS_OPTIONS(uint32_t, MTRLaundryWasherModeFeature) { } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint16_t, MTRRefrigeratorAndTemperatureControlledCabinetModeModeTag) { + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagRapidCool MTR_PROVISIONALLY_AVAILABLE = 0x4000, MTRRefrigeratorAndTemperatureControlledCabinetModeModeTagRapidFreeze MTR_PROVISIONALLY_AVAILABLE = 0x4001, } MTR_PROVISIONALLY_AVAILABLE; @@ -18572,6 +18612,16 @@ typedef NS_OPTIONS(uint32_t, MTRLaundryWasherControlsFeature) { } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint16_t, MTRRVCRunModeModeTag) { + MTRRVCRunModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRRVCRunModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRRVCRunModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRRVCRunModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRRVCRunModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRRVCRunModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRRVCRunModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRRVCRunModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRRVCRunModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRRVCRunModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, MTRRVCRunModeModeTagIdle MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4000, MTRRVCRunModeModeTagCleaning MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4001, MTRRVCRunModeModeTagMapping MTR_PROVISIONALLY_AVAILABLE = 0x4002, @@ -18589,10 +18639,20 @@ typedef NS_ENUM(uint8_t, MTRRVCRunModeStatusCode) { } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); typedef NS_OPTIONS(uint32_t, MTRRVCRunModeFeature) { - MTRRVCRunModeFeatureNoFeatures MTR_PROVISIONALLY_AVAILABLE = 0x0, + MTRRVCRunModeFeatureDirectModeChange MTR_PROVISIONALLY_AVAILABLE = 0x10000, } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); typedef NS_ENUM(uint16_t, MTRRVCCleanModeModeTag) { + MTRRVCCleanModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRRVCCleanModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRRVCCleanModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRRVCCleanModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRRVCCleanModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRRVCCleanModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRRVCCleanModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRRVCCleanModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRRVCCleanModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRRVCCleanModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, MTRRVCCleanModeModeTagDeepClean MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4000, MTRRVCCleanModeModeTagVacuum MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4001, MTRRVCCleanModeModeTagMop MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x4002, @@ -18603,7 +18663,7 @@ typedef NS_ENUM(uint8_t, MTRRVCCleanModeStatusCode) { } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); typedef NS_OPTIONS(uint32_t, MTRRVCCleanModeFeature) { - MTRRVCCleanModeFeatureNoFeatures MTR_PROVISIONALLY_AVAILABLE = 0x0, + MTRRVCCleanModeFeatureDirectModeChange MTR_PROVISIONALLY_AVAILABLE = 0x10000, } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); typedef NS_OPTIONS(uint32_t, MTRTemperatureControlFeature) { @@ -18617,6 +18677,16 @@ typedef NS_OPTIONS(uint32_t, MTRRefrigeratorAlarmAlarmBitmap) { } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint16_t, MTRDishwasherModeModeTag) { + MTRDishwasherModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDishwasherModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDishwasherModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDishwasherModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDishwasherModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRDishwasherModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRDishwasherModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRDishwasherModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRDishwasherModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRDishwasherModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, MTRDishwasherModeModeTagNormal MTR_PROVISIONALLY_AVAILABLE = 0x4000, MTRDishwasherModeModeTagHeavy MTR_PROVISIONALLY_AVAILABLE = 0x4001, MTRDishwasherModeModeTagLight MTR_PROVISIONALLY_AVAILABLE = 0x4002, @@ -18703,6 +18773,16 @@ typedef NS_OPTIONS(uint32_t, MTRDishwasherAlarmFeature) { } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint16_t, MTRMicrowaveOvenModeModeTag) { + MTRMicrowaveOvenModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRMicrowaveOvenModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRMicrowaveOvenModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRMicrowaveOvenModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRMicrowaveOvenModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRMicrowaveOvenModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRMicrowaveOvenModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRMicrowaveOvenModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRMicrowaveOvenModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRMicrowaveOvenModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, MTRMicrowaveOvenModeModeTagNormal MTR_PROVISIONALLY_AVAILABLE = 0x4000, MTRMicrowaveOvenModeModeTagDefrost MTR_PROVISIONALLY_AVAILABLE = 0x4001, } MTR_PROVISIONALLY_AVAILABLE; @@ -18732,6 +18812,10 @@ typedef NS_ENUM(uint8_t, MTROperationalState) { } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); typedef NS_ENUM(uint8_t, MTRRVCOperationalStateErrorState) { + MTRRVCOperationalStateErrorStateNoError MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRRVCOperationalStateErrorStateUnableToStartOrResume MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRRVCOperationalStateErrorStateUnableToCompleteOperation MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRRVCOperationalStateErrorStateCommandInvalidInState MTR_PROVISIONALLY_AVAILABLE = 0x03, MTRRVCOperationalStateErrorStateFailedToFindChargingDock MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x40, MTRRVCOperationalStateErrorStateStuck MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x41, MTRRVCOperationalStateErrorStateDustBinMissing MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x42, @@ -18743,6 +18827,10 @@ typedef NS_ENUM(uint8_t, MTRRVCOperationalStateErrorState) { } MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)); typedef NS_ENUM(uint8_t, MTRRVCOperationalStateOperationalState) { + MTRRVCOperationalStateOperationalStateStopped MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRRVCOperationalStateOperationalStateRunning MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRRVCOperationalStateOperationalStatePaused MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRRVCOperationalStateOperationalStateError MTR_PROVISIONALLY_AVAILABLE = 0x03, MTRRVCOperationalStateOperationalStateSeekingCharger MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x40, MTRRVCOperationalStateOperationalStateCharging MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x41, MTRRVCOperationalStateOperationalStateDocked MTR_AVAILABLE(ios(17.4), macos(14.4), watchos(10.4), tvos(17.4)) = 0x42, @@ -19192,6 +19280,16 @@ typedef NS_OPTIONS(uint32_t, MTRPowerTopologyFeature) { } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint16_t, MTREnergyEVSEModeModeTag) { + MTREnergyEVSEModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTREnergyEVSEModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTREnergyEVSEModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTREnergyEVSEModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTREnergyEVSEModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTREnergyEVSEModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTREnergyEVSEModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTREnergyEVSEModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTREnergyEVSEModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTREnergyEVSEModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, MTREnergyEVSEModeModeTagManual MTR_PROVISIONALLY_AVAILABLE = 0x4000, MTREnergyEVSEModeModeTagTimeOfUse MTR_PROVISIONALLY_AVAILABLE = 0x4001, MTREnergyEVSEModeModeTagSolarCharging MTR_PROVISIONALLY_AVAILABLE = 0x4002, @@ -19202,6 +19300,16 @@ typedef NS_OPTIONS(uint32_t, MTREnergyEVSEModeFeature) { } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint16_t, MTRWaterHeaterModeModeTag) { + MTRWaterHeaterModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRWaterHeaterModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRWaterHeaterModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRWaterHeaterModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRWaterHeaterModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRWaterHeaterModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRWaterHeaterModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRWaterHeaterModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRWaterHeaterModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRWaterHeaterModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, MTRWaterHeaterModeModeTagOff MTR_PROVISIONALLY_AVAILABLE = 0x4000, MTRWaterHeaterModeModeTagManual MTR_PROVISIONALLY_AVAILABLE = 0x4001, MTRWaterHeaterModeModeTagTimed MTR_PROVISIONALLY_AVAILABLE = 0x4002, @@ -19212,6 +19320,16 @@ typedef NS_OPTIONS(uint32_t, MTRWaterHeaterModeFeature) { } MTR_PROVISIONALLY_AVAILABLE; typedef NS_ENUM(uint16_t, MTRDeviceEnergyManagementModeModeTag) { + MTRDeviceEnergyManagementModeModeTagAuto MTR_PROVISIONALLY_AVAILABLE = 0x00, + MTRDeviceEnergyManagementModeModeTagQuick MTR_PROVISIONALLY_AVAILABLE = 0x01, + MTRDeviceEnergyManagementModeModeTagQuiet MTR_PROVISIONALLY_AVAILABLE = 0x02, + MTRDeviceEnergyManagementModeModeTagLowNoise MTR_PROVISIONALLY_AVAILABLE = 0x03, + MTRDeviceEnergyManagementModeModeTagLowEnergy MTR_PROVISIONALLY_AVAILABLE = 0x04, + MTRDeviceEnergyManagementModeModeTagVacation MTR_PROVISIONALLY_AVAILABLE = 0x05, + MTRDeviceEnergyManagementModeModeTagMin MTR_PROVISIONALLY_AVAILABLE = 0x06, + MTRDeviceEnergyManagementModeModeTagMax MTR_PROVISIONALLY_AVAILABLE = 0x07, + MTRDeviceEnergyManagementModeModeTagNight MTR_PROVISIONALLY_AVAILABLE = 0x08, + MTRDeviceEnergyManagementModeModeTagDay MTR_PROVISIONALLY_AVAILABLE = 0x09, MTRDeviceEnergyManagementModeModeTagNoOptimization MTR_PROVISIONALLY_AVAILABLE = 0x4000, MTRDeviceEnergyManagementModeModeTagDeviceOptimization MTR_PROVISIONALLY_AVAILABLE = 0x4001, MTRDeviceEnergyManagementModeModeTagLocalOptimization MTR_PROVISIONALLY_AVAILABLE = 0x4002, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 2c81423cfbb46a..84e03c5adeb430 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -7742,7 +7742,7 @@ - (nullable instancetype)initWithDevice:(MTRBaseDevice *)device @implementation MTRBaseClusterAccessControl -- (void)reviewFabricRestrictionsWithParams:(MTRAccessControlClusterReviewFabricRestrictionsParams *)params completion:(MTRStatusCompletion)completion +- (void)reviewFabricRestrictionsWithParams:(MTRAccessControlClusterReviewFabricRestrictionsParams *)params completion:(void (^)(MTRAccessControlClusterReviewFabricRestrictionsResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { params = [[MTRAccessControlClusterReviewFabricRestrictionsParams @@ -7750,7 +7750,7 @@ - (void)reviewFabricRestrictionsWithParams:(MTRAccessControlClusterReviewFabricR } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; @@ -7762,7 +7762,7 @@ - (void)reviewFabricRestrictionsWithParams:(MTRAccessControlClusterReviewFabricR commandPayload:params timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRAccessControlClusterReviewFabricRestrictionsResponseParams.class queue:self.callbackQueue completion:responseHandler]; } @@ -105332,42 +105332,6 @@ + (void)readAttributeClusterRevisionWithClusterStateCache:(MTRClusterStateCacheC @implementation MTRBaseClusterEcosystemInformation -- (void)readAttributeRemovedOnWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EcosystemInformation::Attributes::RemovedOn::TypeInfo; - [self.device _readKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:nil - queue:self.callbackQueue - completion:completion]; -} - -- (void)subscribeAttributeRemovedOnWithParams:(MTRSubscribeParams * _Nonnull)params - subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished - reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler -{ - using TypeInfo = EcosystemInformation::Attributes::RemovedOn::TypeInfo; - [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID - clusterID:@(TypeInfo::GetClusterId()) - attributeID:@(TypeInfo::GetAttributeId()) - params:params - queue:self.callbackQueue - reportHandler:reportHandler - subscriptionEstablished:subscriptionEstablished]; -} - -+ (void)readAttributeRemovedOnWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion -{ - using TypeInfo = EcosystemInformation::Attributes::RemovedOn::TypeInfo; - [clusterStateCacheContainer - _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) - clusterID:TypeInfo::GetClusterId() - attributeID:TypeInfo::GetAttributeId() - queue:queue - completion:completion]; -} - - (void)readAttributeDeviceDirectoryWithParams:(MTRReadParams * _Nullable)params completion:(void (^)(NSArray * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = EcosystemInformation::Attributes::DeviceDirectory::TypeInfo; @@ -120077,6 +120041,134 @@ + (void)readAttributeUnsupportedWithClusterStateCache:(MTRClusterStateCacheConta completion:completion]; } +- (void)readAttributeReadFailureCodeWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = UnitTesting::Attributes::ReadFailureCode::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeReadFailureCodeWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeReadFailureCodeWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeReadFailureCodeWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = UnitTesting::Attributes::ReadFailureCode::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedCharValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeReadFailureCodeWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = UnitTesting::Attributes::ReadFailureCode::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeReadFailureCodeWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = UnitTesting::Attributes::ReadFailureCode::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + +- (void)readAttributeFailureInt32UWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = UnitTesting::Attributes::FailureInt32U::TypeInfo; + [self.device _readKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:nil + queue:self.callbackQueue + completion:completion]; +} + +- (void)writeAttributeFailureInt32UWithValue:(NSNumber * _Nonnull)value completion:(MTRStatusCompletion)completion +{ + [self writeAttributeFailureInt32UWithValue:(NSNumber * _Nonnull) value params:nil completion:completion]; +} +- (void)writeAttributeFailureInt32UWithValue:(NSNumber * _Nonnull)value params:(MTRWriteParams * _Nullable)params completion:(MTRStatusCompletion)completion +{ + // Make a copy of params before we go async. + params = [params copy]; + value = [value copy]; + + auto * bridge = new MTRDefaultSuccessCallbackBridge(self.callbackQueue, ^(id _Nullable ignored, NSError * _Nullable error) { completion(error); }, ^(ExchangeManager & exchangeManager, const SessionHandle & session, DefaultSuccessCallbackType successCb, MTRErrorCallback failureCb, MTRCallbackBridgeBase * bridge) { + chip::Optional timedWriteTimeout; + if (params != nil) { + if (params.timedWriteTimeout != nil){ + timedWriteTimeout.SetValue(params.timedWriteTimeout.unsignedShortValue); + } + } + + ListFreer listFreer; + using TypeInfo = UnitTesting::Attributes::FailureInt32U::TypeInfo; + TypeInfo::Type cppValue; + cppValue = value.unsignedIntValue; + + chip::Controller::ClusterBase cppCluster(exchangeManager, session, self.endpointID.unsignedShortValue); + return cppCluster.WriteAttribute(cppValue, bridge, successCb, failureCb, timedWriteTimeout); }); + std::move(*bridge).DispatchAction(self.device); +} + +- (void)subscribeAttributeFailureInt32UWithParams:(MTRSubscribeParams * _Nonnull)params + subscriptionEstablished:(MTRSubscriptionEstablishedHandler _Nullable)subscriptionEstablished + reportHandler:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))reportHandler +{ + using TypeInfo = UnitTesting::Attributes::FailureInt32U::TypeInfo; + [self.device _subscribeToKnownAttributeWithEndpointID:self.endpointID + clusterID:@(TypeInfo::GetClusterId()) + attributeID:@(TypeInfo::GetAttributeId()) + params:params + queue:self.callbackQueue + reportHandler:reportHandler + subscriptionEstablished:subscriptionEstablished]; +} + ++ (void)readAttributeFailureInt32UWithClusterStateCache:(MTRClusterStateCacheContainer *)clusterStateCacheContainer endpoint:(NSNumber *)endpoint queue:(dispatch_queue_t)queue completion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion +{ + using TypeInfo = UnitTesting::Attributes::FailureInt32U::TypeInfo; + [clusterStateCacheContainer + _readKnownCachedAttributeWithEndpointID:static_cast([endpoint unsignedShortValue]) + clusterID:TypeInfo::GetClusterId() + attributeID:TypeInfo::GetAttributeId() + queue:queue + completion:completion]; +} + - (void)readAttributeNullableBooleanWithCompletion:(void (^)(NSNumber * _Nullable value, NSError * _Nullable error))completion { using TypeInfo = UnitTesting::Attributes::NullableBoolean::TypeInfo; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 33251439bbc237..3ab34174b53453 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -4897,9 +4897,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterContentAppObserverAttributeClusterRevisionID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeClusterRevisionID, // Cluster EcosystemInformation attributes - MTRAttributeIDTypeClusterEcosystemInformationAttributeRemovedOnID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, - MTRAttributeIDTypeClusterEcosystemInformationAttributeDeviceDirectoryID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, - MTRAttributeIDTypeClusterEcosystemInformationAttributeLocationDirectoryID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, + MTRAttributeIDTypeClusterEcosystemInformationAttributeDeviceDirectoryID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + MTRAttributeIDTypeClusterEcosystemInformationAttributeLocationDirectoryID MTR_PROVISIONALLY_AVAILABLE = 0x00000001, MTRAttributeIDTypeClusterEcosystemInformationAttributeGeneratedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeGeneratedCommandListID, MTRAttributeIDTypeClusterEcosystemInformationAttributeAcceptedCommandListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeAcceptedCommandListID, MTRAttributeIDTypeClusterEcosystemInformationAttributeEventListID MTR_PROVISIONALLY_AVAILABLE = MTRAttributeIDTypeGlobalAttributeEventListID, @@ -5767,6 +5766,8 @@ typedef NS_ENUM(uint32_t, MTRAttributeIDType) { MTRAttributeIDTypeClusterUnitTestingAttributeGlobalEnumID MTR_PROVISIONALLY_AVAILABLE = 0x00000033, MTRAttributeIDTypeClusterUnitTestingAttributeGlobalStructID MTR_PROVISIONALLY_AVAILABLE = 0x00000034, MTRAttributeIDTypeClusterUnitTestingAttributeUnsupportedID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x000000FF, + MTRAttributeIDTypeClusterUnitTestingAttributeReadFailureCodeID MTR_PROVISIONALLY_AVAILABLE = 0x00003000, + MTRAttributeIDTypeClusterUnitTestingAttributeFailureInt32UID MTR_PROVISIONALLY_AVAILABLE = 0x00003001, MTRAttributeIDTypeClusterUnitTestingAttributeNullableBooleanID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004000, MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap8ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004001, MTRAttributeIDTypeClusterUnitTestingAttributeNullableBitmap16ID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00004002, @@ -7142,8 +7143,7 @@ typedef NS_ENUM(uint32_t, MTREventIDType) { // Cluster AccessControl events MTREventIDTypeClusterAccessControlEventAccessControlEntryChangedID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000000, MTREventIDTypeClusterAccessControlEventAccessControlExtensionChangedID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000001, - MTREventIDTypeClusterAccessControlEventAccessRestrictionEntryChangedID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, - MTREventIDTypeClusterAccessControlEventFabricRestrictionReviewUpdateID MTR_PROVISIONALLY_AVAILABLE = 0x00000003, + MTREventIDTypeClusterAccessControlEventFabricRestrictionReviewUpdateID MTR_PROVISIONALLY_AVAILABLE = 0x00000002, // Cluster Actions deprecated event names MTRClusterActionsEventStateChangedID @@ -7494,6 +7494,11 @@ typedef NS_ENUM(uint32_t, MTREventIDType) { MTREventIDTypeClusterPumpConfigurationAndControlEventAirDetectionID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x0000000F, MTREventIDTypeClusterPumpConfigurationAndControlEventTurbineOperationID MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) = 0x00000010, + // Cluster OccupancySensing deprecated event names + + // Cluster OccupancySensing events + MTREventIDTypeClusterOccupancySensingEventOccupancyChangedID MTR_PROVISIONALLY_AVAILABLE = 0x00000000, + // Cluster TargetNavigator deprecated event names // Cluster TargetNavigator events diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm index d3715b49d0d250..f5beab931c57fa 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm @@ -8342,10 +8342,6 @@ switch (attributeID) { // Cluster EcosystemInformation attributes - case MTRAttributeIDTypeClusterEcosystemInformationAttributeRemovedOnID: - result = @"RemovedOn"; - break; - case MTRAttributeIDTypeClusterEcosystemInformationAttributeDeviceDirectoryID: result = @"DeviceDirectory"; break; @@ -9175,6 +9171,14 @@ result = @"Unsupported"; break; + case MTRAttributeIDTypeClusterUnitTestingAttributeReadFailureCodeID: + result = @"ReadFailureCode"; + break; + + case MTRAttributeIDTypeClusterUnitTestingAttributeFailureInt32UID: + result = @"FailureInt32U"; + break; + case MTRAttributeIDTypeClusterUnitTestingAttributeNullableBooleanID: result = @"NullableBoolean"; break; @@ -9511,10 +9515,6 @@ result = @"AccessControlExtensionChanged"; break; - case MTREventIDTypeClusterAccessControlEventAccessRestrictionEntryChangedID: - result = @"AccessRestrictionEntryChanged"; - break; - case MTREventIDTypeClusterAccessControlEventFabricRestrictionReviewUpdateID: result = @"FabricRestrictionReviewUpdate"; break; @@ -10764,6 +10764,11 @@ switch (eventID) { + // Cluster OccupancySensing events + case MTREventIDTypeClusterOccupancySensingEventOccupancyChangedID: + result = @"OccupancyChanged"; + break; + default: result = [NSString stringWithFormat:@"", eventID]; break; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index 9db1460dbcb609..e2197784a01237 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -510,7 +510,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRClusterAccessControl : MTRGenericCluster -- (void)reviewFabricRestrictionsWithParams:(MTRAccessControlClusterReviewFabricRestrictionsParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion MTR_PROVISIONALLY_AVAILABLE; +- (void)reviewFabricRestrictionsWithParams:(MTRAccessControlClusterReviewFabricRestrictionsParams *)params expectedValues:(NSArray *> * _Nullable)expectedDataValueDictionaries expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRAccessControlClusterReviewFabricRestrictionsResponseParams * _Nullable data, NSError * _Nullable error))completion MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeACLWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)writeAttributeACLWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); @@ -5496,7 +5496,7 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) /** * Cluster Occupancy Sensing - * Attributes and commands for configuring occupancy sensing, and reporting occupancy status. + * The server cluster provides an interface to occupancy sensing functionality based on one or more sensing modalities, including configuration and provision of notifications of occupancy status. */ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @interface MTRClusterOccupancySensing : MTRGenericCluster @@ -7012,8 +7012,6 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTRClusterEcosystemInformation : MTRGenericCluster -- (NSDictionary * _Nullable)readAttributeRemovedOnWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - - (NSDictionary * _Nullable)readAttributeDeviceDirectoryWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; - (NSDictionary * _Nullable)readAttributeLocationDirectoryWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; @@ -7650,6 +7648,14 @@ MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)) - (void)writeAttributeUnsupportedWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)writeAttributeUnsupportedWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); +- (NSDictionary * _Nullable)readAttributeReadFailureCodeWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeReadFailureCodeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeReadFailureCodeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + +- (NSDictionary * _Nullable)readAttributeFailureInt32UWithParams:(MTRReadParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeFailureInt32UWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_PROVISIONALLY_AVAILABLE; +- (void)writeAttributeFailureInt32UWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_PROVISIONALLY_AVAILABLE; + - (NSDictionary * _Nullable)readAttributeNullableBooleanWithParams:(MTRReadParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)writeAttributeNullableBooleanWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); - (void)writeAttributeNullableBooleanWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params MTR_AVAILABLE(ios(16.4), macos(13.3), watchos(9.4), tvos(16.4)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 73ff54e52e36f2..26d1ec95ecf1f6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -1617,7 +1617,7 @@ - (instancetype)initWithDevice:(MTRDevice *)device endpoint:(uint16_t)endpoint q @implementation MTRClusterAccessControl -- (void)reviewFabricRestrictionsWithParams:(MTRAccessControlClusterReviewFabricRestrictionsParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(MTRStatusCompletion)completion +- (void)reviewFabricRestrictionsWithParams:(MTRAccessControlClusterReviewFabricRestrictionsParams *)params expectedValues:(NSArray *> * _Nullable)expectedValues expectedValueInterval:(NSNumber * _Nullable)expectedValueIntervalMs completion:(void (^)(MTRAccessControlClusterReviewFabricRestrictionsResponseParams * _Nullable data, NSError * _Nullable error))completion { if (params == nil) { params = [[MTRAccessControlClusterReviewFabricRestrictionsParams @@ -1625,7 +1625,7 @@ - (void)reviewFabricRestrictionsWithParams:(MTRAccessControlClusterReviewFabricR } auto responseHandler = ^(id _Nullable response, NSError * _Nullable error) { - completion(error); + completion(response, error); }; auto * timedInvokeTimeoutMs = params.timedInvokeTimeoutMs; @@ -1639,7 +1639,7 @@ - (void)reviewFabricRestrictionsWithParams:(MTRAccessControlClusterReviewFabricR expectedValueInterval:expectedValueIntervalMs timedInvokeTimeout:timedInvokeTimeoutMs serverSideProcessingTimeout:params.serverSideProcessingTimeout - responseClass:nil + responseClass:MTRAccessControlClusterReviewFabricRestrictionsResponseParams.class queue:self.callbackQueue completion:responseHandler]; } @@ -20000,11 +20000,6 @@ - (void)contentAppMessageWithParams:(MTRContentAppObserverClusterContentAppMessa @implementation MTRClusterEcosystemInformation -- (NSDictionary * _Nullable)readAttributeRemovedOnWithParams:(MTRReadParams * _Nullable)params -{ - return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEcosystemInformationID) attributeID:@(MTRAttributeIDTypeClusterEcosystemInformationAttributeRemovedOnID) params:params]; -} - - (NSDictionary * _Nullable)readAttributeDeviceDirectoryWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeEcosystemInformationID) attributeID:@(MTRAttributeIDTypeClusterEcosystemInformationAttributeDeviceDirectoryID) params:params]; @@ -22548,6 +22543,38 @@ - (void)writeAttributeUnsupportedWithValue:(NSDictionary *)dataV [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeUnsupportedID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; } +- (NSDictionary * _Nullable)readAttributeReadFailureCodeWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeReadFailureCodeID) params:params]; +} + +- (void)writeAttributeReadFailureCodeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeReadFailureCodeWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeReadFailureCodeWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeReadFailureCodeID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + +- (NSDictionary * _Nullable)readAttributeFailureInt32UWithParams:(MTRReadParams * _Nullable)params +{ + return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFailureInt32UID) params:params]; +} + +- (void)writeAttributeFailureInt32UWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs +{ + [self writeAttributeFailureInt32UWithValue:dataValueDictionary expectedValueInterval:expectedValueIntervalMs params:nil]; +} +- (void)writeAttributeFailureInt32UWithValue:(NSDictionary *)dataValueDictionary expectedValueInterval:(NSNumber *)expectedValueIntervalMs params:(MTRWriteParams * _Nullable)params +{ + NSNumber * timedWriteTimeout = params.timedWriteTimeout; + + [self.device writeAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeFailureInt32UID) value:dataValueDictionary expectedValueInterval:expectedValueIntervalMs timedWriteTimeout:timedWriteTimeout]; +} + - (NSDictionary * _Nullable)readAttributeNullableBooleanWithParams:(MTRReadParams * _Nullable)params { return [self.device readAttributeWithEndpointID:self.endpointID clusterID:@(MTRClusterIDTypeUnitTestingID) attributeID:@(MTRAttributeIDTypeClusterUnitTestingAttributeNullableBooleanID) params:params]; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index a5934b16975260..05bcb8213b6df9 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -3019,6 +3019,8 @@ MTR_PROVISIONALLY_AVAILABLE @interface MTRBridgedDeviceBasicInformationClusterKeepActiveParams : NSObject @property (nonatomic, copy) NSNumber * _Nonnull stayActiveDuration MTR_PROVISIONALLY_AVAILABLE; + +@property (nonatomic, copy) NSNumber * _Nonnull timeoutMs MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * @@ -10892,11 +10894,11 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTRCommissionerControlClusterRequestCommissioningApprovalParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull requestId MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull requestID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull vendorId MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull vendorID MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull productId MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull productID MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSString * _Nullable label MTR_PROVISIONALLY_AVAILABLE; /** @@ -10928,13 +10930,9 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTRCommissionerControlClusterCommissionNodeParams : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull requestId MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull requestID MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull responseTimeoutSeconds MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSData * _Nullable ipAddress MTR_PROVISIONALLY_AVAILABLE; - -@property (nonatomic, copy) NSNumber * _Nullable port MTR_PROVISIONALLY_AVAILABLE; /** * Controls whether the command is a timed command (using Timed Invoke). * diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index 5ae975508e9b75..87aacfd377eb82 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -7934,6 +7934,8 @@ - (instancetype)init if (self = [super init]) { _stayActiveDuration = @(0); + + _timeoutMs = @(0); _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -7945,6 +7947,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; auto other = [[MTRBridgedDeviceBasicInformationClusterKeepActiveParams alloc] init]; other.stayActiveDuration = self.stayActiveDuration; + other.timeoutMs = self.timeoutMs; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -7953,7 +7956,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: stayActiveDuration:%@; >", NSStringFromClass([self class]), _stayActiveDuration]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: stayActiveDuration:%@; timeoutMs:%@; >", NSStringFromClass([self class]), _stayActiveDuration, _timeoutMs]; return descriptionString; } @@ -7968,6 +7971,9 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader { encodableStruct.stayActiveDuration = self.stayActiveDuration.unsignedIntValue; } + { + encodableStruct.timeoutMs = self.timeoutMs.unsignedIntValue; + } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { @@ -31474,11 +31480,11 @@ - (instancetype)init { if (self = [super init]) { - _requestId = @(0); + _requestID = @(0); - _vendorId = @(0); + _vendorID = @(0); - _productId = @(0); + _productID = @(0); _label = nil; _timedInvokeTimeoutMs = nil; @@ -31491,9 +31497,9 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRCommissionerControlClusterRequestCommissioningApprovalParams alloc] init]; - other.requestId = self.requestId; - other.vendorId = self.vendorId; - other.productId = self.productId; + other.requestID = self.requestID; + other.vendorID = self.vendorID; + other.productID = self.productID; other.label = self.label; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -31503,7 +31509,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: requestId:%@; vendorId:%@; productId:%@; label:%@; >", NSStringFromClass([self class]), _requestId, _vendorId, _productId, _label]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: requestID:%@; vendorID:%@; productID:%@; label:%@; >", NSStringFromClass([self class]), _requestID, _vendorID, _productID, _label]; return descriptionString; } @@ -31516,13 +31522,13 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader chip::app::Clusters::CommissionerControl::Commands::RequestCommissioningApproval::Type encodableStruct; ListFreer listFreer; { - encodableStruct.requestId = self.requestId.unsignedLongLongValue; + encodableStruct.requestID = self.requestID.unsignedLongLongValue; } { - encodableStruct.vendorId = static_cast>(self.vendorId.unsignedShortValue); + encodableStruct.vendorID = static_cast>(self.vendorID.unsignedShortValue); } { - encodableStruct.productId = self.productId.unsignedShortValue; + encodableStruct.productID = self.productID.unsignedShortValue; } { if (self.label != nil) { @@ -31574,13 +31580,9 @@ - (instancetype)init { if (self = [super init]) { - _requestId = @(0); + _requestID = @(0); _responseTimeoutSeconds = @(0); - - _ipAddress = nil; - - _port = nil; _timedInvokeTimeoutMs = nil; _serverSideProcessingTimeout = nil; } @@ -31591,10 +31593,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRCommissionerControlClusterCommissionNodeParams alloc] init]; - other.requestId = self.requestId; + other.requestID = self.requestID; other.responseTimeoutSeconds = self.responseTimeoutSeconds; - other.ipAddress = self.ipAddress; - other.port = self.port; other.timedInvokeTimeoutMs = self.timedInvokeTimeoutMs; other.serverSideProcessingTimeout = self.serverSideProcessingTimeout; @@ -31603,7 +31603,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: requestId:%@; responseTimeoutSeconds:%@; ipAddress:%@; port:%@; >", NSStringFromClass([self class]), _requestId, _responseTimeoutSeconds, [_ipAddress base64EncodedStringWithOptions:0], _port]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: requestID:%@; responseTimeoutSeconds:%@; >", NSStringFromClass([self class]), _requestID, _responseTimeoutSeconds]; return descriptionString; } @@ -31616,23 +31616,11 @@ - (CHIP_ERROR)_encodeToTLVReader:(chip::System::PacketBufferTLVReader &)reader chip::app::Clusters::CommissionerControl::Commands::CommissionNode::Type encodableStruct; ListFreer listFreer; { - encodableStruct.requestId = self.requestId.unsignedLongLongValue; + encodableStruct.requestID = self.requestID.unsignedLongLongValue; } { encodableStruct.responseTimeoutSeconds = self.responseTimeoutSeconds.unsignedShortValue; } - { - if (self.ipAddress != nil) { - auto & definedValue_0 = encodableStruct.ipAddress.Emplace(); - definedValue_0 = AsByteSpan(self.ipAddress); - } - } - { - if (self.port != nil) { - auto & definedValue_0 = encodableStruct.port.Emplace(); - definedValue_0 = self.port.unsignedShortValue; - } - } auto buffer = chip::System::PacketBufferHandle::New(chip::System::PacketBuffer::kMaxSizeWithoutReserve, 0); if (buffer.IsNull()) { diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index cb2e1800de750f..6ecc072f6b44a6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -304,23 +304,6 @@ static id _Nullable DecodeEventPayloadForAccessControlCluster(EventId aEventId, return value; } - case Events::AccessRestrictionEntryChanged::Id: { - Events::AccessRestrictionEntryChanged::DecodableType cppValue; - *aError = DataModel::Decode(aReader, cppValue); - if (*aError != CHIP_NO_ERROR) { - return nil; - } - - __auto_type * value = [MTRAccessControlClusterAccessRestrictionEntryChangedEvent new]; - - do { - NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedChar:cppValue.fabricIndex]; - value.fabricIndex = memberValue; - } while (0); - - return value; - } case Events::FabricRestrictionReviewUpdate::Id: { Events::FabricRestrictionReviewUpdate::DecodableType cppValue; *aError = DataModel::Decode(aReader, cppValue); @@ -337,31 +320,31 @@ static id _Nullable DecodeEventPayloadForAccessControlCluster(EventId aEventId, } while (0); do { NSString * _Nullable memberValue; - if (cppValue.instruction.IsNull()) { - memberValue = nil; - } else { + if (cppValue.instruction.HasValue()) { memberValue = AsString(cppValue.instruction.Value()); if (memberValue == nil) { CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; *aError = err; return nil; } + } else { + memberValue = nil; } value.instruction = memberValue; } while (0); do { NSString * _Nullable memberValue; - if (cppValue.redirectURL.IsNull()) { - memberValue = nil; - } else { - memberValue = AsString(cppValue.redirectURL.Value()); + if (cppValue.ARLRequestFlowUrl.HasValue()) { + memberValue = AsString(cppValue.ARLRequestFlowUrl.Value()); if (memberValue == nil) { CHIP_ERROR err = CHIP_ERROR_INVALID_ARGUMENT; *aError = err; return nil; } + } else { + memberValue = nil; } - value.redirectURL = memberValue; + value.arlRequestFlowUrl = memberValue; } while (0); do { NSNumber * _Nonnull memberValue; @@ -4099,6 +4082,23 @@ static id _Nullable DecodeEventPayloadForOccupancySensingCluster(EventId aEventI { using namespace Clusters::OccupancySensing; switch (aEventId) { + case Events::OccupancyChanged::Id: { + Events::OccupancyChanged::DecodableType cppValue; + *aError = DataModel::Decode(aReader, cppValue); + if (*aError != CHIP_NO_ERROR) { + return nil; + } + + __auto_type * value = [MTROccupancySensingClusterOccupancyChangedEvent new]; + + do { + NSNumber * _Nonnull memberValue; + memberValue = [NSNumber numberWithUnsignedChar:cppValue.occupancy.Raw()]; + value.occupancy = memberValue; + } while (0); + + return value; + } default: { break; } @@ -4606,13 +4606,13 @@ static id _Nullable DecodeEventPayloadForCommissionerControlCluster(EventId aEve do { NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedLongLong:cppValue.requestId]; - value.requestId = memberValue; + memberValue = [NSNumber numberWithUnsignedLongLong:cppValue.requestID]; + value.requestID = memberValue; } while (0); do { NSNumber * _Nonnull memberValue; - memberValue = [NSNumber numberWithUnsignedLongLong:cppValue.clientNodeId]; - value.clientNodeId = memberValue; + memberValue = [NSNumber numberWithUnsignedLongLong:cppValue.clientNodeID]; + value.clientNodeID = memberValue; } while (0); do { NSNumber * _Nonnull memberValue; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index fac8e1bdf7afe8..61aa5161dced29 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -151,16 +151,11 @@ MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)) @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_AVAILABLE(ios(16.1), macos(13.0), watchos(9.1), tvos(16.1)); @end -MTR_PROVISIONALLY_AVAILABLE -@interface MTRAccessControlClusterAccessRestrictionEntryChangedEvent : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_PROVISIONALLY_AVAILABLE; -@end - MTR_PROVISIONALLY_AVAILABLE @interface MTRAccessControlClusterFabricRestrictionReviewUpdateEvent : NSObject @property (nonatomic, copy) NSNumber * _Nonnull token MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSString * _Nullable instruction MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSString * _Nullable redirectURL MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSString * _Nullable arlRequestFlowUrl MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_PROVISIONALLY_AVAILABLE; @end @@ -1778,6 +1773,11 @@ MTR_PROVISIONALLY_AVAILABLE @property (nonatomic, copy) NSNumber * _Nonnull holdTimeDefault MTR_PROVISIONALLY_AVAILABLE; @end +MTR_PROVISIONALLY_AVAILABLE +@interface MTROccupancySensingClusterOccupancyChangedEvent : NSObject +@property (nonatomic, copy) NSNumber * _Nonnull occupancy MTR_PROVISIONALLY_AVAILABLE; +@end + MTR_PROVISIONALLY_AVAILABLE @interface MTRThreadNetworkDirectoryClusterThreadNetworkStruct : NSObject @property (nonatomic, copy) NSData * _Nonnull extendedPanID MTR_PROVISIONALLY_AVAILABLE; @@ -2145,8 +2145,8 @@ MTR_PROVISIONALLY_AVAILABLE MTR_PROVISIONALLY_AVAILABLE @interface MTRCommissionerControlClusterCommissioningRequestResultEvent : NSObject -@property (nonatomic, copy) NSNumber * _Nonnull requestId MTR_PROVISIONALLY_AVAILABLE; -@property (nonatomic, copy) NSNumber * _Nonnull clientNodeId MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull requestID MTR_PROVISIONALLY_AVAILABLE; +@property (nonatomic, copy) NSNumber * _Nonnull clientNodeID MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull statusCode MTR_PROVISIONALLY_AVAILABLE; @property (nonatomic, copy) NSNumber * _Nonnull fabricIndex MTR_PROVISIONALLY_AVAILABLE; @end diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index f24ca05abfb4eb..5cb5806c112a69 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -532,33 +532,6 @@ - (NSString *)description @end -@implementation MTRAccessControlClusterAccessRestrictionEntryChangedEvent -- (instancetype)init -{ - if (self = [super init]) { - - _fabricIndex = @(0); - } - return self; -} - -- (id)copyWithZone:(NSZone * _Nullable)zone -{ - auto other = [[MTRAccessControlClusterAccessRestrictionEntryChangedEvent alloc] init]; - - other.fabricIndex = self.fabricIndex; - - return other; -} - -- (NSString *)description -{ - NSString * descriptionString = [NSString stringWithFormat:@"<%@: fabricIndex:%@; >", NSStringFromClass([self class]), _fabricIndex]; - return descriptionString; -} - -@end - @implementation MTRAccessControlClusterFabricRestrictionReviewUpdateEvent - (instancetype)init { @@ -568,7 +541,7 @@ - (instancetype)init _instruction = nil; - _redirectURL = nil; + _arlRequestFlowUrl = nil; _fabricIndex = @(0); } @@ -581,7 +554,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone other.token = self.token; other.instruction = self.instruction; - other.redirectURL = self.redirectURL; + other.arlRequestFlowUrl = self.arlRequestFlowUrl; other.fabricIndex = self.fabricIndex; return other; @@ -589,7 +562,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: token:%@; instruction:%@; redirectURL:%@; fabricIndex:%@; >", NSStringFromClass([self class]), _token, _instruction, _redirectURL, _fabricIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: token:%@; instruction:%@; arlRequestFlowUrl:%@; fabricIndex:%@; >", NSStringFromClass([self class]), _token, _instruction, _arlRequestFlowUrl, _fabricIndex]; return descriptionString; } @@ -7546,6 +7519,33 @@ - (NSString *)description @end +@implementation MTROccupancySensingClusterOccupancyChangedEvent +- (instancetype)init +{ + if (self = [super init]) { + + _occupancy = @(0); + } + return self; +} + +- (id)copyWithZone:(NSZone * _Nullable)zone +{ + auto other = [[MTROccupancySensingClusterOccupancyChangedEvent alloc] init]; + + other.occupancy = self.occupancy; + + return other; +} + +- (NSString *)description +{ + NSString * descriptionString = [NSString stringWithFormat:@"<%@: occupancy:%@; >", NSStringFromClass([self class]), _occupancy]; + return descriptionString; +} + +@end + @implementation MTRThreadNetworkDirectoryClusterThreadNetworkStruct - (instancetype)init { @@ -8887,9 +8887,9 @@ - (instancetype)init { if (self = [super init]) { - _requestId = @(0); + _requestID = @(0); - _clientNodeId = @(0); + _clientNodeID = @(0); _statusCode = @(0); @@ -8902,8 +8902,8 @@ - (id)copyWithZone:(NSZone * _Nullable)zone { auto other = [[MTRCommissionerControlClusterCommissioningRequestResultEvent alloc] init]; - other.requestId = self.requestId; - other.clientNodeId = self.clientNodeId; + other.requestID = self.requestID; + other.clientNodeID = self.clientNodeID; other.statusCode = self.statusCode; other.fabricIndex = self.fabricIndex; @@ -8912,7 +8912,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone - (NSString *)description { - NSString * descriptionString = [NSString stringWithFormat:@"<%@: requestId:%@; clientNodeId:%@; statusCode:%@; fabricIndex:%@; >", NSStringFromClass([self class]), _requestId, _clientNodeId, _statusCode, _fabricIndex]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: requestID:%@; clientNodeID:%@; statusCode:%@; fabricIndex:%@; >", NSStringFromClass([self class]), _requestID, _clientNodeID, _statusCode, _fabricIndex]; return descriptionString; } diff --git a/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m b/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m index 047ce4f8588816..15ef7a839de97a 100644 --- a/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m +++ b/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m @@ -17,32 +17,44 @@ #import -// system dependencies -#import - +#import "MTRTestCase+ServerAppRunner.h" +#import "MTRTestCase.h" #import "MTRTestKeys.h" #import "MTRTestStorage.h" // Fixture 1: chip-all-clusters-app --KVS "$(mktemp -t chip-test-kvs)" --interface-id -1 -// Fixture 2: chip-all-clusters-app --KVS "$(mktemp -t chip-test-kvs)" --interface-id -1 \ - --dac_provider credentials/development/commissioner_dut/struct_cd_origin_pid_vid_correct/test_case_vector.json \ - --product-id 32768 --discriminator 3839 static const uint16_t kLocalPort = 5541; static const uint16_t kTestVendorId = 0xFFF1u; -static const uint16_t kTestProductId1 = 0x8000u; -static const uint16_t kTestProductId2 = 0x8001u; -static const uint16_t kTestDiscriminator1 = 3840u; -static const uint16_t kTestDiscriminator2 = 3839u; +static const __auto_type kTestProductIds = @[ @(0x8000u), @(0x8001u) ]; +static const __auto_type kTestDiscriminators = @[ @(2000), @(3839u), @(3840u) ]; static const uint16_t kDiscoverDeviceTimeoutInSeconds = 10; -static const uint16_t kExpectedDiscoveredDevicesCount = 2; +static const uint16_t kExpectedDiscoveredDevicesCount = 3; // Singleton controller we use. static MTRDeviceController * sController = nil; +static NSString * kInstanceNameKey = @"instanceName"; +static NSString * kVendorIDKey = @"vendorID"; +static NSString * kProductIDKey = @"productID"; +static NSString * kDiscriminatorKey = @"discriminator"; +static NSString * kCommissioningModeKey = @"commissioningMode"; + +static NSDictionary * ResultSnapshot(MTRCommissionableBrowserResult * result) +{ + return @{ + kInstanceNameKey : result.instanceName, + kVendorIDKey : result.vendorID, + kProductIDKey : result.productID, + kDiscriminatorKey : result.discriminator, + kCommissioningModeKey : @(result.commissioningMode), + }; +} + @interface DeviceScannerDelegate : NSObject @property (nonatomic, nullable) XCTestExpectation * expectation; -@property (nonatomic) NSNumber * resultsCount; +@property (nonatomic) NSMutableArray *> * results; +@property (nonatomic) NSMutableArray *> * removedResults; - (instancetype)initWithExpectation:(XCTestExpectation *)expectation; - (void)controller:(MTRDeviceController *)controller didFindCommissionableDevice:(MTRCommissionableBrowserResult *)device; @@ -56,8 +68,9 @@ - (instancetype)initWithExpectation:(XCTestExpectation *)expectation return nil; } - _resultsCount = 0; _expectation = expectation; + _results = [[NSMutableArray alloc] init]; + _removedResults = [[NSMutableArray alloc] init]; return self; } @@ -67,8 +80,9 @@ - (instancetype)init return nil; } - _resultsCount = 0; _expectation = nil; + _results = [[NSMutableArray alloc] init]; + _removedResults = [[NSMutableArray alloc] init]; return self; } @@ -81,12 +95,26 @@ - (void)controller:(MTRDeviceController *)controller didFindCommissionableDevice return; } - _resultsCount = @(_resultsCount.unsignedLongValue + 1); - if ([_resultsCount isEqual:@(kExpectedDiscoveredDevicesCount)]) { + __auto_type * snapshot = ResultSnapshot(device); + + XCTAssertFalse([_results containsObject:snapshot], @"Newly discovered device %@ should not be in results already.", snapshot); + + [_results addObject:snapshot]; + + if (_results.count == kExpectedDiscoveredDevicesCount) { + // Do some sanity checking on our results and removedResults to make + // sure we really only saw the relevant set of things. + NSSet *> * finalResultsSet = [NSSet setWithArray:_results]; + NSSet *> * allResultsSet = [finalResultsSet copy]; + allResultsSet = [allResultsSet setByAddingObjectsFromArray:_removedResults]; + + // Ensure that we just saw the same results as our final set popping in and out if things + // ever got removed here. + XCTAssertEqualObjects(finalResultsSet, allResultsSet); [self.expectation fulfill]; } - XCTAssertLessThanOrEqual(_resultsCount.unsignedLongValue, kExpectedDiscoveredDevicesCount); + XCTAssertLessThanOrEqual(_results.count, kExpectedDiscoveredDevicesCount); __auto_type instanceName = device.instanceName; __auto_type vendorId = device.vendorID; @@ -96,8 +124,8 @@ - (void)controller:(MTRDeviceController *)controller didFindCommissionableDevice XCTAssertEqual(instanceName.length, 16); // The instance name is random, so just ensure the len is right. XCTAssertEqualObjects(vendorId, @(kTestVendorId)); - XCTAssertTrue([productId isEqual:@(kTestProductId1)] || [productId isEqual:@(kTestProductId2)]); - XCTAssertTrue([discriminator isEqual:@(kTestDiscriminator1)] || [discriminator isEqual:@(kTestDiscriminator2)]); + XCTAssertTrue([kTestProductIds containsObject:productId]); + XCTAssertTrue([kTestDiscriminators containsObject:discriminator]); XCTAssertEqual(commissioningMode, YES); NSLog(@"Found Device (%@) with discriminator: %@ (vendor: %@, product: %@)", instanceName, discriminator, vendorId, productId); @@ -112,10 +140,16 @@ - (void)controller:(MTRDeviceController *)controller didRemoveCommissionableDevi NSLog( @"Removed Device (%@) with discriminator: %@ (vendor: %@, product: %@)", instanceName, discriminator, vendorId, productId); + + __auto_type * snapshot = ResultSnapshot(device); + XCTAssertTrue([_results containsObject:snapshot], @"Removed device %@ is not something we found before", snapshot); + + [_removedResults addObject:snapshot]; + [_results removeObject:snapshot]; } @end -@interface MTRCommissionableBrowserTests : XCTestCase +@interface MTRCommissionableBrowserTests : MTRTestCase @end @implementation MTRCommissionableBrowserTests @@ -144,6 +178,17 @@ + (void)setUp XCTAssertNotNil(controller); sController = controller; + + // Start the helper apps our tests use. + for (NSString * payload in @[ + @"MT:Y.K90SO527JA0648G00", + @"MT:-24J0AFN00I40648G00", + ]) { + BOOL started = [self startAppWithName:@"all-clusters" + arguments:@[] + payload:payload]; + XCTAssertTrue(started); + } } + (void)tearDown diff --git a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m index da059fc505de8c..615ff63996a27e 100644 --- a/src/darwin/Framework/CHIPTests/MTRDeviceTests.m +++ b/src/darwin/Framework/CHIPTests/MTRDeviceTests.m @@ -4022,6 +4022,7 @@ - (void)test037_MTRDeviceMultipleDelegatesGetReports // For unit test no real data is needed, but timestamp is required }; } + - (void)test038_MTRDeviceMultipleDelegatesInterestedPaths { dispatch_queue_t queue = dispatch_get_main_queue(); @@ -4274,6 +4275,78 @@ - (void)test038_MTRDeviceMultipleDelegatesInterestedPaths XCTAssertEqual(eventsReceived4, 36); } +- (void)test039_GetAllAttributesReport +{ + dispatch_queue_t queue = dispatch_get_main_queue(); + + // First start with clean slate by removing the MTRDevice and clearing the persisted cache + __auto_type * device = [MTRDevice deviceWithNodeID:@(kDeviceId) controller:sController]; + [sController removeDevice:device]; + [sController.controllerDataStore clearAllStoredClusterData]; + NSDictionary * storedClusterDataAfterClear = [sController.controllerDataStore getStoredClusterDataForNodeID:@(kDeviceId)]; + XCTAssertEqual(storedClusterDataAfterClear.count, 0); + + // Now recreate device and get subscription primed + device = [MTRDevice deviceWithNodeID:@(kDeviceId) controller:sController]; + XCTestExpectation * gotReportEnd = [self expectationWithDescription:@"Report end for delegate"]; + + __auto_type * delegate = [[MTRDeviceTestDelegateWithSubscriptionSetupOverride alloc] init]; + delegate.skipSetupSubscription = YES; + __weak __auto_type weakdelegate = delegate; + __block NSUInteger attributesReceived = 0; + delegate.onAttributeDataReceived = ^(NSArray *> * data) { + attributesReceived += data.count; + }; + delegate.onReportEnd = ^{ + [gotReportEnd fulfill]; + __strong __auto_type strongDelegate = weakdelegate; + strongDelegate.onReportEnd = nil; + }; + + [device addDelegate:delegate queue:queue]; + + // Now inject attributes and check that each delegate gets the right set of attributes + NSMutableArray * attributeReport = [NSMutableArray array]; + // Construct 36 attributes with endpoints 1~4, clusters 11 ~ 33, and attributes 111~333 + for (int i = 1; i <= 4; i++) { + for (int j = 1; j <= 3; j++) { + for (int k = 1; k <= 3; k++) { + int endpointID = i; + int clusterID = i * 10 + j; + int attributeID = i * 100 + j * 10 + k; + int value = attributeID + 10000; + [attributeReport addObject:[self _testAttributeResponseValueWithEndpointID:@(endpointID) clusterID:@(clusterID) attributeID:@(attributeID) value:value]]; + } + } + } + [device unitTestInjectAttributeReport:attributeReport fromSubscription:YES]; + + [self waitForExpectations:@[ gotReportEnd ] timeout:60]; + + NSArray * allAttributesReport = [device getAllAttributesReport]; + + XCTAssertEqual(allAttributesReport.count, attributeReport.count); + + for (NSDictionary * newResponseValueDict in allAttributesReport) { + MTRAttributePath * newPath = newResponseValueDict[MTRAttributePathKey]; + NSDictionary * newDataValueDict = newResponseValueDict[MTRDataKey]; + NSNumber * newValue = newDataValueDict[MTRValueKey]; + XCTAssertNotNil(newValue); + + for (NSDictionary * originalResponseValueDict in attributeReport) { + MTRAttributePath * originalPath = originalResponseValueDict[MTRAttributePathKey]; + // Find same attribute path and compare value + if ([newPath isEqual:originalPath]) { + NSDictionary * originalDataValueDict = originalResponseValueDict[MTRDataKey]; + NSNumber * originalValue = originalDataValueDict[MTRValueKey]; + XCTAssertNotNil(originalValue); + XCTAssertEqualObjects(newValue, originalValue); + continue; + } + } + } +} + @end @interface MTRDeviceEncoderTests : XCTestCase diff --git a/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m b/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m index 3c8cad690ad83b..f2deba2f1ddda6 100644 --- a/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m +++ b/src/darwin/Framework/CHIPTests/MTROTAProviderTests.m @@ -20,10 +20,10 @@ #import "MTRDeviceTestDelegate.h" #import "MTRErrorTestUtils.h" +#import "MTRTestCase+ServerAppRunner.h" #import "MTRTestCase.h" #import "MTRTestKeys.h" #import "MTRTestResetCommissioneeHelper.h" -#import "MTRTestServerAppRunner.h" #import "MTRTestStorage.h" // system dependencies @@ -80,7 +80,7 @@ - (NSString *)createImageFromRawImage:(NSString *)rawImage withVersion:(NSNumber - (MTRDevice *)commissionDeviceWithPayload:(NSString *)payloadString nodeID:(NSNumber *)nodeID; @end -@interface MTROTARequestorAppRunner : MTRTestServerAppRunner +@interface MTROTARequestorAppRunner : NSObject @property (nonatomic, copy) NSString * downloadFilePath; - (instancetype)initWithPayload:(NSString *)payload testcase:(MTROTAProviderTests *)testcase; @@ -99,14 +99,15 @@ - (MTRDevice *)commissionWithNodeID:(NSNumber *)nodeID - (instancetype)initWithPayload:(NSString *)payload testcase:(MTROTAProviderTests *)testcase { - __auto_type * downloadFilePath = [NSString stringWithFormat:@"/tmp/chip-ota-requestor-downloaded-image%u", [MTRTestServerAppRunner nextUniqueIndex]]; + __auto_type * downloadFilePath = [NSString stringWithFormat:@"/tmp/chip-ota-requestor-downloaded-image%u", [MTROTAProviderTests nextUniqueIndex]]; __auto_type * extraArguments = @[ @"--otaDownloadPath", downloadFilePath, @"--autoApplyImage", ]; - if (!(self = [super initWithAppName:@"ota-requestor" arguments:extraArguments payload:payload testcase:testcase])) { + BOOL started = [testcase startAppWithName:@"ota-requestor" arguments:extraArguments payload:payload]; + if (!started) { return nil; } diff --git a/src/darwin/Framework/CHIPTests/MTRPairingTests.m b/src/darwin/Framework/CHIPTests/MTRPairingTests.m index a5e44fff2632e7..4e597961603ee9 100644 --- a/src/darwin/Framework/CHIPTests/MTRPairingTests.m +++ b/src/darwin/Framework/CHIPTests/MTRPairingTests.m @@ -18,19 +18,14 @@ // module headers #import +#import "MTRDefines_Internal.h" #import "MTRErrorTestUtils.h" +#import "MTRTestCase+ServerAppRunner.h" +#import "MTRTestCase.h" +#import "MTRTestDeclarations.h" #import "MTRTestKeys.h" -#import "MTRTestResetCommissioneeHelper.h" #import "MTRTestStorage.h" -// system dependencies -#import - -// Fixture: chip-all-clusters-app --KVS "$(mktemp -t chip-test-kvs)" --interface-id -1 \ - --dac_provider credentials/development/commissioner_dut/struct_cd_origin_pid_vid_correct/test_case_vector.json \ - --product-id 32768 --discriminator 3839 -// For manual testing, CASE retry code paths can be tested by adding --faults chip_CASEServerBusy_f1 (or similar) - static const uint16_t kPairingTimeoutInSeconds = 10; static const uint16_t kTimeoutInSeconds = 3; static uint64_t sDeviceId = 100000000; @@ -138,7 +133,43 @@ - (void)controller:(MTRDeviceController *)controller commissioningComplete:(NSEr @end -@interface MTRPairingTests : XCTestCase +@interface MTRPairingTestMonitoringControllerDelegate : NSObject +@property (atomic, readwrite) BOOL statusUpdateCalled; +@property (atomic, readwrite) BOOL commissioningSessionEstablishmentDoneCalled; +@property (atomic, readwrite) BOOL commissioningCompleteCalled; +@property (atomic, readwrite) BOOL readCommissioningInfoCalled; +@end + +@implementation MTRPairingTestMonitoringControllerDelegate +- (NSString *)description +{ + return [NSString stringWithFormat:@"", self, YES_NO(_statusUpdateCalled), YES_NO(_commissioningSessionEstablishmentDoneCalled), YES_NO(_commissioningCompleteCalled), YES_NO(_readCommissioningInfoCalled)]; +} +- (void)controller:(MTRDeviceController *)controller statusUpdate:(MTRCommissioningStatus)status +{ + self.statusUpdateCalled = YES; +} + +- (void)controller:(MTRDeviceController *)controller commissioningSessionEstablishmentDone:(NSError * _Nullable)error +{ + self.commissioningSessionEstablishmentDoneCalled = YES; +} + +- (void)controller:(MTRDeviceController *)controller + commissioningComplete:(NSError * _Nullable)error + nodeID:(NSNumber * _Nullable)nodeID + metrics:(MTRMetrics *)metrics +{ + self.commissioningCompleteCalled = YES; +} + +- (void)controller:(MTRDeviceController *)controller readCommissioningInfo:(MTRProductIdentity *)info +{ + self.readCommissioningInfoCalled = YES; +} +@end + +@interface MTRPairingTests : MTRTestCase @property (nullable) MTRPairingTestControllerDelegate * controllerDelegate; @end @@ -146,6 +177,8 @@ @implementation MTRPairingTests + (void)setUp { + [super setUp]; + __auto_type * factory = [MTRDeviceControllerFactory sharedInstance]; XCTAssertNotNil(factory); @@ -170,6 +203,8 @@ + (void)tearDown sController = nil; [[MTRDeviceControllerFactory sharedInstance] stopControllerFactory]; + + [super tearDown]; } - (void)setUp @@ -182,11 +217,34 @@ - (void)tearDown { [sController setDeviceControllerDelegate:(id _Nonnull) nil queue:dispatch_get_main_queue()]; // TODO: do we need a clearDeviceControllerDelegate API? self.controllerDelegate = nil; + + [super tearDown]; +} + +- (void)startServerApp +{ + // For manual testing, CASE retry code paths can be tested by adding --faults chip_CASEServerBusy_f1 (or similar) + BOOL started = [self startAppWithName:@"all-clusters" + arguments:@[ + @"--dac_provider", + [self absolutePathFor:@"credentials/development/commissioner_dut/struct_cd_origin_pid_vid_correct/test_case_vector.json"], + ] + payload:kOnboardingPayload]; + XCTAssertTrue(started); } // attestationDelegate and failSafeExtension can both be nil - (void)doPairingTestWithAttestationDelegate:(id)attestationDelegate failSafeExtension:(NSNumber *)failSafeExtension { + [self doPairingTestWithAttestationDelegate:attestationDelegate failSafeExtension:failSafeExtension startServerApp:YES]; +} + +- (void)doPairingTestWithAttestationDelegate:(id)attestationDelegate failSafeExtension:(NSNumber *)failSafeExtension startServerApp:(BOOL)startServerApp +{ + if (startServerApp) { + [self startServerApp]; + } + // Don't reuse node ids, because that will confuse us. ++sDeviceId; XCTestExpectation * expectation = [self expectationWithDescription:@"Commissioning Complete"]; @@ -199,6 +257,19 @@ - (void)doPairingTestWithAttestationDelegate:(id)a [sController setDeviceControllerDelegate:controllerDelegate queue:callbackQueue]; self.controllerDelegate = controllerDelegate; + // Test that a monitoring delegate works + __auto_type * monitoringControllerDelegate = [[MTRPairingTestMonitoringControllerDelegate alloc] init]; + [sController addDeviceControllerDelegate:monitoringControllerDelegate queue:callbackQueue]; + XCTAssertEqual([sController unitTestDelegateCount], 2); + + // Test that the addDeviceControllerDelegate delegate is held weakly by the controller + @autoreleasepool { + __auto_type * monitoringControllerDelegate = [[MTRPairingTestMonitoringControllerDelegate alloc] init]; + [sController addDeviceControllerDelegate:monitoringControllerDelegate queue:callbackQueue]; + XCTAssertEqual([sController unitTestDelegateCount], 3); + } + XCTAssertEqual([sController unitTestDelegateCount], 2); + NSError * error; __auto_type * payload = [MTRSetupPayload setupPayloadWithOnboardingPayload:kOnboardingPayload error:&error]; XCTAssertNotNil(payload); @@ -210,8 +281,12 @@ - (void)doPairingTestWithAttestationDelegate:(id)a [self waitForExpectations:@[ expectation ] timeout:kPairingTimeoutInSeconds]; XCTAssertNil(controllerDelegate.commissioningCompleteError); - ResetCommissionee([MTRBaseDevice deviceWithNodeID:@(sDeviceId) controller:sController], dispatch_get_main_queue(), self, - kTimeoutInSeconds); + // Test that the monitoring delegate got all the callbacks + XCTAssertTrue(monitoringControllerDelegate.statusUpdateCalled); + XCTAssertTrue(monitoringControllerDelegate.commissioningSessionEstablishmentDoneCalled); + XCTAssertTrue(monitoringControllerDelegate.commissioningCompleteCalled); + XCTAssertTrue(monitoringControllerDelegate.readCommissioningInfoCalled); + [sController removeDeviceControllerDelegate:monitoringControllerDelegate]; } - (void)test001_PairWithoutAttestationDelegate @@ -297,6 +372,8 @@ - (void)doPairingAndWaitForProgress:(NSString *)trigger attestationDelegate:(nul - (void)doPairingTestAfterCancellationAtProgress:(NSString *)trigger attestationDelegate:(nullable id)attestationDelegate { + [self startServerApp]; + // Run pairing up and wait for the trigger [self doPairingAndWaitForProgress:trigger attestationDelegate:attestationDelegate]; @@ -314,7 +391,7 @@ - (void)doPairingTestAfterCancellationAtProgress:(NSString *)trigger attestation XCTAssertEqual(error.code, MTRErrorCodeCancelled); // Now pair again. If the previous attempt was cancelled correctly this should work fine. - [self doPairingTestWithAttestationDelegate:nil failSafeExtension:nil]; + [self doPairingTestWithAttestationDelegate:nil failSafeExtension:nil startServerApp:NO]; } - (void)doPairingTestAfterCancellationAtProgress:(NSString *)trigger diff --git a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m index db8bd300df94e1..48500f2933dcb4 100644 --- a/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m +++ b/src/darwin/Framework/CHIPTests/MTRPerControllerStorageTests.m @@ -24,15 +24,16 @@ #import "MTRDevice_Internal.h" #import "MTRErrorTestUtils.h" #import "MTRFabricInfoChecker.h" +#import "MTRTestCase+ServerAppRunner.h" #import "MTRTestCase.h" #import "MTRTestDeclarations.h" #import "MTRTestKeys.h" #import "MTRTestPerControllerStorage.h" #import "MTRTestResetCommissioneeHelper.h" -#import "MTRTestServerAppRunner.h" static const uint16_t kPairingTimeoutInSeconds = 10; static const uint16_t kTimeoutInSeconds = 3; +static const uint16_t kSubscriptionTimeoutInSeconds = 60; static NSString * kOnboardingPayload = @"MT:-24J0AFN00KA0648G00"; static const uint16_t kTestVendorId = 0xFFF1u; static const uint16_t kSubscriptionPoolBaseTimeoutInSeconds = 30; @@ -262,11 +263,8 @@ - (nullable MTRDeviceController *)startControllerWithRootKeys:(MTRTestKeys *)roo nodeID:(NSNumber *)nodeID storage:(MTRTestPerControllerStorage *)storage caseAuthenticatedTags:(NSSet * _Nullable)caseAuthenticatedTags + paramsModifier:(void (^_Nullable)(MTRDeviceControllerExternalCertificateParameters *))paramsModifier error:(NSError * __autoreleasing *)error - certificateIssuer: - (MTRPerControllerStorageTestsCertificateIssuer * __autoreleasing *)certificateIssuer - concurrentSubscriptionPoolSize:(NSUInteger)concurrentSubscriptionPoolSize - storageBehaviorConfiguration:(MTRDeviceStorageBehaviorConfiguration * _Nullable)storageBehaviorConfiguration { XCTAssertTrue(error != NULL); @@ -295,33 +293,60 @@ - (nullable MTRDeviceController *)startControllerWithRootKeys:(MTRTestKeys *)roo intermediateCertificate:nil rootCertificate:root]; XCTAssertNotNil(params); - // TODO: This is only used by testControllerServer. If that moves - // elsewhere, take this back out again. - params.shouldAdvertiseOperational = YES; - - __auto_type * ourCertificateIssuer = [[MTRPerControllerStorageTestsCertificateIssuer alloc] initWithRootCertificate:root - intermediateCertificate:nil - signingKey:rootKeys - fabricID:fabricID]; - XCTAssertNotNil(ourCertificateIssuer); - - if (certificateIssuer) { - *certificateIssuer = ourCertificateIssuer; - } - - [params setOperationalCertificateIssuer:ourCertificateIssuer queue:dispatch_get_main_queue()]; - if (concurrentSubscriptionPoolSize > 0) { - params.concurrentSubscriptionEstablishmentsAllowedOnThread = concurrentSubscriptionPoolSize; - } - - if (storageBehaviorConfiguration) { - params.storageBehaviorConfiguration = storageBehaviorConfiguration; + if (paramsModifier) { + paramsModifier(params); } return [[MTRDeviceController alloc] initWithParameters:params error:error]; } +- (nullable MTRDeviceController *)startControllerWithRootKeys:(MTRTestKeys *)rootKeys + operationalKeys:(MTRTestKeys *)operationalKeys + fabricID:(NSNumber *)fabricID + nodeID:(NSNumber *)nodeID + storage:(MTRTestPerControllerStorage *)storage + caseAuthenticatedTags:(NSSet * _Nullable)caseAuthenticatedTags + error:(NSError * __autoreleasing *)error + certificateIssuer: + (MTRPerControllerStorageTestsCertificateIssuer * __autoreleasing *)certificateIssuer + concurrentSubscriptionPoolSize:(NSUInteger)concurrentSubscriptionPoolSize + storageBehaviorConfiguration:(MTRDeviceStorageBehaviorConfiguration * _Nullable)storageBehaviorConfiguration +{ + return [self startControllerWithRootKeys:rootKeys + operationalKeys:operationalKeys + fabricID:fabricID + nodeID:nodeID + storage:storage + caseAuthenticatedTags:caseAuthenticatedTags + paramsModifier:^(MTRDeviceControllerExternalCertificateParameters * params) { + // TODO: This is only used by testControllerServer. If that moves + // elsewhere, take this back out again. + params.shouldAdvertiseOperational = YES; + + __auto_type * ourCertificateIssuer = [[MTRPerControllerStorageTestsCertificateIssuer alloc] initWithRootCertificate:params.rootCertificate + intermediateCertificate:nil + signingKey:rootKeys + fabricID:fabricID]; + XCTAssertNotNil(ourCertificateIssuer); + + if (certificateIssuer) { + *certificateIssuer = ourCertificateIssuer; + } + + [params setOperationalCertificateIssuer:ourCertificateIssuer queue:dispatch_get_main_queue()]; + + if (concurrentSubscriptionPoolSize > 0) { + params.concurrentSubscriptionEstablishmentsAllowedOnThread = concurrentSubscriptionPoolSize; + } + + if (storageBehaviorConfiguration) { + params.storageBehaviorConfiguration = storageBehaviorConfiguration; + } + } + error:error]; +} + - (nullable MTRDeviceController *)startControllerWithRootKeys:(MTRTestKeys *)rootKeys operationalKeys:(MTRTestKeys *)operationalKeys fabricID:(NSNumber *)fabricID @@ -462,6 +487,7 @@ - (void)test001_BasicControllerStartup XCTAssertNil(error); XCTAssertNotNil(controller); XCTAssertTrue([controller isRunning]); + XCTAssertFalse(controller.suspended); XCTAssertEqualObjects(controller.controllerNodeID, nodeID); @@ -1611,6 +1637,128 @@ - (void)test011_TestDataStoreMTRDeviceWithStorageBehaviorOptimizationDisabled [self doDataStoreMTRDeviceTestWithStorageDelegate:[[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]] disableStorageBehaviorOptimization:YES]; } +// TODO: Factor out startControllerWithRootKeys into a test helper, move these +// suspension tests to a different file. +- (void)test012_startSuspended +{ + NSError * error; + __auto_type * storageDelegate = [[MTRTestPerControllerStorage alloc] initWithControllerID:[NSUUID UUID]]; + __auto_type * controller = [self startControllerWithRootKeys:[[MTRTestKeys alloc] init] + operationalKeys:[[MTRTestKeys alloc] init] + fabricID:@555 + nodeID:@888 + storage:storageDelegate + caseAuthenticatedTags:nil + paramsModifier:^(MTRDeviceControllerExternalCertificateParameters * params) { + params.startSuspended = YES; + } + error:&error]; + + XCTAssertNil(error); + XCTAssertNotNil(controller); + XCTAssertTrue(controller.running); + XCTAssertTrue(controller.suspended); + [controller shutdown]; +} + +- (void)test013_suspendDevices +{ + NSNumber * deviceID = @(17); + __auto_type * device = [self getMTRDevice:deviceID]; + __auto_type * controller = device.deviceController; + + XCTAssertFalse(controller.suspended); + + __auto_type queue = dispatch_get_main_queue(); + __auto_type * delegate = [[MTRDeviceTestDelegate alloc] init]; + + XCTestExpectation * initialSubscriptionExpectation = [self expectationWithDescription:@"Subscription has been set up"]; + XCTestExpectation * initialReachableExpectation = [self expectationWithDescription:@"Device initially became reachable"]; + XCTestExpectation * initialUnreachableExpectation = [self expectationWithDescription:@"Device initially became unreachable"]; + initialUnreachableExpectation.inverted = YES; + + delegate.onReachable = ^{ + [initialReachableExpectation fulfill]; + }; + + delegate.onNotReachable = ^{ + // We do not expect to land here. + [initialUnreachableExpectation fulfill]; + }; + + delegate.onReportEnd = ^{ + [initialSubscriptionExpectation fulfill]; + }; + + [device setDelegate:delegate queue:queue]; + [self waitForExpectations:@[ initialReachableExpectation, initialSubscriptionExpectation ] timeout:kSubscriptionTimeoutInSeconds]; + // Separately wait for the unreachable bit, so we don't end up waiting kSubscriptionTimeoutInSeconds + // seconds for it. + [self waitForExpectations:@[ initialUnreachableExpectation ] timeout:0]; + + // Test that sending a command works. Clear the delegate's onReportEnd + // first, so reports from the command don't trigger it. + delegate.onReportEnd = nil; + XCTestExpectation * toggle1Expectation = [self expectationWithDescription:@"toggle 1"]; + __auto_type * cluster = [[MTRClusterOnOff alloc] initWithDevice:device endpointID:@(1) queue:queue]; + [cluster toggleWithExpectedValues:nil expectedValueInterval:nil completion:^(NSError * _Nullable error) { + XCTAssertNil(error); + [toggle1Expectation fulfill]; + }]; + + [self waitForExpectations:@[ toggle1Expectation ] timeout:kTimeoutInSeconds]; + + XCTestExpectation * becameUnreachableExpectation = [self expectationWithDescription:@"Device became unreachable"]; + delegate.onNotReachable = ^{ + [becameUnreachableExpectation fulfill]; + }; + + [controller suspend]; + XCTAssertTrue(controller.suspended); + + // Test that sending a command no longer works. + XCTestExpectation * toggle2Expectation = [self expectationWithDescription:@"toggle 2"]; + [cluster toggleWithExpectedValues:nil expectedValueInterval:nil completion:^(NSError * _Nullable error) { + XCTAssertNotNil(error); + [toggle2Expectation fulfill]; + }]; + + [self waitForExpectations:@[ becameUnreachableExpectation, toggle2Expectation ] timeout:kTimeoutInSeconds]; + + XCTestExpectation * newSubscriptionExpectation = [self expectationWithDescription:@"Subscription has been set up again"]; + XCTestExpectation * newReachableExpectation = [self expectationWithDescription:@"Device became reachable again"]; + delegate.onReachable = ^{ + [newReachableExpectation fulfill]; + }; + + delegate.onReportEnd = ^{ + [newSubscriptionExpectation fulfill]; + }; + + [controller resume]; + XCTAssertFalse(controller.suspended); + + [self waitForExpectations:@[ newSubscriptionExpectation, newReachableExpectation ] timeout:kSubscriptionTimeoutInSeconds]; + + // Test that sending a command works again. Clear the delegate's onReportEnd + // first, so reports from the command don't trigger it. + delegate.onReportEnd = nil; + XCTestExpectation * toggle3Expectation = [self expectationWithDescription:@"toggle 3"]; + [cluster toggleWithExpectedValues:nil expectedValueInterval:nil completion:^(NSError * _Nullable error) { + XCTAssertNil(error); + [toggle3Expectation fulfill]; + }]; + + [self waitForExpectations:@[ toggle3Expectation ] timeout:kTimeoutInSeconds]; + + [controller removeDevice:device]; + // Reset our commissionee. + __auto_type * baseDevice = [MTRBaseDevice deviceWithNodeID:deviceID controller:controller]; + ResetCommissionee(baseDevice, queue, self, kTimeoutInSeconds); + + [controller shutdown]; +} + // TODO: This might want to go in a separate test file, with some shared setup // across multiple tests, maybe. Would need to factor out // startControllerWithRootKeys into a test helper. @@ -2437,11 +2585,10 @@ - (void)testSubscriptionPool // Start our helper apps. __auto_type * sortedKeys = [[deviceOnboardingPayloads allKeys] sortedArrayUsingSelector:@selector(compare:)]; for (NSNumber * deviceID in sortedKeys) { - __auto_type * appRunner = [[MTRTestServerAppRunner alloc] initWithAppName:@"all-clusters" - arguments:@[] - payload:deviceOnboardingPayloads[deviceID] - testcase:self]; - XCTAssertNotNil(appRunner); + BOOL started = [self startAppWithName:@"all-clusters" + arguments:@[] + payload:deviceOnboardingPayloads[deviceID]]; + XCTAssertTrue(started); } [self doTestSubscriptionPoolWithSize:1 deviceOnboardingPayloads:deviceOnboardingPayloads]; diff --git a/src/darwin/Framework/CHIPTests/MTRSwiftPairingTests.swift b/src/darwin/Framework/CHIPTests/MTRSwiftPairingTests.swift index 001a3fe3150d01..907b9a2761673c 100644 --- a/src/darwin/Framework/CHIPTests/MTRSwiftPairingTests.swift +++ b/src/darwin/Framework/CHIPTests/MTRSwiftPairingTests.swift @@ -1,12 +1,15 @@ import Matter import XCTest -// This more or less parallels the "no delegate" case in MTRPairingTests +// This more or less parallels the "no delegate" case in MTRPairingTests, but uses the "normal" +// all-clusters-app, since it does not do any of the "interesting" VID/PID notification so far. If +// it ever starts needing to do that, we should figure out a way to use MTRTestCase+ServerAppRunner from +// here. struct PairingConstants { static let localPort = 5541 static let vendorID = 0xFFF1 - static let onboardingPayload = "MT:Y.K90SO527JA0648G00" + static let onboardingPayload = "MT:-24J0AFN00KA0648G00" static let deviceID = 0x12344321 static let timeoutInSeconds : UInt16 = 3 } diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestServerAppRunner.h b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestCase+ServerAppRunner.h similarity index 74% rename from src/darwin/Framework/CHIPTests/TestHelpers/MTRTestServerAppRunner.h rename to src/darwin/Framework/CHIPTests/TestHelpers/MTRTestCase+ServerAppRunner.h index 9297b76c6fcb66..8eb9384f67e01e 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestServerAppRunner.h +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestCase+ServerAppRunner.h @@ -16,21 +16,14 @@ #import -@class MTRTestCase; +#import "MTRTestCase.h" NS_ASSUME_NONNULL_BEGIN -/** - * A representation of a server application instance. - * - * Server applications are assumed to be compiled into out/debug/${APPNAME}-app, - * with the binary being out/debug/${APPNAME}-app/chip-${APPNAME}-app. - */ -@interface MTRTestServerAppRunner : NSObject +@interface MTRTestCase (ServerAppRunner) /** - * Initialize the app runner with the given app name, arguments, setup payload, and testcase - * instance. + * Start a server app with the given app name, arguments, and setup payload. * * The payload will be used to determine the discriminator and passcode * arguments the app should use, in addition to the provided arguments. @@ -43,7 +36,13 @@ NS_ASSUME_NONNULL_BEGIN * subtracting 1111 from the discriminator and adding 5542 (so as not to collide * with any existing Matter things running on 5540/5541). */ -- (instancetype)initWithAppName:(NSString *)name arguments:(NSArray *)arguments payload:(NSString *)payload testcase:(MTRTestCase *)testcase; +- (BOOL)startAppWithName:(NSString *)name arguments:(NSArray *)arguments payload:(NSString *)payload; + +/** + * Same thing, but the server will be killed at the end of the current suite, + * and is not bound to a particular test in the suite. + */ ++ (BOOL)startAppWithName:(NSString *)name arguments:(NSArray *)arguments payload:(NSString *)payload; /** * Get the unique index that will be used for the next initialization. This diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestServerAppRunner.m b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestCase+ServerAppRunner.m similarity index 64% rename from src/darwin/Framework/CHIPTests/TestHelpers/MTRTestServerAppRunner.m rename to src/darwin/Framework/CHIPTests/TestHelpers/MTRTestCase+ServerAppRunner.m index 077cd494045f4c..82d9cf114238a3 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestServerAppRunner.m +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestCase+ServerAppRunner.m @@ -16,8 +16,7 @@ #import -#import "MTRTestCase.h" -#import "MTRTestServerAppRunner.h" +#import "MTRTestCase+ServerAppRunner.h" static unsigned sAppRunnerIndex = 1; @@ -29,24 +28,12 @@ static const uint16_t kBasePort = 5542 - kMinDiscriminator; #endif // HAVE_NSTASK -@implementation MTRTestServerAppRunner { - unsigned _uniqueIndex; -#if HAVE_NSTASK - NSTask * _appTask; -#endif -} +@implementation MTRTestCase (ServerAppRunner) -- (instancetype)initWithAppName:(NSString *)name arguments:(NSArray *)arguments payload:(NSString *)payload testcase:(MTRTestCase *)testcase +#if HAVE_NSTASK ++ (NSTask *)doStartAppWithName:(NSString *)name arguments:(NSArray *)arguments payload:(NSString *)payload { -#if !HAVE_NSTASK - XCTFail("Unable to start server app when we do not have NSTask"); - return nil; -#else // HAVE_NSTASK - if (!(self = [super init])) { - return nil; - } - - _uniqueIndex = sAppRunnerIndex++; + __auto_type uniqueIndex = sAppRunnerIndex++; NSError * error; __auto_type * parsedPayload = [MTRSetupPayload setupPayloadWithOnboardingPayload:payload error:&error]; @@ -61,7 +48,7 @@ - (instancetype)initWithAppName:(NSString *)name arguments:(NSArray NSNumber * passcode = parsedPayload.setupPasscode; __auto_type * executable = [NSString stringWithFormat:@"out/debug/%@-app/chip-%@-app", name, name]; - _appTask = [testcase createTaskForPath:executable]; + __auto_type * appTask = [self createTaskForPath:executable]; __auto_type * forcedArguments = @[ // Make sure we only advertise on the local interface. @@ -74,27 +61,49 @@ - (instancetype)initWithAppName:(NSString *)name arguments:(NSArray @"--passcode", [NSString stringWithFormat:@"%llu", passcode.unsignedLongLongValue], @"--KVS", - [NSString stringWithFormat:@"/tmp/chip-%@-kvs%u", name, _uniqueIndex], + [NSString stringWithFormat:@"/tmp/chip-%@-kvs%u", name, uniqueIndex], + @"--product-id", + [NSString stringWithFormat:@"%u", parsedPayload.productID.unsignedShortValue], ]; __auto_type * allArguments = [forcedArguments arrayByAddingObjectsFromArray:arguments]; - [_appTask setArguments:allArguments]; + [appTask setArguments:allArguments]; - NSString * outFile = [NSString stringWithFormat:@"/tmp/darwin/framework-tests/%@-app-%u.log", name, _uniqueIndex]; - NSString * errorFile = [NSString stringWithFormat:@"/tmp/darwin/framework-tests/%@-app-err-%u.log", name, _uniqueIndex]; + NSString * outFile = [NSString stringWithFormat:@"/tmp/darwin/framework-tests/%@-app-%u.log", name, uniqueIndex]; + NSString * errorFile = [NSString stringWithFormat:@"/tmp/darwin/framework-tests/%@-app-err-%u.log", name, uniqueIndex]; // Make sure the files exist. [[NSFileManager defaultManager] createFileAtPath:outFile contents:nil attributes:nil]; [[NSFileManager defaultManager] createFileAtPath:errorFile contents:nil attributes:nil]; - _appTask.standardOutput = [NSFileHandle fileHandleForWritingAtPath:outFile]; - _appTask.standardError = [NSFileHandle fileHandleForWritingAtPath:errorFile]; + appTask.standardOutput = [NSFileHandle fileHandleForWritingAtPath:outFile]; + appTask.standardError = [NSFileHandle fileHandleForWritingAtPath:errorFile]; - [testcase launchTask:_appTask]; + NSLog(@"Started chip-%@-app (%@) with arguments %@ stdout=%@ and stderr=%@", name, appTask, allArguments, outFile, errorFile); - NSLog(@"Started chip-%@-app with arguments %@ stdout=%@ and stderr=%@", name, allArguments, outFile, errorFile); + return appTask; +} +#endif // HAVE_NSTASK - return self; +- (BOOL)startAppWithName:(NSString *)name arguments:(NSArray *)arguments payload:(NSString *)payload +{ +#if !HAVE_NSTASK + XCTFail("Unable to start server app when we do not have NSTask"); + return NO; +#else + [self launchTask:[self.class doStartAppWithName:name arguments:arguments payload:payload]]; + return YES; +#endif // HAVE_NSTASK +} + ++ (BOOL)startAppWithName:(NSString *)name arguments:(NSArray *)arguments payload:(NSString *)payload +{ +#if !HAVE_NSTASK + XCTFail("Unable to start server app when we do not have NSTask"); + return NO; +#else + [self launchTask:[self doStartAppWithName:name arguments:arguments payload:payload]]; + return YES; #endif // HAVE_NSTASK } diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestCase.h b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestCase.h index c9f20e174d5816..3b404f6f05b1f4 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestCase.h +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestCase.h @@ -37,6 +37,11 @@ NS_ASSUME_NONNULL_BEGIN */ - (NSTask *)createTaskForPath:(NSString *)path; +/** + * Same thing, but not tied to a specific testcase instance. + */ ++ (NSTask *)createTaskForPath:(NSString *)path; + /** * Run a task to completion and make sure it succeeds. */ @@ -47,6 +52,12 @@ NS_ASSUME_NONNULL_BEGIN * tearDown happens. */ - (void)launchTask:(NSTask *)task; + +/** + * Launch a cross-test task. The task will be automatically terminated when the testsuite + * tearDown happens. + */ ++ (void)launchTask:(NSTask *)task; #endif // HAVE_NSTASK /** @@ -54,6 +65,11 @@ NS_ASSUME_NONNULL_BEGIN */ - (NSString *)absolutePathFor:(NSString *)matterRootRelativePath; +/** + * Same thing, but not tied to a specific testcase instance. + */ ++ (NSString *)absolutePathFor:(NSString *)matterRootRelativePath; + @end NS_ASSUME_NONNULL_END diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestCase.mm b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestCase.mm index 1d055cdcdf5089..a418393a0fca79 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestCase.mm +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestCase.mm @@ -19,12 +19,42 @@ #import "MTRTestCase.h" +#if HAVE_NSTASK +// Tasks that are not scoped to a specific test, but rather to a specific test suite. +static NSMutableSet * runningCrossTestTasks; + +static void ClearTaskSet(NSMutableSet * __strong & tasks) +{ + for (NSTask * task in tasks) { + NSLog(@"Terminating task %@", task); + [task terminate]; + } + tasks = nil; +} +#endif // HAVE_NSTASK + @implementation MTRTestCase { #if HAVE_NSTASK NSMutableSet * _runningTasks; #endif // NSTask } ++ (void)setUp +{ + [super setUp]; + +#if HAVE_NSTASK + runningCrossTestTasks = [[NSMutableSet alloc] init]; +#endif // HAVE_NSTASK +} + ++ (void)tearDown +{ +#if HAVE_NSTASK + ClearTaskSet(runningCrossTestTasks); +#endif // HAVE_NSTASK +} + - (void)setUp { #if HAVE_NSTASK @@ -32,10 +62,6 @@ - (void)setUp #endif // HAVE_NSTASK } -/** - * Unfortunately, doing this in "+ (void)tearDown" (the global suite teardown) - * does not trigger a test failure even if the XCTAssertEqual fails. - */ - (void)tearDown { #if defined(ENABLE_LEAK_DETECTION) && ENABLE_LEAK_DETECTION @@ -43,15 +69,16 @@ - (void)tearDown int pid = getpid(); __auto_type * cmd = [NSString stringWithFormat:@"leaks %d", pid]; int ret = system(cmd.UTF8String); + /** + * Unfortunately, doing this in "+ (void)tearDown" (the global suite teardown) + * does not trigger a test failure even if the XCTAssertEqual fails. + */ XCTAssertEqual(ret, 0, "LEAKS DETECTED"); } #endif #if HAVE_NSTASK - for (NSTask * task in _runningTasks) { - [task terminate]; - } - _runningTasks = nil; + ClearTaskSet(_runningTasks); #endif // HAVE_NSTASK [super tearDown]; @@ -59,6 +86,11 @@ - (void)tearDown #if HAVE_NSTASK - (NSTask *)createTaskForPath:(NSString *)path +{ + return [self.class createTaskForPath:path]; +} + ++ (NSTask *)createTaskForPath:(NSString *)path { NSTask * task = [[NSTask alloc] init]; [task setLaunchPath:[self absolutePathFor:path]]; @@ -75,17 +107,34 @@ - (void)runTask:(NSTask *)task XCTAssertEqual([task terminationStatus], 0); } -- (void)launchTask:(NSTask *)task ++ (void)doLaunchTask:(NSTask *)task { NSError * launchError; [task launchAndReturnError:&launchError]; XCTAssertNil(launchError); +} + +- (void)launchTask:(NSTask *)task +{ + [self.class doLaunchTask:task]; [_runningTasks addObject:task]; } + ++ (void)launchTask:(NSTask *)task +{ + [self doLaunchTask:task]; + + [runningCrossTestTasks addObject:task]; +} #endif // HAVE_NSTASK - (NSString *)absolutePathFor:(NSString *)matterRootRelativePath +{ + return [self.class absolutePathFor:matterRootRelativePath]; +} + ++ (NSString *)absolutePathFor:(NSString *)matterRootRelativePath { // Start with the absolute path to our file, then remove the suffix that // comes after the path to the Matter SDK root. diff --git a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestDeclarations.h b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestDeclarations.h index 46d6c61e950f2d..22998eb4496216 100644 --- a/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestDeclarations.h +++ b/src/darwin/Framework/CHIPTests/TestHelpers/MTRTestDeclarations.h @@ -18,6 +18,9 @@ #import #import +// For MTRDeviceDataValueDictionary: +#import "MTRDevice_Internal.h" + NS_ASSUME_NONNULL_BEGIN #pragma mark - Declarations for internal methods @@ -55,6 +58,7 @@ NS_ASSUME_NONNULL_BEGIN #ifdef DEBUG @interface MTRDeviceController (TestDebug) - (NSDictionary *)unitTestGetDeviceAttributeCounts; +- (NSUInteger)unitTestDelegateCount; @end @interface MTRBaseDevice (TestDebug) diff --git a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj index 7d0ab045b6a25a..afc1df19338b46 100644 --- a/src/darwin/Framework/Matter.xcodeproj/project.pbxproj +++ b/src/darwin/Framework/Matter.xcodeproj/project.pbxproj @@ -232,7 +232,7 @@ 51EF279F2A2A3EB100E33F75 /* MTRBackwardsCompatShims.h in Headers */ = {isa = PBXBuildFile; fileRef = 51EF279E2A2A3EB100E33F75 /* MTRBackwardsCompatShims.h */; settings = {ATTRIBUTES = (Public, ); }; }; 51F522682AE70734000C4050 /* MTRDeviceTypeMetadata.mm in Sources */ = {isa = PBXBuildFile; fileRef = 51F522672AE70734000C4050 /* MTRDeviceTypeMetadata.mm */; }; 51F5226A2AE70761000C4050 /* MTRDeviceTypeMetadata.h in Headers */ = {isa = PBXBuildFile; fileRef = 51F522692AE70761000C4050 /* MTRDeviceTypeMetadata.h */; }; - 51F9F9D52BF7A9EE00FEA0E2 /* MTRTestServerAppRunner.m in Sources */ = {isa = PBXBuildFile; fileRef = 51F9F9D42BF7A9EE00FEA0E2 /* MTRTestServerAppRunner.m */; }; + 51F9F9D52BF7A9EE00FEA0E2 /* MTRTestCase+ServerAppRunner.m in Sources */ = {isa = PBXBuildFile; fileRef = 51F9F9D42BF7A9EE00FEA0E2 /* MTRTestCase+ServerAppRunner.m */; }; 51FE72352ACDB40000437032 /* MTRCommandPayloads_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FE72342ACDB40000437032 /* MTRCommandPayloads_Internal.h */; }; 51FE723F2ACDEF3E00437032 /* MTRCommandPayloadExtensions_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = 51FE723E2ACDEF3E00437032 /* MTRCommandPayloadExtensions_Internal.h */; }; 5A60370827EA1FF60020DB79 /* MTRClusterStateCacheContainer+XPC.h in Headers */ = {isa = PBXBuildFile; fileRef = 5A60370727EA1FF60020DB79 /* MTRClusterStateCacheContainer+XPC.h */; }; @@ -379,6 +379,7 @@ B4FCD5722B603A6300832859 /* DownloadLogCommand.mm in Sources */ = {isa = PBXBuildFile; fileRef = B4FCD56F2B603A6300832859 /* DownloadLogCommand.mm */; }; B4FCD5732B611EB300832859 /* MTRDiagnosticLogsDownloader.h in Headers */ = {isa = PBXBuildFile; fileRef = B4C8E6B32B3453AD00FCD54D /* MTRDiagnosticLogsDownloader.h */; }; BA09EB43247477BA00605257 /* libCHIP.a in Frameworks */ = {isa = PBXBuildFile; fileRef = BA09EB3F2474762900605257 /* libCHIP.a */; }; + D4288E872C8A273F002FEC53 /* MTRDevice_XPC_Internal.h in Headers */ = {isa = PBXBuildFile; fileRef = D4288E862C8A273F002FEC53 /* MTRDevice_XPC_Internal.h */; }; D444F9A72C6E8F9D007761E5 /* MTRXPCServerProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D444F9A62C6E8F9D007761E5 /* MTRXPCServerProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; D444F9AA2C6E9A08007761E5 /* MTRXPCClientProtocol.h in Headers */ = {isa = PBXBuildFile; fileRef = D444F9A82C6E99CA007761E5 /* MTRXPCClientProtocol.h */; settings = {ATTRIBUTES = (Public, ); }; }; D4772A46285AE98400383630 /* MTRClusterConstants.h in Headers */ = {isa = PBXBuildFile; fileRef = D4772A45285AE98300383630 /* MTRClusterConstants.h */; settings = {ATTRIBUTES = (Public, ); }; }; @@ -669,8 +670,8 @@ 51F522662AE7071E000C4050 /* MTRDeviceTypeMetadata-src.zapt */ = {isa = PBXFileReference; lastKnownFileType = text; path = "MTRDeviceTypeMetadata-src.zapt"; sourceTree = ""; }; 51F522672AE70734000C4050 /* MTRDeviceTypeMetadata.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = MTRDeviceTypeMetadata.mm; sourceTree = ""; }; 51F522692AE70761000C4050 /* MTRDeviceTypeMetadata.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRDeviceTypeMetadata.h; sourceTree = ""; }; - 51F9F9D32BF7A9EE00FEA0E2 /* MTRTestServerAppRunner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRTestServerAppRunner.h; sourceTree = ""; }; - 51F9F9D42BF7A9EE00FEA0E2 /* MTRTestServerAppRunner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MTRTestServerAppRunner.m; sourceTree = ""; }; + 51F9F9D32BF7A9EE00FEA0E2 /* MTRTestCase+ServerAppRunner.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = "MTRTestCase+ServerAppRunner.h"; sourceTree = ""; }; + 51F9F9D42BF7A9EE00FEA0E2 /* MTRTestCase+ServerAppRunner.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "MTRTestCase+ServerAppRunner.m"; sourceTree = ""; }; 51FE72342ACDB40000437032 /* MTRCommandPayloads_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRCommandPayloads_Internal.h; sourceTree = ""; }; 51FE723E2ACDEF3E00437032 /* MTRCommandPayloadExtensions_Internal.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRCommandPayloadExtensions_Internal.h; sourceTree = ""; }; 5A60370727EA1FF60020DB79 /* MTRClusterStateCacheContainer+XPC.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "MTRClusterStateCacheContainer+XPC.h"; sourceTree = ""; }; @@ -823,6 +824,7 @@ B4FCD56F2B603A6300832859 /* DownloadLogCommand.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = DownloadLogCommand.mm; sourceTree = ""; }; BA09EB3F2474762900605257 /* libCHIP.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libCHIP.a; path = lib/libCHIP.a; sourceTree = BUILT_PRODUCTS_DIR; }; BA107AEE2470CFBB004287EB /* chip_xcode_build_connector.sh */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.script.sh; path = chip_xcode_build_connector.sh; sourceTree = ""; }; + D4288E862C8A273F002FEC53 /* MTRDevice_XPC_Internal.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = MTRDevice_XPC_Internal.h; sourceTree = ""; }; D437613E285BDC0D0051FEA2 /* MTRErrorTestUtils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRErrorTestUtils.h; sourceTree = ""; }; D437613F285BDC0D0051FEA2 /* MTRTestKeys.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRTestKeys.h; sourceTree = ""; }; D4376140285BDC0D0051FEA2 /* MTRTestStorage.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MTRTestStorage.h; sourceTree = ""; }; @@ -1175,8 +1177,8 @@ 5131BF642BE2E1B000D5D6BC /* MTRTestCase.mm */, D437613F285BDC0D0051FEA2 /* MTRTestKeys.h */, 51C8E3F72825CDB600D47D00 /* MTRTestKeys.m */, - 51F9F9D32BF7A9EE00FEA0E2 /* MTRTestServerAppRunner.h */, - 51F9F9D42BF7A9EE00FEA0E2 /* MTRTestServerAppRunner.m */, + 51F9F9D32BF7A9EE00FEA0E2 /* MTRTestCase+ServerAppRunner.h */, + 51F9F9D42BF7A9EE00FEA0E2 /* MTRTestCase+ServerAppRunner.m */, D4376140285BDC0D0051FEA2 /* MTRTestStorage.h */, 51D10D2D2808E2CA00E8CA3D /* MTRTestStorage.m */, D437613E285BDC0D0051FEA2 /* MTRErrorTestUtils.h */, @@ -1332,6 +1334,7 @@ 7596A84228762729004DAE0E /* MTRDevice.h */, 7596A84328762729004DAE0E /* MTRDevice.mm */, 9B5CCB5A2C6EC890009DD99B /* MTRDevice_XPC.h */, + D4288E862C8A273F002FEC53 /* MTRDevice_XPC_Internal.h */, 9B5CCB5B2C6EC890009DD99B /* MTRDevice_XPC.mm */, 9BDA2A072C5D9AFB00A32BDD /* MTRDevice_Concrete.h */, 9BDA2A052C5D9AF800A32BDD /* MTRDevice_Concrete.mm */, @@ -1632,6 +1635,7 @@ 5173A47729C0E2ED00F67F48 /* MTRFabricInfo.h in Headers */, 517BF3F0282B62B800A8B7DB /* MTRCertificates.h in Headers */, 51E51FBF282AD37A00FC978D /* MTRDeviceControllerStartupParams.h in Headers */, + D4288E872C8A273F002FEC53 /* MTRDevice_XPC_Internal.h in Headers */, 5136661628067D550025EDAE /* MTRDeviceControllerFactory.h in Headers */, 9B5CCB592C6E6FD3009DD99B /* MTRDeviceController_XPC_Internal.h in Headers */, 5178E6812AE098520069DF72 /* MTRCommandTimedCheck.h in Headers */, @@ -2107,7 +2111,7 @@ 510CECA8297F72970064E0B3 /* MTROperationalCertificateIssuerTests.m in Sources */, 5A7947DE27BEC3F500434CF2 /* MTRXPCListenerSampleTests.m in Sources */, 3DFCB3292966684500332B35 /* MTRCertificateInfoTests.m in Sources */, - 51F9F9D52BF7A9EE00FEA0E2 /* MTRTestServerAppRunner.m in Sources */, + 51F9F9D52BF7A9EE00FEA0E2 /* MTRTestCase+ServerAppRunner.m in Sources */, 517BF3F3282B62CB00A8B7DB /* MTRCertificateTests.m in Sources */, 5142E39829D377F000A206F0 /* MTROTAProviderTests.m in Sources */, 51E0FC102ACBBF230001E197 /* MTRSwiftDeviceTests.swift in Sources */, diff --git a/src/include/platform/CHIPDeviceConfig.h b/src/include/platform/CHIPDeviceConfig.h index bc13696c8c36a2..f4b5fbdc41789c 100644 --- a/src/include/platform/CHIPDeviceConfig.h +++ b/src/include/platform/CHIPDeviceConfig.h @@ -146,6 +146,19 @@ #define CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL System::Clock::Milliseconds32(5000) #endif +/** + * CHIP_DEVICE_CONFIG_ICD_SIT_SLOW_POLL_LIMIT + * + * The maximum value of time in milliseconds that the sleepy end device can use as an idle interval in the SIT mode. + * The Matter spec does not allow this value to exceed 15s (spec 9.16.1.5). + * For the SIT device, the usability of this value is arguable, as slow poll interval can be configured using + * CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL. This value can be used for the LIT device, to limit the slow poll interval used while + * temporarily working in the SIT mode. + */ +#ifndef CHIP_DEVICE_CONFIG_ICD_SIT_SLOW_POLL_LIMIT +#define CHIP_DEVICE_CONFIG_ICD_SIT_SLOW_POLL_LIMIT System::Clock::Milliseconds32(15000) +#endif + /** * CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL * diff --git a/src/include/platform/NetworkCommissioning.h b/src/include/platform/NetworkCommissioning.h index 472ef6d6874d2c..a6e145cd6f7faf 100644 --- a/src/include/platform/NetworkCommissioning.h +++ b/src/include/platform/NetworkCommissioning.h @@ -247,6 +247,13 @@ class WirelessDriver : public Internal::BaseDriver * called inside ConnectNetwork. */ virtual void ConnectNetwork(ByteSpan networkId, ConnectCallback * callback) = 0; + +#if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION + /** + * @brief Disconnect from network, if currently connected. + */ + virtual CHIP_ERROR DisconnectFromNetwork() { return CHIP_ERROR_NOT_IMPLEMENTED; } +#endif }; } // namespace Internal diff --git a/src/lib/core/CHIPConfig.h b/src/lib/core/CHIPConfig.h index 7600b4eaa4c315..8936cc19c4f76d 100644 --- a/src/lib/core/CHIPConfig.h +++ b/src/lib/core/CHIPConfig.h @@ -1206,6 +1206,27 @@ extern const char CHIP_NON_PRODUCTION_MARKER[]; "Please enable at least one of CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_FAST_COPY_SUPPORT or CHIP_CONFIG_EXAMPLE_ACCESS_CONTROL_FLEXIBLE_COPY_SUPPORT" #endif +/** + * @def CHIP_CONFIG_ACCESS_RESTRICTION_MAX_ENTRIES_PER_FABRIC + * + * Defines the maximum number of access restriction list entries per + * fabric in the access control code's ARL attribute. + */ +#ifndef CHIP_CONFIG_ACCESS_RESTRICTION_MAX_ENTRIES_PER_FABRIC +#define CHIP_CONFIG_ACCESS_RESTRICTION_MAX_ENTRIES_PER_FABRIC 10 +#endif + +/** + * @def CHIP_CONFIG_ACCESS_RESTRICTION_MAX_RESTRICTIONS_PER_ENTRY + * + * Defines the maximum number of access restrictions for each entry + * in the ARL attribute (each entry is for a specific cluster on an + * endpoint on a fabric). + */ +#ifndef CHIP_CONFIG_ACCESS_RESTRICTION_MAX_RESTRICTIONS_PER_ENTRY +#define CHIP_CONFIG_ACCESS_RESTRICTION_MAX_RESTRICTIONS_PER_ENTRY 10 +#endif + /** * @def CHIP_CONFIG_CASE_SESSION_RESUME_CACHE_SIZE * diff --git a/src/lib/core/CHIPError.cpp b/src/lib/core/CHIPError.cpp index 2b2461ca79d09c..31959718b94380 100644 --- a/src/lib/core/CHIPError.cpp +++ b/src/lib/core/CHIPError.cpp @@ -362,6 +362,9 @@ bool FormatCHIPError(char * buf, uint16_t bufSize, CHIP_ERROR err) case CHIP_ERROR_VERSION_MISMATCH.AsInteger(): desc = "Version mismatch"; break; + case CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL.AsInteger(): + desc = "The CHIP message's access is restricted by ARL"; + break; case CHIP_EVENT_ID_FOUND.AsInteger(): desc = "Event ID matching criteria was found"; break; diff --git a/src/lib/core/CHIPError.h b/src/lib/core/CHIPError.h index 84b0de1a47f3ba..0a002d89c088f5 100644 --- a/src/lib/core/CHIPError.h +++ b/src/lib/core/CHIPError.h @@ -1484,7 +1484,14 @@ using CHIP_ERROR = ::chip::ChipError; */ #define CHIP_ERROR_VERSION_MISMATCH CHIP_CORE_ERROR(0xa7) -// AVAILABLE: 0xa8 +/** + * @def CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL + * + * @brief + * The CHIP message is not granted access for further processing due to Access Restriction List. + */ +#define CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL CHIP_CORE_ERROR(0xa8) + // AVAILABLE: 0xa9 // AVAILABLE: 0xaa diff --git a/src/lib/core/tests/BUILD.gn b/src/lib/core/tests/BUILD.gn index eb17707dec1755..264de2c8aafe6b 100644 --- a/src/lib/core/tests/BUILD.gn +++ b/src/lib/core/tests/BUILD.gn @@ -59,3 +59,13 @@ if (enable_fuzz_test_targets) { ] } } + +if (pw_enable_fuzz_test_targets) { + chip_pw_fuzz_target("fuzz-tlv-reader-pw") { + test_source = [ "FuzzTlvReaderPW.cpp" ] + public_deps = [ + "${chip_root}/src/lib/core", + "${chip_root}/src/platform/logging:default", + ] + } +} diff --git a/src/lib/core/tests/FuzzTlvReaderPW.cpp b/src/lib/core/tests/FuzzTlvReaderPW.cpp new file mode 100644 index 00000000000000..4296cac3cffb02 --- /dev/null +++ b/src/lib/core/tests/FuzzTlvReaderPW.cpp @@ -0,0 +1,35 @@ + +#include +#include + +#include +#include + +#include "lib/core/TLV.h" +#include "lib/core/TLVUtilities.h" + +namespace { + +using chip::TLV::TLVReader; + +using namespace fuzztest; + +static CHIP_ERROR FuzzIterator(const TLVReader & aReader, size_t aDepth, void * aContext) +{ + aReader.GetLength(); + aReader.GetTag(); + aReader.GetType(); + return CHIP_NO_ERROR; +} + +// The Property Function +void FuzzTlvReader(const std::vector & bytes) +{ + TLVReader reader; + reader.Init(bytes.data(), bytes.size()); + chip::TLV::Utilities::Iterate(reader, FuzzIterator, nullptr); +} +// Fuzz tests are instantiated with the FUZZ_TEST macro +FUZZ_TEST(TLVReader, FuzzTlvReader).WithDomains(Arbitrary>()); + +} // namespace diff --git a/src/lib/core/tests/TestCHIPErrorStr.cpp b/src/lib/core/tests/TestCHIPErrorStr.cpp index d466eb281fe0fb..01130aca4261d7 100644 --- a/src/lib/core/tests/TestCHIPErrorStr.cpp +++ b/src/lib/core/tests/TestCHIPErrorStr.cpp @@ -140,6 +140,7 @@ static const CHIP_ERROR kTestElements[] = CHIP_ERROR_ACCESS_DENIED, CHIP_ERROR_UNKNOWN_RESOURCE_ID, CHIP_ERROR_VERSION_MISMATCH, + CHIP_ERROR_ACCESS_RESTRICTED_BY_ARL, CHIP_EVENT_ID_FOUND, CHIP_ERROR_INTERNAL, CHIP_ERROR_OPEN_FAILED, diff --git a/src/lib/dnssd/minimal_mdns/tests/BUILD.gn b/src/lib/dnssd/minimal_mdns/tests/BUILD.gn index 47e83650d41acc..457c11ee688b94 100644 --- a/src/lib/dnssd/minimal_mdns/tests/BUILD.gn +++ b/src/lib/dnssd/minimal_mdns/tests/BUILD.gn @@ -53,3 +53,13 @@ if (enable_fuzz_test_targets) { ] } } + +if (pw_enable_fuzz_test_targets) { + chip_pw_fuzz_target("fuzz-minmdns-packet-parsing-pw") { + test_source = [ "FuzzPacketParsingPW.cpp" ] + public_deps = [ + "${chip_root}/src/lib/dnssd/minimal_mdns", + "${chip_root}/src/platform/logging:default", + ] + } +} diff --git a/src/lib/dnssd/minimal_mdns/tests/FuzzPacketParsingPW.cpp b/src/lib/dnssd/minimal_mdns/tests/FuzzPacketParsingPW.cpp new file mode 100644 index 00000000000000..aec550b26e026a --- /dev/null +++ b/src/lib/dnssd/minimal_mdns/tests/FuzzPacketParsingPW.cpp @@ -0,0 +1,132 @@ +#include +#include + +#include +#include + +#include +#include + +namespace { + +using namespace fuzztest; +using namespace std; + +using namespace chip; +using namespace mdns::Minimal; + +class FuzzDelegate : public ParserDelegate +{ +public: + FuzzDelegate(const mdns::Minimal::BytesRange & packet) : mPacketRange(packet) {} + virtual ~FuzzDelegate() {} + + void OnHeader(ConstHeaderRef & header) override {} + void OnQuery(const QueryData & data) override {} + void OnResource(ResourceType type, const ResourceData & data) override + { + switch (data.GetType()) + { + case QType::SRV: { + mdns::Minimal::SrvRecord srv; + (void) srv.Parse(data.GetData(), mPacketRange); + break; + } + case QType::A: { + chip::Inet::IPAddress addr; + (void) mdns::Minimal::ParseARecord(data.GetData(), &addr); + break; + } + case QType::AAAA: { + chip::Inet::IPAddress addr; + (void) mdns::Minimal::ParseAAAARecord(data.GetData(), &addr); + break; + } + case QType::PTR: { + mdns::Minimal::SerializedQNameIterator name; + (void) mdns::Minimal::ParsePtrRecord(data.GetData(), mPacketRange, &name); + break; + } + default: + // nothing to do + break; + } + } + +private: + mdns::Minimal::BytesRange mPacketRange; +}; + +void PacketParserFuzz(const std::vector & bytes) +{ + BytesRange packet(bytes.data(), bytes.data() + bytes.size()); + FuzzDelegate delegate(packet); + + mdns::Minimal::ParsePacket(packet, &delegate); +} + +FUZZ_TEST(MinimalmDNS, PacketParserFuzz).WithDomains(Arbitrary>()); + +class TxtRecordAccumulator : public TxtRecordDelegate +{ +public: + using DataType = vector>; + + void OnRecord(const BytesRange & name, const BytesRange & value) override + { + mData.push_back(make_pair(AsString(name), AsString(value))); + } + + DataType & Data() { return mData; } + const DataType & Data() const { return mData; } + +private: + DataType mData; + + static string AsString(const BytesRange & range) + { + return string(reinterpret_cast(range.Start()), reinterpret_cast(range.End())); + } +}; + +// The Property Function +void TxtResponderFuzz(const std::vector & aRecord) +{ + + bool equal_sign_present = false; + auto equal_sign_pos = aRecord.end(); + + // This test is only giving a set of values, it can be gives more + vector prefixedRecord{ static_cast(aRecord.size()) }; + + prefixedRecord.insert(prefixedRecord.end(), aRecord.begin(), aRecord.end()); + + TxtRecordAccumulator accumulator; + + // The Function under Test, Check that the function does not Crash + ParseTxtRecord(BytesRange(prefixedRecord.data(), (&prefixedRecord.back() + 1)), &accumulator); + + for (auto it = aRecord.begin(); it != aRecord.end(); it++) + { + // if this is first `=` found in the fuzzed record + if ('=' == static_cast(*it) && false == equal_sign_present) + { + equal_sign_present = true; + equal_sign_pos = it; + } + } + + // The Fuzzed Input (record) needs to have at least two characters in order for ParseTxtRecord to do something + if (aRecord.size() > 1) + { + if (true == equal_sign_present) + { + std::string input_record_value(equal_sign_pos + 1, aRecord.end()); + EXPECT_EQ(accumulator.Data().at(0).second, input_record_value); + } + } +} + +FUZZ_TEST(MinimalmDNS, TxtResponderFuzz).WithDomains(Arbitrary>().WithMaxSize(254)); + +} // namespace diff --git a/src/lib/format/tests/BUILD.gn b/src/lib/format/tests/BUILD.gn index 840a2eede60c78..1ce417ea91cdc3 100644 --- a/src/lib/format/tests/BUILD.gn +++ b/src/lib/format/tests/BUILD.gn @@ -57,3 +57,18 @@ if (enable_fuzz_test_targets) { ] } } + +if (pw_enable_fuzz_test_targets) { + chip_pw_fuzz_target("fuzz-payload-decoder-pw") { + test_source = [ "FuzzPayloadDecoderPW.cpp" ] + public_deps = [ + "${chip_root}/src/controller/data_model:cluster-tlv-metadata", + "${chip_root}/src/lib/core", + "${chip_root}/src/lib/format:flat-tree", + "${chip_root}/src/lib/format:protocol-decoder", + "${chip_root}/src/lib/format:protocol-tlv-metadata", + "${chip_root}/src/lib/support", + "${chip_root}/src/platform/logging:stdio", + ] + } +} diff --git a/src/lib/format/tests/FuzzPayloadDecoderPW.cpp b/src/lib/format/tests/FuzzPayloadDecoderPW.cpp new file mode 100644 index 00000000000000..52b51b308d0c2a --- /dev/null +++ b/src/lib/format/tests/FuzzPayloadDecoderPW.cpp @@ -0,0 +1,73 @@ +/* + * + * Copyright (c) 2020-2021 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +#include +#include +#include +#include + +#include +#include + +#include +#include + +namespace { + +using namespace chip::Decoders; +using namespace chip::FlatTree; +using namespace chip::TLV; +using namespace chip::TLVMeta; +using namespace fuzztest; + +// The Property Function; The FUZZ_TEST macro will call this function, with the fuzzed input domains +void RunDecodeFuzz(const std::vector & bytes, chip::Protocols::Id mProtocol, uint8_t mMessageType) +{ + + PayloadDecoderInitParams params; + params.SetProtocolDecodeTree(chip::TLVMeta::protocols_meta).SetClusterDecodeTree(chip::TLVMeta::clusters_meta); + + // Fuzzing with different Protocols + params.SetProtocol(mProtocol); + + // Fuzzing with different MessageTypes + params.SetMessageType(mMessageType); + chip::Decoders::PayloadDecoder<64, 128> decoder(params); + + chip::ByteSpan payload(bytes.data(), bytes.size()); + + decoder.StartDecoding(payload); + + PayloadEntry entry; + while (decoder.Next(entry)) + { + // Nothing to do ... + } +} + +// This function allows us to fuzz using one of four protocols; by using FuzzTests's `ElementOf` API, we define an +// input domain by explicitly enumerating the set of values in it More Info: +// https://github.com/google/fuzztest/blob/main/doc/domains-reference.md#elementof-domains-element-of +auto AnyProtocolID() +{ + return ElementOf({ chip::Protocols::SecureChannel::Id, chip::Protocols::InteractionModel::Id, chip::Protocols::BDX::Id, + chip::Protocols::UserDirectedCommissioning::Id }); +} + +FUZZ_TEST(PayloadDecoder, RunDecodeFuzz).WithDomains(Arbitrary>(), AnyProtocolID(), Arbitrary()); + +} // namespace diff --git a/src/lib/support/BUILD.gn b/src/lib/support/BUILD.gn index 38ee31fccb94e5..3fd3d7e16754ca 100644 --- a/src/lib/support/BUILD.gn +++ b/src/lib/support/BUILD.gn @@ -23,6 +23,7 @@ import("${chip_root}/build/chip/chip_version.gni") import("${chip_root}/build/chip/java/config.gni") import("${chip_root}/build/chip/tests.gni") import("${chip_root}/src/lib/core/core.gni") +import("${chip_root}/src/platform/device.gni") declare_args() { # Set to true to run the PersistentStorageDelegate API compliance audit @@ -205,6 +206,7 @@ static_library("support") { "Defer.h", "FibonacciUtils.cpp", "FibonacciUtils.h", + "FileDescriptor.h", "FixedBufferAllocator.cpp", "FixedBufferAllocator.h", "Fold.h", @@ -238,6 +240,7 @@ static_library("support") { "StringBuilder.cpp", "StringBuilder.h", "StringSplitter.h", + "TemporaryFileStream.h", "ThreadOperationalDataset.cpp", "ThreadOperationalDataset.h", "TimeUtils.cpp", @@ -255,7 +258,7 @@ static_library("support") { "verhoeff/Verhoeff10.cpp", ] - if (current_os == "android" || matter_enable_java_compilation) { + if (chip_device_platform == "android" || matter_enable_java_compilation) { if (matter_enable_java_compilation) { include_dirs = java_matter_controller_dependent_paths } @@ -304,7 +307,7 @@ static_library("support") { # Platforms that utilize CHIP_SYSTEM_CONFIG_PLATFORM_LOG need to # be pulled in here as public_deps since they hook into logging at # the macro level rather than just providing a LogV implementation. - if (current_os == "mac" || current_os == "ios") { + if (chip_device_platform == "darwin") { public_deps += [ "${chip_root}/src/platform/Darwin:logging" ] } diff --git a/src/lib/support/FileDescriptor.h b/src/lib/support/FileDescriptor.h new file mode 100644 index 00000000000000..8f5a00d6b315ad --- /dev/null +++ b/src/lib/support/FileDescriptor.h @@ -0,0 +1,62 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include + +namespace chip { + +/// Unix file descriptor wrapper with RAII semantics. +class FileDescriptor +{ +public: + FileDescriptor() = default; + explicit FileDescriptor(int fd) : mFd(fd) {} + ~FileDescriptor() { Close(); } + + /// Disallow copy and assignment. + FileDescriptor(const FileDescriptor &) = delete; + FileDescriptor & operator=(const FileDescriptor &) = delete; + + FileDescriptor(FileDescriptor && other) noexcept : mFd(other.Release()) {} + FileDescriptor & operator=(FileDescriptor && other) noexcept + { + Close(); + mFd = other.Release(); + return *this; + } + + int Get() const { return mFd; } + + int Release() { return std::exchange(mFd, -1); } + + int Close() + { + if (mFd != -1) + { + return close(std::exchange(mFd, -1)); + } + return 0; + } + +private: + int mFd = -1; +}; + +} // namespace chip diff --git a/src/lib/support/IntrusiveList.h b/src/lib/support/IntrusiveList.h index 961113e8d1ee6b..a38516cbfb91c8 100644 --- a/src/lib/support/IntrusiveList.h +++ b/src/lib/support/IntrusiveList.h @@ -414,6 +414,11 @@ class IntrusiveList : public IntrusiveListBase ConstIterator(IntrusiveListBase::ConstIteratorBase && base) : IntrusiveListBase::ConstIteratorBase(std::move(base)) {} const T * operator->() { return Hook::ToObject(mCurrent); } const T & operator*() { return *Hook::ToObject(mCurrent); } + + ConstIterator & operator++() { return static_cast(IntrusiveListBase::ConstIteratorBase::operator++()); } + ConstIterator operator++(int) { return IntrusiveListBase::ConstIteratorBase::operator++(1); } + ConstIterator & operator--() { return static_cast(IntrusiveListBase::ConstIteratorBase::operator--()); } + ConstIterator operator--(int) { return IntrusiveListBase::ConstIteratorBase::operator--(1); } }; class Iterator : public IntrusiveListBase::IteratorBase @@ -426,6 +431,11 @@ class IntrusiveList : public IntrusiveListBase Iterator(IntrusiveListBase::IteratorBase && base) : IntrusiveListBase::IteratorBase(std::move(base)) {} T * operator->() { return Hook::ToObject(mCurrent); } T & operator*() { return *Hook::ToObject(mCurrent); } + + Iterator & operator++() { return static_cast(IntrusiveListBase::IteratorBase::operator++()); } + Iterator operator++(int) { return IntrusiveListBase::IteratorBase::operator++(1); } + Iterator & operator--() { return static_cast(IntrusiveListBase::IteratorBase::operator--()); } + Iterator operator--(int) { return IntrusiveListBase::IteratorBase::operator--(1); } }; ConstIterator begin() const { return IntrusiveListBase::begin(); } diff --git a/src/lib/support/Span.h b/src/lib/support/Span.h index 2e6627d937e560..bba719e69e779c 100644 --- a/src/lib/support/Span.h +++ b/src/lib/support/Span.h @@ -390,4 +390,18 @@ inline CHIP_ERROR CopyCharSpanToMutableCharSpan(CharSpan cspan_to_copy, MutableC return CHIP_NO_ERROR; } +/** + * Copies a CharSpan into a MutableCharSpan. + * If the span_to_copy does not fit in out_span, span_to_copy is truncated to fit in out_span. + * @param span_to_copy The CharSpan to copy. + * @param out_span The MutableCharSpan in which span_to_copy is to be copied. + */ +inline void CopyCharSpanToMutableCharSpanWithTruncation(CharSpan span_to_copy, MutableCharSpan & out_span) +{ + size_t size_to_copy = std::min(span_to_copy.size(), out_span.size()); + + memcpy(out_span.data(), span_to_copy.data(), size_to_copy); + out_span.reduce_size(size_to_copy); +} + } // namespace chip diff --git a/src/lib/support/TemporaryFileStream.h b/src/lib/support/TemporaryFileStream.h new file mode 100644 index 00000000000000..a96a23917b23ce --- /dev/null +++ b/src/lib/support/TemporaryFileStream.h @@ -0,0 +1,107 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * All rights reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include +#include +#include +#include +#include + +#include + +namespace chip { +namespace DeviceLayer { +namespace Internal { + +class FileDescriptorStreamBuf : public std::streambuf +{ +public: + FileDescriptorStreamBuf() = default; + explicit FileDescriptorStreamBuf(int fd) : mFd(fd) {} + + FileDescriptorStreamBuf(FileDescriptorStreamBuf &) = delete; + FileDescriptorStreamBuf & operator=(FileDescriptorStreamBuf &) = delete; + + FileDescriptorStreamBuf(FileDescriptorStreamBuf && other) = default; + FileDescriptorStreamBuf & operator=(FileDescriptorStreamBuf && other) = default; + +protected: + int overflow(int c) override + { + if (c != EOF) + { + char z = c; + if (write(mFd, &z, 1) != 1) + { + return EOF; + } + } + return c; + } + + std::streamsize xsputn(const char * s, std::streamsize n) override { return write(mFd, s, static_cast(n)); } + +private: + int mFd = -1; +}; + +/// File stream for a temporary file compatible with std::ostream. +class TemporaryFileStream : public std::ostream +{ +public: + TemporaryFileStream() : std::ostream(&mBuf) {} + explicit TemporaryFileStream(std::string nameTemplate) : std::ostream(&mBuf) { Open(std::move(nameTemplate)); }; + + /// Disallow copy and assignment. + TemporaryFileStream(const TemporaryFileStream &) = delete; + TemporaryFileStream & operator=(const TemporaryFileStream &) = delete; + + /// Open a temporary file with a given name template. + /// + /// In order to check if the file was opened successfully, use IsOpen(). + void Open(std::string nameTemplate) + { + mFileName = std::move(nameTemplate); + mFd = FileDescriptor(mkstemp(mFileName.data())); + mBuf = FileDescriptorStreamBuf(mFd.Get()); + } + + /// Check if the file was opened successfully. + /// + /// In case of failure, the error can be retrieved using errno. + bool IsOpen() const { return mFd.Get() != -1; }; + + /// Synchronize the file's contents with the underlying storage device. + /// + /// In case of failure, the error can be retrieved using errno. + bool DataSync() { return fdatasync(mFd.Get()) == 0; } + + /// Get the name of created temporary file. + const std::string & GetFileName() const { return mFileName; } + +private: + FileDescriptor mFd; + FileDescriptorStreamBuf mBuf; + std::string mFileName; +}; + +} // namespace Internal +} // namespace DeviceLayer +} // namespace chip diff --git a/src/messaging/tests/TestReliableMessageProtocol.cpp b/src/messaging/tests/TestReliableMessageProtocol.cpp index 68b6ed2852d377..6390e4eca1920e 100644 --- a/src/messaging/tests/TestReliableMessageProtocol.cpp +++ b/src/messaging/tests/TestReliableMessageProtocol.cpp @@ -92,6 +92,12 @@ class MockAppDelegate : public UnsolicitedMessageHandler, public ExchangeDelegat System::PacketBufferHandle && buffer) override { IsOnMessageReceivedCalled = true; + + if (ec->HasSessionHandle() && ec->GetSessionHolder()->IsSecureSession()) + { + mLastSubjectDescriptor = ec->GetSessionHolder()->AsSecureSession()->GetSubjectDescriptor(); + } + if (payloadHeader.IsAckMsg()) { mReceivedPiggybackAck = true; @@ -125,6 +131,7 @@ class MockAppDelegate : public UnsolicitedMessageHandler, public ExchangeDelegat EXPECT_EQ(buffer->TotalLength(), sizeof(PAYLOAD)); EXPECT_EQ(memcmp(buffer->Start(), PAYLOAD, buffer->TotalLength()), 0); + return CHIP_NO_ERROR; } @@ -151,6 +158,8 @@ class MockAppDelegate : public UnsolicitedMessageHandler, public ExchangeDelegat } } + Access::SubjectDescriptor mLastSubjectDescriptor{}; + bool IsOnMessageReceivedCalled = false; bool mReceivedPiggybackAck = false; bool mRetainExchange = false; @@ -1830,9 +1839,12 @@ TEST_F(TestReliableMessageProtocol, CheckApplicationResponseDelayed) EXPECT_EQ(loopback.mSentMessageCount, kMaxMRPTransmits); EXPECT_EQ(loopback.mDroppedMessageCount, kMaxMRPTransmits - 1); EXPECT_EQ(rm->TestGetCountRetransTable(), 1); // We have no ack yet. - EXPECT_TRUE(mockReceiver.IsOnMessageReceivedCalled); // Other side got the message. + ASSERT_TRUE(mockReceiver.IsOnMessageReceivedCalled); // Other side got the message. EXPECT_FALSE(mockSender.IsOnMessageReceivedCalled); // We did not get a response. + // It was not a commissioning CASE session so that is lined-up properly. + EXPECT_FALSE(mockReceiver.mLastSubjectDescriptor.isCommissioning); + // Ensure there will be no more weirdness with acks and that our MRP timer is restarted properly. mockReceiver.SetDropAckResponse(false); diff --git a/src/platform/Darwin/PlatformManagerImpl.cpp b/src/platform/Darwin/PlatformManagerImpl.cpp index d1dc5308c869e9..d68304ef696d30 100644 --- a/src/platform/Darwin/PlatformManagerImpl.cpp +++ b/src/platform/Darwin/PlatformManagerImpl.cpp @@ -35,7 +35,11 @@ #include // Include the non-inline definitions for the GenericPlatformManagerImpl<> template, +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH #include +#else +#include +#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH #include #include @@ -64,7 +68,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() ReturnErrorOnFailure(Internal::PosixConfig::Init()); #endif // CHIP_DISABLE_PLATFORM_KVS -#if !CHIP_SYSTEM_CONFIG_USE_LIBEV +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH // Ensure there is a dispatch queue available static_cast(DeviceLayer::SystemLayer()).SetDispatchQueue(GetWorkQueue()); #endif @@ -83,6 +87,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack() return CHIP_NO_ERROR; } +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH CHIP_ERROR PlatformManagerImpl::_StartEventLoopTask() { auto expected = WorkQueueState::kSuspended; @@ -128,12 +133,6 @@ void PlatformManagerImpl::_RunEventLoop() mRunLoopSem = nullptr; } -void PlatformManagerImpl::_Shutdown() -{ - // Call up to the base class _Shutdown() to perform the bulk of the shutdown. - GenericPlatformManagerImpl::_Shutdown(); -} - CHIP_ERROR PlatformManagerImpl::_PostEvent(const ChipDeviceEvent * event) { const ChipDeviceEvent eventCopy = *event; @@ -142,6 +141,7 @@ CHIP_ERROR PlatformManagerImpl::_PostEvent(const ChipDeviceEvent * event) }); return CHIP_NO_ERROR; } +#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH #if CHIP_STACK_LOCK_TRACKING_ENABLED bool PlatformManagerImpl::_IsChipStackLockedByCurrentThread() const diff --git a/src/platform/Darwin/PlatformManagerImpl.h b/src/platform/Darwin/PlatformManagerImpl.h index ba37badf4628b5..24357c905f9887 100644 --- a/src/platform/Darwin/PlatformManagerImpl.h +++ b/src/platform/Darwin/PlatformManagerImpl.h @@ -25,7 +25,12 @@ #include #include + +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH #include +#else +#include +#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH #include #include @@ -38,7 +43,12 @@ class BleScannerDelegate; /** * Concrete implementation of the PlatformManager singleton object for Darwin platforms. */ -class PlatformManagerImpl final : public PlatformManager, public Internal::GenericPlatformManagerImpl +class PlatformManagerImpl final : public PlatformManager, +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH + public Internal::GenericPlatformManagerImpl +#else + public Internal::GenericPlatformManagerImpl_POSIX +#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH { // Allow the PlatformManager interface class to delegate method calls to // the implementation methods provided by this class. @@ -58,8 +68,8 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener private: // ===== Methods that implement the PlatformManager abstract interface. CHIP_ERROR _InitChipStack(); - void _Shutdown(); +#if CHIP_SYSTEM_CONFIG_USE_DISPATCH CHIP_ERROR _StartChipTimer(System::Clock::Timeout delay) { return CHIP_ERROR_NOT_IMPLEMENTED; }; CHIP_ERROR _StartEventLoopTask(); CHIP_ERROR _StopEventLoopTask(); @@ -69,6 +79,7 @@ class PlatformManagerImpl final : public PlatformManager, public Internal::Gener bool _TryLockChipStack() { return false; }; void _UnlockChipStack(){}; CHIP_ERROR _PostEvent(const ChipDeviceEvent * event); +#endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH #if CHIP_STACK_LOCK_TRACKING_ENABLED bool _IsChipStackLockedByCurrentThread() const; diff --git a/src/platform/Darwin/SystemPlatformConfig.h b/src/platform/Darwin/SystemPlatformConfig.h index 5311b538ed7ea2..242755933c10bb 100644 --- a/src/platform/Darwin/SystemPlatformConfig.h +++ b/src/platform/Darwin/SystemPlatformConfig.h @@ -34,14 +34,6 @@ struct ChipDeviceEvent; // ==================== Platform Adaptations ==================== -#if !CHIP_SYSTEM_CONFIG_USE_LIBEV -// FIXME: these should not be hardcoded here, it is set via build config -// Need to exclude these for now in libev case -#define CHIP_SYSTEM_CONFIG_POSIX_LOCKING 0 -#define CHIP_SYSTEM_CONFIG_FREERTOS_LOCKING 0 -#define CHIP_SYSTEM_CONFIG_NO_LOCKING 1 -#endif - #define CHIP_SYSTEM_CONFIG_PLATFORM_PROVIDES_TIME 1 #define CHIP_SYSTEM_CONFIG_USE_POSIX_TIME_FUNCTS 1 #define CHIP_SYSTEM_CONFIG_POOL_USE_HEAP 1 diff --git a/src/platform/ESP32/CHIPPlatformConfig.h b/src/platform/ESP32/CHIPPlatformConfig.h index 82b6a6262a1e1b..e5b189772662d1 100644 --- a/src/platform/ESP32/CHIPPlatformConfig.h +++ b/src/platform/ESP32/CHIPPlatformConfig.h @@ -69,6 +69,18 @@ #define CHIP_CONFIG_MAX_FABRICS CONFIG_MAX_FABRICS #endif +#ifndef CHIP_CONFIG_MAX_GROUP_ENDPOINTS_PER_FABRIC +#define CHIP_CONFIG_MAX_GROUP_ENDPOINTS_PER_FABRIC CONFIG_MAX_GROUP_ENDPOINTS_PER_FABRIC +#endif + +#ifndef CHIP_CONFIG_MAX_GROUPS_PER_FABRIC +#define CHIP_CONFIG_MAX_GROUPS_PER_FABRIC (CONFIG_MAX_GROUPS_PER_FABRIC_PER_ENDPOINT * CHIP_CONFIG_MAX_GROUP_ENDPOINTS_PER_FABRIC) +#endif + +#ifndef CHIP_CONFIG_MAX_GROUP_KEYS_PER_FABRIC +#define CHIP_CONFIG_MAX_GROUP_KEYS_PER_FABRIC CONFIG_MAX_GROUP_KEYS_PER_FABRIC +#endif + #ifdef CONFIG_ENABLE_WIFI_STATION #define CHIP_DEVICE_CONFIG_ENABLE_WIFI_STATION 1 #else @@ -146,3 +158,9 @@ #ifndef CHIP_CONFIG_RMP_DEFAULT_MAX_RETRANS #define CHIP_CONFIG_RMP_DEFAULT_MAX_RETRANS CONFIG_MRP_MAX_RETRANS #endif // CHIP_CONFIG_RMP_DEFAULT_MAX_RETRANS + +#ifdef CONFIG_CHIP_SYSTEM_CONFIG_POOL_USE_HEAP +#define CHIP_SYSTEM_CONFIG_POOL_USE_HEAP 1 +#else +#define CHIP_SYSTEM_CONFIG_POOL_USE_HEAP 0 +#endif diff --git a/src/platform/ESP32/ConfigurationManagerImpl.cpp b/src/platform/ESP32/ConfigurationManagerImpl.cpp index e03ec70ce8192b..31c7cb714f96c0 100644 --- a/src/platform/ESP32/ConfigurationManagerImpl.cpp +++ b/src/platform/ESP32/ConfigurationManagerImpl.cpp @@ -45,14 +45,26 @@ namespace DeviceLayer { using namespace ::chip::DeviceLayer::Internal; -// TODO: Define a Singleton instance of CHIP Group Key Store here (#1266) - ConfigurationManagerImpl & ConfigurationManagerImpl::GetDefaultInstance() { static ConfigurationManagerImpl sInstance; return sInstance; } +uint32_t ConfigurationManagerImpl::mTotalOperationalHours = 0; + +void ConfigurationManagerImpl::TotalOperationalHoursTimerCallback(TimerHandle_t timer) +{ + mTotalOperationalHours++; + + CHIP_ERROR err = ConfigurationMgrImpl().StoreTotalOperationalHours(mTotalOperationalHours); + + if (err != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Failed to store total operational hours: %" CHIP_ERROR_FORMAT, err.Format()); + } +} + CHIP_ERROR ConfigurationManagerImpl::Init() { CHIP_ERROR err; @@ -161,18 +173,34 @@ CHIP_ERROR ConfigurationManagerImpl::Init() SuccessOrExit(err); } - if (!ESP32Config::ConfigValueExists(ESP32Config::kCounterKey_TotalOperationalHours)) + if (CHIP_NO_ERROR != GetTotalOperationalHours(mTotalOperationalHours)) { - err = StoreTotalOperationalHours(0); + err = StoreTotalOperationalHours(mTotalOperationalHours); SuccessOrExit(err); } + { + // Start a timer which reloads every one hour and bumps the total operational hours + TickType_t reloadPeriod = (1000 * 60 * 60) / portTICK_PERIOD_MS; + TimerHandle_t timerHandle = xTimerCreate("tOpHrs", reloadPeriod, pdPASS, nullptr, TotalOperationalHoursTimerCallback); + if (timerHandle == nullptr) + { + err = CHIP_ERROR_NO_MEMORY; + ExitNow(ChipLogError(DeviceLayer, "total operational hours Timer creation failed")); + } + + BaseType_t timerStartStatus = xTimerStart(timerHandle, 0); + if (timerStartStatus == pdFAIL) + { + err = CHIP_ERROR_INTERNAL; + ExitNow(ChipLogError(DeviceLayer, "total operational hours Timer start failed")); + } + } + // Initialize the generic implementation base class. err = Internal::GenericConfigurationManagerImpl::Init(); SuccessOrExit(err); - // TODO: Initialize the global GroupKeyStore object here (#1266) - err = CHIP_NO_ERROR; exit: diff --git a/src/platform/ESP32/ConfigurationManagerImpl.h b/src/platform/ESP32/ConfigurationManagerImpl.h index 1416df35d93b65..63b3e094763a75 100644 --- a/src/platform/ESP32/ConfigurationManagerImpl.h +++ b/src/platform/ESP32/ConfigurationManagerImpl.h @@ -98,6 +98,9 @@ class ConfigurationManagerImpl : public Internal::GenericConfigurationManagerImp // ===== Private members reserved for use by this class only. static void DoFactoryReset(intptr_t arg); + + static uint32_t mTotalOperationalHours; + static void TotalOperationalHoursTimerCallback(TimerHandle_t timer); }; /** diff --git a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp index 33de4d372199ee..fc2992f20d3fc9 100644 --- a/src/platform/ESP32/DiagnosticDataProviderImpl.cpp +++ b/src/platform/ESP32/DiagnosticDataProviderImpl.cpp @@ -206,7 +206,7 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** esp_netif_t * netif = esp_netif_next(NULL); NetworkInterface * head = NULL; uint8_t ipv6_addr_count = 0; - esp_ip6_addr_t ip6_addr[kMaxIPv6AddrCount]; + esp_ip6_addr_t ip6_addr[LWIP_IPV6_NUM_ADDRESSES]; if (netif == NULL) { ChipLogError(DeviceLayer, "Failed to get network interfaces"); @@ -253,7 +253,6 @@ CHIP_ERROR DiagnosticDataProviderImpl::GetNetworkInterfaces(NetworkInterface ** #endif // !defined(CONFIG_DISABLE_IPV4) static_assert(kMaxIPv6AddrCount <= UINT8_MAX, "Count might not fit in ipv6_addr_count"); - static_assert(ArraySize(ip6_addr) >= LWIP_IPV6_NUM_ADDRESSES, "Not enough space for our addresses."); auto addr_count = esp_netif_get_all_ip6(ifa, ip6_addr); if (addr_count < 0) { diff --git a/src/platform/ESP32/ESP32DnssdImpl.cpp b/src/platform/ESP32/ESP32DnssdImpl.cpp index e898a9cadf767d..30e0c3e2bcaea8 100644 --- a/src/platform/ESP32/ESP32DnssdImpl.cpp +++ b/src/platform/ESP32/ESP32DnssdImpl.cpp @@ -177,6 +177,12 @@ CHIP_ERROR EspDnssdPublishService(const DnssdService * service, DnssdPublishCall } } + // Remove service before adding it + if (mdns_service_exists(service->mType, GetProtocolString(service->mProtocol), nullptr)) + { + mdns_service_remove_for_host(service->mName, service->mType, GetProtocolString(service->mProtocol), nullptr); + } + espError = mdns_service_add(service->mName, service->mType, GetProtocolString(service->mProtocol), service->mPort, items, service->mTextEntrySize); // The mdns_service_add will return error if we try to add an existing service @@ -205,9 +211,18 @@ CHIP_ERROR EspDnssdPublishService(const DnssdService * service, DnssdPublishCall CHIP_ERROR EspDnssdRemoveServices() { - mdns_service_remove("_matter", "_tcp"); - mdns_service_remove("_matterc", "_udp"); - mdns_service_remove("_matterd", "_udp"); + if (mdns_service_exists("_matter", "_tcp", nullptr)) + { + mdns_service_remove("_matter", "_tcp"); + } + if (mdns_service_exists("_matterc", "_udp", nullptr)) + { + mdns_service_remove("_matterc", "_udp"); + } + if (mdns_service_exists("_matterd", "_udp", nullptr)) + { + mdns_service_remove("_matterd", "_udp"); + } return CHIP_NO_ERROR; } diff --git a/src/platform/ESP32/KeyValueStoreManagerImpl.cpp b/src/platform/ESP32/KeyValueStoreManagerImpl.cpp index 6617bb2cb11bf0..3c587167334de2 100644 --- a/src/platform/ESP32/KeyValueStoreManagerImpl.cpp +++ b/src/platform/ESP32/KeyValueStoreManagerImpl.cpp @@ -68,7 +68,7 @@ KeyValueStoreManagerImpl KeyValueStoreManagerImpl::sInstance; CHIP_ERROR KeyValueStoreManagerImpl::_Get(const char * key, void * value, size_t value_size, size_t * read_bytes_size, size_t offset_bytes) { - VerifyOrReturnError(value, CHIP_ERROR_INVALID_ARGUMENT); + // value may be NULL when checking whether the key exists // Offset and partial reads are not supported in nvs, for now just return NOT_IMPLEMENTED. Support can be added in the // future if this is needed. diff --git a/src/platform/ESP32/NetworkCommissioningDriver.cpp b/src/platform/ESP32/NetworkCommissioningDriver.cpp index 2871c4c3f2031d..3845287cfdb919 100644 --- a/src/platform/ESP32/NetworkCommissioningDriver.cpp +++ b/src/platform/ESP32/NetworkCommissioningDriver.cpp @@ -95,39 +95,31 @@ CHIP_ERROR GetConfiguredNetwork(Network & network) CHIP_ERROR ESPWiFiDriver::Init(NetworkStatusChangeCallback * networkStatusChangeCallback) { - CHIP_ERROR err; - size_t ssidLen = 0; - size_t credentialsLen = 0; - - err = PersistedStorage::KeyValueStoreMgr().Get(kWiFiCredentialsKeyName, mSavedNetwork.credentials, - sizeof(mSavedNetwork.credentials), &credentialsLen); - if (err == CHIP_ERROR_NOT_FOUND) + wifi_config_t stationConfig; + if (esp_wifi_get_config(WIFI_IF_STA, &stationConfig) == ESP_OK && stationConfig.sta.ssid[0] != 0) { - return CHIP_NO_ERROR; - } + uint8_t ssidLen = static_cast( + strnlen(reinterpret_cast(stationConfig.sta.ssid), DeviceLayer::Internal::kMaxWiFiSSIDLength)); + memcpy(mStagingNetwork.ssid, stationConfig.sta.ssid, ssidLen); + mStagingNetwork.ssidLen = ssidLen; - err = PersistedStorage::KeyValueStoreMgr().Get(kWiFiSSIDKeyName, mSavedNetwork.ssid, sizeof(mSavedNetwork.ssid), &ssidLen); - if (err == CHIP_ERROR_NOT_FOUND) - { - return CHIP_NO_ERROR; - } - if (!CanCastTo(credentialsLen)) - { - return CHIP_ERROR_INCORRECT_STATE; - } - mSavedNetwork.credentialsLen = static_cast(credentialsLen); + uint8_t credentialsLen = static_cast( + strnlen(reinterpret_cast(stationConfig.sta.password), DeviceLayer::Internal::kMaxWiFiKeyLength)); - if (!CanCastTo(ssidLen)) - { - return CHIP_ERROR_INCORRECT_STATE; + memcpy(mStagingNetwork.credentials, stationConfig.sta.password, credentialsLen); + mStagingNetwork.credentialsLen = credentialsLen; } - mSavedNetwork.ssidLen = static_cast(ssidLen); - mStagingNetwork = mSavedNetwork; mpScanCallback = nullptr; mpConnectCallback = nullptr; mpStatusChangeCallback = networkStatusChangeCallback; - return err; + + // If the network configuration backup exists, it means that the device has been rebooted with + // the fail-safe armed. Since ESP-WiFi persists all wifi credentials changes, the backup must + // be restored on the boot. If there's no backup, the below function is a no-op. + RevertConfiguration(); + + return CHIP_NO_ERROR; } void ESPWiFiDriver::Shutdown() @@ -137,17 +129,51 @@ void ESPWiFiDriver::Shutdown() CHIP_ERROR ESPWiFiDriver::CommitConfiguration() { - ReturnErrorOnFailure(PersistedStorage::KeyValueStoreMgr().Put(kWiFiSSIDKeyName, mStagingNetwork.ssid, mStagingNetwork.ssidLen)); - ReturnErrorOnFailure(PersistedStorage::KeyValueStoreMgr().Put(kWiFiCredentialsKeyName, mStagingNetwork.credentials, - mStagingNetwork.credentialsLen)); - mSavedNetwork = mStagingNetwork; + PersistedStorage::KeyValueStoreMgr().Delete(kWiFiSSIDKeyName); + PersistedStorage::KeyValueStoreMgr().Delete(kWiFiCredentialsKeyName); + return CHIP_NO_ERROR; } CHIP_ERROR ESPWiFiDriver::RevertConfiguration() { - mStagingNetwork = mSavedNetwork; - return CHIP_NO_ERROR; + WiFiNetwork network; + Network configuredNetwork; + size_t ssidLen = 0; + size_t credentialsLen = 0; + + CHIP_ERROR error = PersistedStorage::KeyValueStoreMgr().Get(kWiFiSSIDKeyName, network.ssid, sizeof(network.ssid), &ssidLen); + ReturnErrorCodeIf(error == CHIP_ERROR_PERSISTED_STORAGE_VALUE_NOT_FOUND, CHIP_NO_ERROR); + VerifyOrExit(CanCastTo(ssidLen), error = CHIP_ERROR_INTERNAL); + VerifyOrExit(PersistedStorage::KeyValueStoreMgr().Get(kWiFiCredentialsKeyName, network.credentials, sizeof(network.credentials), + &credentialsLen) == CHIP_NO_ERROR, + error = CHIP_ERROR_INTERNAL); + VerifyOrExit(CanCastTo(credentialsLen), error = CHIP_ERROR_INTERNAL); + + network.ssidLen = static_cast(ssidLen); + network.credentialsLen = static_cast(credentialsLen); + mStagingNetwork = network; + + if (GetConfiguredNetwork(configuredNetwork) == CHIP_NO_ERROR) + { + VerifyOrExit(!NetworkMatch(mStagingNetwork, ByteSpan(configuredNetwork.networkID, configuredNetwork.networkIDLen)), + error = CHIP_NO_ERROR); + } + + if (error == CHIP_NO_ERROR) + { + // ConnectWiFiNetwork can work with empty mStagingNetwork (ssidLen = 0). + error = ConnectWiFiNetwork(reinterpret_cast(mStagingNetwork.ssid), mStagingNetwork.ssidLen, + reinterpret_cast(mStagingNetwork.credentials), mStagingNetwork.credentialsLen); + } + +exit: + + // Remove the backup. + PersistedStorage::KeyValueStoreMgr().Delete(kWiFiSSIDKeyName); + PersistedStorage::KeyValueStoreMgr().Delete(kWiFiCredentialsKeyName); + + return error; } bool ESPWiFiDriver::NetworkMatch(const WiFiNetwork & network, ByteSpan networkId) @@ -163,6 +189,7 @@ Status ESPWiFiDriver::AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials, Mu VerifyOrReturnError(mStagingNetwork.ssidLen == 0 || NetworkMatch(mStagingNetwork, ssid), Status::kBoundsExceeded); VerifyOrReturnError(credentials.size() <= sizeof(mStagingNetwork.credentials), Status::kOutOfRange); VerifyOrReturnError(ssid.size() <= sizeof(mStagingNetwork.ssid), Status::kOutOfRange); + VerifyOrReturnError(BackupConfiguration() == CHIP_NO_ERROR, Status::kUnknownError); memcpy(mStagingNetwork.credentials, credentials.data(), credentials.size()); mStagingNetwork.credentialsLen = static_cast(credentials.size()); @@ -178,6 +205,7 @@ Status ESPWiFiDriver::RemoveNetwork(ByteSpan networkId, MutableCharSpan & outDeb outDebugText.reduce_size(0); outNetworkIndex = 0; VerifyOrReturnError(NetworkMatch(mStagingNetwork, networkId), Status::kNetworkIDNotFound); + VerifyOrReturnError(BackupConfiguration() == CHIP_NO_ERROR, Status::kUnknownError); // Use empty ssid for representing invalid network mStagingNetwork.ssidLen = 0; @@ -236,6 +264,18 @@ CHIP_ERROR ESPWiFiDriver::ConnectWiFiNetwork(const char * ssid, uint8_t ssidLen, return ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Enabled); } +#if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION +CHIP_ERROR ESPWiFiDriver::DisconnectFromNetwork() +{ + if (chip::DeviceLayer::Internal::ESP32Utils::IsStationProvisioned()) + { + // Attaching to an empty network will disconnect the network. + ReturnErrorOnFailure(ConnectWiFiNetwork(nullptr, 0, nullptr, 0)); + } + return CHIP_NO_ERROR; +} +#endif + void ESPWiFiDriver::OnConnectWiFiNetwork() { if (mpConnectCallback) @@ -273,6 +313,7 @@ void ESPWiFiDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * callbac const uint32_t secToMiliSec = 1000; VerifyOrExit(NetworkMatch(mStagingNetwork, networkId), networkingStatus = Status::kNetworkIDNotFound); + VerifyOrExit(BackupConfiguration() == CHIP_NO_ERROR, networkingStatus = Status::kUnknownError); VerifyOrExit(mpConnectCallback == nullptr, networkingStatus = Status::kUnknownError); ChipLogProgress(NetworkProvisioning, "ESP NetworkCommissioningDelegate: SSID: %.*s", static_cast(networkId.size()), networkId.data()); @@ -484,6 +525,19 @@ bool ESPWiFiDriver::WiFiNetworkIterator::Next(Network & item) return true; } +CHIP_ERROR ESPWiFiDriver::BackupConfiguration() +{ + CHIP_ERROR err = PersistedStorage::KeyValueStoreMgr().Get(kWiFiSSIDKeyName, nullptr, 0); + if (err == CHIP_NO_ERROR || err == CHIP_ERROR_BUFFER_TOO_SMALL) + { + return CHIP_NO_ERROR; + } + ReturnErrorOnFailure(PersistedStorage::KeyValueStoreMgr().Put(kWiFiCredentialsKeyName, mStagingNetwork.credentials, + mStagingNetwork.credentialsLen)); + ReturnErrorOnFailure(PersistedStorage::KeyValueStoreMgr().Put(kWiFiSSIDKeyName, mStagingNetwork.ssid, mStagingNetwork.ssidLen)); + return CHIP_NO_ERROR; +} + } // namespace NetworkCommissioning } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/ESP32/NetworkCommissioningDriver.h b/src/platform/ESP32/NetworkCommissioningDriver.h index 447d6346dcbd1c..e49a8efd66edd5 100644 --- a/src/platform/ESP32/NetworkCommissioningDriver.h +++ b/src/platform/ESP32/NetworkCommissioningDriver.h @@ -107,6 +107,9 @@ class ESPWiFiDriver final : public WiFiDriver Status RemoveNetwork(ByteSpan networkId, MutableCharSpan & outDebugText, uint8_t & outNetworkIndex) override; Status ReorderNetwork(ByteSpan networkId, uint8_t index, MutableCharSpan & outDebugText) override; void ConnectNetwork(ByteSpan networkId, ConnectCallback * callback) override; +#if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION + CHIP_ERROR DisconnectFromNetwork() override; +#endif // WiFiDriver Status AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials, MutableCharSpan & outDebugText, @@ -133,8 +136,8 @@ class ESPWiFiDriver final : public WiFiDriver private: bool NetworkMatch(const WiFiNetwork & network, ByteSpan networkId); CHIP_ERROR StartScanWiFiNetworks(ByteSpan ssid); + CHIP_ERROR BackupConfiguration(); - WiFiNetwork mSavedNetwork; WiFiNetwork mStagingNetwork; ScanCallback * mpScanCallback; ConnectCallback * mpConnectCallback; diff --git a/src/platform/ESP32/OpenthreadLauncher.cpp b/src/platform/ESP32/OpenthreadLauncher.cpp index d40e228954c5ee..63f1bac825214f 100644 --- a/src/platform/ESP32/OpenthreadLauncher.cpp +++ b/src/platform/ESP32/OpenthreadLauncher.cpp @@ -138,7 +138,7 @@ static void ot_task_worker(void * context) vTaskDelete(NULL); } -#ifdef CONFIG_OPENTHREAD_BORDER_ROUTER +#if defined(CONFIG_OPENTHREAD_BORDER_ROUTER) && defined(CONFIG_AUTO_UPDATE_RCP) static constexpr size_t kRcpVersionMaxSize = 100; static const char * TAG = "RCP_UPDATE"; @@ -183,16 +183,14 @@ static void try_update_ot_rcp(const esp_openthread_platform_config_t * config) esp_restart(); } } -#endif // CONFIG_OPENTHREAD_BORDER_ROUTER static void rcp_failure_handler(void) { -#ifdef CONFIG_OPENTHREAD_BORDER_ROUTER esp_rcp_mark_image_unusable(); try_update_ot_rcp(s_platform_config); -#endif // CONFIG_OPENTHREAD_BORDER_ROUTER esp_rcp_reset(); } +#endif // CONFIG_OPENTHREAD_BORDER_ROUTER && CONFIG_AUTO_UPDATE_RCP esp_err_t set_openthread_platform_config(esp_openthread_platform_config_t * config) { @@ -208,7 +206,7 @@ esp_err_t set_openthread_platform_config(esp_openthread_platform_config_t * conf return ESP_OK; } -#ifdef CONFIG_OPENTHREAD_BORDER_ROUTER +#if defined(CONFIG_OPENTHREAD_BORDER_ROUTER) && defined(CONFIG_AUTO_UPDATE_RCP) esp_err_t openthread_init_br_rcp(const esp_rcp_update_config_t * update_config) { esp_err_t err = ESP_OK; @@ -219,7 +217,7 @@ esp_err_t openthread_init_br_rcp(const esp_rcp_update_config_t * update_config) esp_openthread_register_rcp_failure_handler(rcp_failure_handler); return err; } -#endif // CONFIG_OPENTHREAD_BORDER_ROUTER +#endif // CONFIG_OPENTHREAD_BORDER_ROUTER && CONFIG_AUTO_UPDATE_RCP esp_err_t openthread_init_stack(void) { @@ -236,9 +234,9 @@ esp_err_t openthread_init_stack(void) assert(s_platform_config); // Initialize the OpenThread stack ESP_ERROR_CHECK(esp_openthread_init(s_platform_config)); -#ifdef CONFIG_OPENTHREAD_BORDER_ROUTER +#if defined(CONFIG_OPENTHREAD_BORDER_ROUTER) && defined(CONFIG_AUTO_UPDATE_RCP) try_update_ot_rcp(s_platform_config); -#endif // CONFIG_OPENTHREAD_BORDER_ROUTER +#endif // CONFIG_OPENTHREAD_BORDER_ROUTER && CONFIG_AUTO_UPDATE_RCP #ifdef CONFIG_OPENTHREAD_CLI esp_openthread_matter_cli_init(); cli_command_transmit_task(); diff --git a/src/platform/ESP32/OpenthreadLauncher.h b/src/platform/ESP32/OpenthreadLauncher.h index f6a7eb5d210cec..a15125f948d1dc 100644 --- a/src/platform/ESP32/OpenthreadLauncher.h +++ b/src/platform/ESP32/OpenthreadLauncher.h @@ -19,13 +19,13 @@ #include #include -#include #include #include -#ifdef CONFIG_OPENTHREAD_BORDER_ROUTER +#if defined(CONFIG_OPENTHREAD_BORDER_ROUTER) && defined(CONFIG_AUTO_UPDATE_RCP) +#include esp_err_t openthread_init_br_rcp(const esp_rcp_update_config_t * update_config); -#endif +#endif // CONFIG_OPENTHREAD_BORDER_ROUTER && CONFIG_AUTO_UPDATE_RCP esp_err_t set_openthread_platform_config(esp_openthread_platform_config_t * config); esp_err_t openthread_init_stack(void); esp_err_t openthread_launch_task(void); diff --git a/src/platform/Linux/CHIPLinuxStorage.cpp b/src/platform/Linux/CHIPLinuxStorage.cpp index 9a8afb59d706fa..f1ce35b58cb38c 100644 --- a/src/platform/Linux/CHIPLinuxStorage.cpp +++ b/src/platform/Linux/CHIPLinuxStorage.cpp @@ -53,7 +53,6 @@ CHIP_ERROR ChipLinuxStorage::Init(const char * configFile) { CHIP_ERROR retval = CHIP_NO_ERROR; - ChipLogDetail(DeviceLayer, "ChipLinuxStorage::Init: Using KVS config file: %s", StringOrNullMarker(configFile)); if (mInitialized) { ChipLogError(DeviceLayer, "ChipLinuxStorage::Init: Attempt to re-initialize with KVS config file: %s", @@ -61,6 +60,8 @@ CHIP_ERROR ChipLinuxStorage::Init(const char * configFile) return CHIP_NO_ERROR; } + ChipLogDetail(DeviceLayer, "ChipLinuxStorage::Init: Using KVS config file: %s", StringOrNullMarker(configFile)); + mConfigPath.assign(configFile); retval = ChipLinuxStorageIni::Init(); diff --git a/src/platform/Linux/CHIPLinuxStorageIni.cpp b/src/platform/Linux/CHIPLinuxStorageIni.cpp index 7186fe3d477fbf..6c629d29bd9451 100644 --- a/src/platform/Linux/CHIPLinuxStorageIni.cpp +++ b/src/platform/Linux/CHIPLinuxStorageIni.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -91,34 +92,23 @@ CHIP_ERROR ChipLinuxStorageIni::AddConfig(const std::string & configFile) // 3. Using rename() to overwrite the existing file CHIP_ERROR ChipLinuxStorageIni::CommitConfig(const std::string & configFile) { - CHIP_ERROR retval = CHIP_NO_ERROR; - std::string tmpPath = configFile + "-XXXXXX"; - - int fd = mkstemp(&tmpPath[0]); - if (fd != -1) - { - std::ofstream ofs; - ofs.open(tmpPath, std::ofstream::out | std::ofstream::trunc); - mConfigStore.generate(ofs); - close(fd); - - if (rename(tmpPath.c_str(), configFile.c_str()) == 0) - { - ChipLogDetail(DeviceLayer, "wrote settings to %s", configFile.c_str()); - } - else - { - ChipLogError(DeviceLayer, "failed to rename (%s), %s (%d)", tmpPath.c_str(), strerror(errno), errno); - retval = CHIP_ERROR_WRITE_FAILED; - } - } - else - { - ChipLogError(DeviceLayer, "failed to open file (%s) for writing", tmpPath.c_str()); - retval = CHIP_ERROR_OPEN_FAILED; - } - - return retval; + TemporaryFileStream tmpFile(configFile + "-XXXXXX"); + VerifyOrReturnError( + tmpFile.IsOpen(), CHIP_ERROR_OPEN_FAILED, + ChipLogError(DeviceLayer, "Failed to create temp file %s: %s", tmpFile.GetFileName().c_str(), strerror(errno))); + + mConfigStore.generate(tmpFile); + VerifyOrReturnError( + tmpFile.DataSync(), CHIP_ERROR_WRITE_FAILED, + ChipLogError(DeviceLayer, "Failed to sync temp file %s: %s", tmpFile.GetFileName().c_str(), strerror(errno))); + + int rv = rename(tmpFile.GetFileName().c_str(), configFile.c_str()); + VerifyOrReturnError(rv == 0, CHIP_ERROR_WRITE_FAILED, + ChipLogError(DeviceLayer, "Failed to rename %s to %s: %s", tmpFile.GetFileName().c_str(), + configFile.c_str(), strerror(errno))); + + ChipLogDetail(DeviceLayer, "Wrote settings to %s", configFile.c_str()); + return CHIP_NO_ERROR; } CHIP_ERROR ChipLinuxStorageIni::GetUInt16Value(const char * key, uint16_t & val) diff --git a/src/platform/NuttX/CHIPLinuxStorageIni.cpp b/src/platform/NuttX/CHIPLinuxStorageIni.cpp index e9dbe107ffad9e..686d04fc629e30 100644 --- a/src/platform/NuttX/CHIPLinuxStorageIni.cpp +++ b/src/platform/NuttX/CHIPLinuxStorageIni.cpp @@ -31,6 +31,7 @@ #include #include #include +#include #include #include #include @@ -91,38 +92,23 @@ CHIP_ERROR ChipLinuxStorageIni::AddConfig(const std::string & configFile) // 3. Using rename() to overwrite the existing file CHIP_ERROR ChipLinuxStorageIni::CommitConfig(const std::string & configFile) { - CHIP_ERROR retval = CHIP_NO_ERROR; - std::string tmpPath = configFile + "-XXXXXX"; - - int fd = mkstemp(&tmpPath[0]); - if (fd != -1) - { - std::ofstream ofs; - - ChipLogProgress(DeviceLayer, "writing settings to file (%s)", tmpPath.c_str()); - - ofs.open(tmpPath, std::ofstream::out | std::ofstream::trunc); - mConfigStore.generate(ofs); - - close(fd); - - if (rename(tmpPath.c_str(), configFile.c_str()) == 0) - { - ChipLogProgress(DeviceLayer, "renamed tmp file to file (%s)", configFile.c_str()); - } - else - { - ChipLogError(DeviceLayer, "failed to rename (%s), %s (%d)", tmpPath.c_str(), strerror(errno), errno); - retval = CHIP_ERROR_WRITE_FAILED; - } - } - else - { - ChipLogError(DeviceLayer, "failed to open file (%s) for writing", tmpPath.c_str()); - retval = CHIP_ERROR_OPEN_FAILED; - } - - return retval; + TemporaryFileStream tmpFile(configFile + "-XXXXXX"); + VerifyOrReturnError( + tmpFile.IsOpen(), CHIP_ERROR_OPEN_FAILED, + ChipLogError(DeviceLayer, "Failed to create temp file %s: %s", tmpFile.GetFileName().c_str(), strerror(errno))); + + mConfigStore.generate(tmpFile); + VerifyOrReturnError( + tmpFile.DataSync(), CHIP_ERROR_WRITE_FAILED, + ChipLogError(DeviceLayer, "Failed to sync temp file %s: %s", tmpFile.GetFileName().c_str(), strerror(errno))); + + int rv = rename(tmpFile.GetFileName().c_str(), configFile.c_str()); + VerifyOrReturnError(rv == 0, CHIP_ERROR_WRITE_FAILED, + ChipLogError(DeviceLayer, "Failed to rename %s to %s: %s", tmpFile.GetFileName().c_str(), + configFile.c_str(), strerror(errno))); + + ChipLogDetail(DeviceLayer, "Wrote settings to %s", configFile.c_str()); + return CHIP_NO_ERROR; } CHIP_ERROR ChipLinuxStorageIni::GetUInt16Value(const char * key, uint16_t & val) diff --git a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp index 0e7701ec481add..cb0b05a57e3510 100644 --- a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp +++ b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.cpp @@ -189,6 +189,24 @@ void GenericThreadDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * c status = Status::kUnknownError; } + if (status == Status::kSuccess && ThreadStackMgrImpl().IsThreadAttached()) + { + Thread::OperationalDataset currentDataset; + if (ThreadStackMgrImpl().GetThreadProvision(currentDataset) == CHIP_NO_ERROR) + { + // Clear the previous srp host and services + if (!currentDataset.AsByteSpan().data_equal(mStagingNetwork.AsByteSpan()) && + ThreadStackMgrImpl().ClearAllSrpHostAndServices() != CHIP_NO_ERROR) + { + status = Status::kUnknownError; + } + } + else + { + status = Status::kUnknownError; + } + } + if (status == Status::kSuccess && DeviceLayer::ThreadStackMgrImpl().AttachToThreadNetwork(mStagingNetwork, callback) != CHIP_NO_ERROR) { @@ -277,6 +295,19 @@ void GenericThreadDriver::CheckInterfaceEnabled() #endif } +#if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION +CHIP_ERROR GenericThreadDriver::DisconnectFromNetwork() +{ + if (ThreadStackMgrImpl().IsThreadProvisioned()) + { + Thread::OperationalDataset emptyNetwork = {}; + // Attach to an empty network will disconnect the driver. + ReturnErrorOnFailure(ThreadStackMgrImpl().AttachToThreadNetwork(emptyNetwork, nullptr)); + } + return CHIP_NO_ERROR; +} +#endif + size_t GenericThreadDriver::ThreadNetworkIterator::Count() { return driver->mStagingNetwork.IsCommissioned() ? 1 : 0; diff --git a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h index 7fd62159a36522..f570a85fef0211 100644 --- a/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h +++ b/src/platform/OpenThread/GenericNetworkCommissioningThreadDriver.h @@ -110,6 +110,9 @@ class GenericThreadDriver final : public ThreadDriver Status RemoveNetwork(ByteSpan networkId, MutableCharSpan & outDebugText, uint8_t & outNetworkIndex) override; Status ReorderNetwork(ByteSpan networkId, uint8_t index, MutableCharSpan & outDebugText) override; void ConnectNetwork(ByteSpan networkId, ConnectCallback * callback) override; +#if CHIP_DEVICE_CONFIG_SUPPORTS_CONCURRENT_CONNECTION + CHIP_ERROR DisconnectFromNetwork() override; +#endif // ThreadDriver Status AddOrUpdateNetwork(ByteSpan operationalDataset, MutableCharSpan & outDebugText, uint8_t & outNetworkIndex) override; diff --git a/src/platform/Zephyr/BUILD.gn b/src/platform/Zephyr/BUILD.gn index f1d9bdb2cef34f..035c13a1cd7a5f 100644 --- a/src/platform/Zephyr/BUILD.gn +++ b/src/platform/Zephyr/BUILD.gn @@ -40,6 +40,7 @@ static_library("Zephyr") { "DiagnosticDataProviderImpl.h", "DiagnosticDataProviderImplGetter.cpp", "InetPlatformConfig.h", + "InetUtils.cpp", "KeyValueStoreManagerImpl.cpp", "KeyValueStoreManagerImpl.h", "PlatformManagerImpl.cpp", diff --git a/src/platform/Zephyr/ConnectivityManagerImpl.cpp b/src/platform/Zephyr/ConnectivityManagerImpl.cpp index 17cdf46370f2d2..d13a4cebc4e5f6 100644 --- a/src/platform/Zephyr/ConnectivityManagerImpl.cpp +++ b/src/platform/Zephyr/ConnectivityManagerImpl.cpp @@ -17,11 +17,16 @@ #include +#include +#include +#include #include +#include #include -#include -#include +#ifndef CONFIG_ARCH_POSIX +#include +#endif #include @@ -34,15 +39,62 @@ #endif #if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#include #include #endif -using namespace ::chip; +using namespace ::chip::Inet; using namespace ::chip::DeviceLayer::Internal; namespace chip { namespace DeviceLayer { +namespace { +CHIP_ERROR JoinLeaveMulticastGroup(net_if * iface, const Inet::IPAddress & address, + UDPEndPointImplSockets::MulticastOperation operation) +{ +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + if (net_if_l2(iface) == &NET_L2_GET_NAME(OPENTHREAD)) + { + const otIp6Address otAddress = ToOpenThreadIP6Address(address); + const auto handler = operation == UDPEndPointImplSockets::MulticastOperation::kJoin ? otIp6SubscribeMulticastAddress + : otIp6UnsubscribeMulticastAddress; + otError error; + + ThreadStackMgr().LockThreadStack(); + error = handler(openthread_get_default_instance(), &otAddress); + ThreadStackMgr().UnlockThreadStack(); + + return MapOpenThreadError(error); + } +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI || CHIP_DEVICE_CONFIG_ENABLE_ETHERNET + const in6_addr in6Addr = InetUtils::ToZephyrAddr(address); + + if (operation == UDPEndPointImplSockets::MulticastOperation::kJoin) + { + net_if_mcast_addr * maddr = net_if_ipv6_maddr_add(iface, &in6Addr); + + if (maddr && !net_if_ipv6_maddr_is_joined(maddr)) + { + net_if_ipv6_maddr_join(iface, maddr); + } + } + else if (operation == UDPEndPointImplSockets::MulticastOperation::kLeave) + { + VerifyOrReturnError(net_if_ipv6_maddr_rm(iface, &in6Addr), CHIP_ERROR_INVALID_ADDRESS); + } + else + { + return CHIP_ERROR_INCORRECT_STATE; + } +#endif + + return CHIP_NO_ERROR; +} +} // namespace + ConnectivityManagerImpl ConnectivityManagerImpl::sInstance; CHIP_ERROR ConnectivityManagerImpl::_Init() @@ -50,6 +102,30 @@ CHIP_ERROR ConnectivityManagerImpl::_Init() #if CHIP_DEVICE_CONFIG_ENABLE_THREAD GenericConnectivityManagerImpl_Thread::_Init(); #endif +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI + ReturnErrorOnFailure(InitWiFi()); +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD || CHIP_DEVICE_CONFIG_ENABLE_WIFI || CHIP_DEVICE_CONFIG_ENABLE_ETHERNET + UDPEndPointImplSockets::SetMulticastGroupHandler( + [](InterfaceId interfaceId, const IPAddress & address, UDPEndPointImplSockets::MulticastOperation operation) { + if (interfaceId.IsPresent()) + { + net_if * iface = InetUtils::GetInterface(interfaceId); + VerifyOrReturnError(iface != nullptr, INET_ERROR_UNKNOWN_INTERFACE); + + return JoinLeaveMulticastGroup(iface, address, operation); + } + + // If the interface is not specified, join or leave the multicast group on all interfaces. + for (int i = 1; net_if * iface = net_if_get_by_index(i); i++) + { + ReturnErrorOnFailure(JoinLeaveMulticastGroup(iface, address, operation)); + } + + return CHIP_NO_ERROR; + }); +#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD || CHIP_DEVICE_CONFIG_ENABLE_WIFI return CHIP_NO_ERROR; } diff --git a/src/platform/Zephyr/ConnectivityManagerImpl.h b/src/platform/Zephyr/ConnectivityManagerImpl.h index 4c003f23a4861a..0a60770157087e 100644 --- a/src/platform/Zephyr/ConnectivityManagerImpl.h +++ b/src/platform/Zephyr/ConnectivityManagerImpl.h @@ -100,7 +100,7 @@ inline ConnectivityManager & ConnectivityMgr(void) * Returns the platform-specific implementation of the ConnectivityManager singleton object. * * chip applications can use this to gain access to features of the ConnectivityManager - * that are specific to the ESP32 platform. + * that are specific to the Zephyr platform. */ inline ConnectivityManagerImpl & ConnectivityMgrImpl(void) { diff --git a/src/platform/Zephyr/wifi/ConnectivityManagerImplWiFi.cpp b/src/platform/Zephyr/wifi/ConnectivityManagerImplWiFi.cpp index 5bef79bb22fdc5..9b605c31560142 100644 --- a/src/platform/Zephyr/wifi/ConnectivityManagerImplWiFi.cpp +++ b/src/platform/Zephyr/wifi/ConnectivityManagerImplWiFi.cpp @@ -42,7 +42,7 @@ ConnectivityManager::WiFiStationMode ConnectivityManagerImplWiFi::_GetWiFiStatio { if (mStationMode != ConnectivityManager::WiFiStationMode::kWiFiStationMode_ApplicationControlled) { - mStationMode = (WiFiManager::StationStatus::DISABLED == WiFiManager().Instance().GetStationStatus()) + mStationMode = (WiFiManager::StationStatus::DISABLED == WiFiManager::Instance().GetStationStatus()) ? ConnectivityManager::WiFiStationMode::kWiFiStationMode_Disabled : ConnectivityManager::WiFiStationMode::kWiFiStationMode_Enabled; } @@ -60,7 +60,7 @@ CHIP_ERROR ConnectivityManagerImplWiFi::_SetWiFiStationMode(ConnectivityManager: bool ConnectivityManagerImplWiFi::_IsWiFiStationEnabled(void) { - return (WiFiManager::StationStatus::DISABLED <= WiFiManager().Instance().GetStationStatus()); + return (WiFiManager::StationStatus::DISABLED <= WiFiManager::Instance().GetStationStatus()); } bool ConnectivityManagerImplWiFi::_IsWiFiStationApplicationControlled(void) @@ -70,7 +70,7 @@ bool ConnectivityManagerImplWiFi::_IsWiFiStationApplicationControlled(void) bool ConnectivityManagerImplWiFi::_IsWiFiStationConnected(void) { - return (WiFiManager::StationStatus::CONNECTED == WiFiManager().Instance().GetStationStatus()); + return (WiFiManager::StationStatus::CONNECTED == WiFiManager::Instance().GetStationStatus()); } System::Clock::Timeout ConnectivityManagerImplWiFi::_GetWiFiStationReconnectInterval(void) @@ -88,14 +88,14 @@ bool ConnectivityManagerImplWiFi::_IsWiFiStationProvisioned(void) { // from Matter perspective `provisioned` means that the supplicant has been provided // with SSID and password (doesn't matter if valid or not) - return (WiFiManager::StationStatus::CONNECTING <= WiFiManager().Instance().GetStationStatus()); + return (WiFiManager::StationStatus::CONNECTING <= WiFiManager::Instance().GetStationStatus()); } void ConnectivityManagerImplWiFi::_ClearWiFiStationProvision(void) { if (_IsWiFiStationProvisioned()) { - if (CHIP_NO_ERROR != WiFiManager().Instance().ClearStationProvisioningData()) + if (CHIP_NO_ERROR != WiFiManager::Instance().ClearStationProvisioningData()) { ChipLogError(DeviceLayer, "Cannot clear WiFi station provisioning data"); } @@ -104,9 +104,9 @@ void ConnectivityManagerImplWiFi::_ClearWiFiStationProvision(void) bool ConnectivityManagerImplWiFi::_CanStartWiFiScan() { - return (WiFiManager::StationStatus::DISABLED != WiFiManager().Instance().GetStationStatus() && - WiFiManager::StationStatus::SCANNING != WiFiManager().Instance().GetStationStatus() && - WiFiManager::StationStatus::CONNECTING != WiFiManager().Instance().GetStationStatus()); + return (WiFiManager::StationStatus::DISABLED != WiFiManager::Instance().GetStationStatus() && + WiFiManager::StationStatus::SCANNING != WiFiManager::Instance().GetStationStatus() && + WiFiManager::StationStatus::CONNECTING != WiFiManager::Instance().GetStationStatus()); } void ConnectivityManagerImplWiFi::_OnWiFiStationProvisionChange() diff --git a/src/platform/Zephyr/wifi/WiFiManager.cpp b/src/platform/Zephyr/wifi/WiFiManager.cpp index 11187a7cef1655..6dbc4930314fb1 100644 --- a/src/platform/Zephyr/wifi/WiFiManager.cpp +++ b/src/platform/Zephyr/wifi/WiFiManager.cpp @@ -23,10 +23,9 @@ #include "WiFiManager.h" #include -#include -#include #include #include +#include #include #include @@ -50,6 +49,21 @@ namespace DeviceLayer { namespace { +app::Clusters::NetworkCommissioning::WiFiBandEnum ConvertBandEnum(uint8_t band) +{ + switch (band) + { + case WIFI_FREQ_BAND_2_4_GHZ: + return app::Clusters::NetworkCommissioning::WiFiBandEnum::k2g4; + case WIFI_FREQ_BAND_5_GHZ: + return app::Clusters::NetworkCommissioning::WiFiBandEnum::k5g; + case WIFI_FREQ_BAND_6_GHZ: + return app::Clusters::NetworkCommissioning::WiFiBandEnum::k6g; + default: + return app::Clusters::NetworkCommissioning::WiFiBandEnum::kUnknownEnumValue; + } +} + NetworkCommissioning::WiFiScanResponse ToScanResponse(const wifi_scan_result * result) { NetworkCommissioning::WiFiScanResponse response = {}; @@ -62,9 +76,10 @@ NetworkCommissioning::WiFiScanResponse ToScanResponse(const wifi_scan_result * r // TODO: Distinguish WPA versions response.security.Set(result->security == WIFI_SECURITY_TYPE_PSK ? NetworkCommissioning::WiFiSecurity::kWpaPersonal : NetworkCommissioning::WiFiSecurity::kUnencrypted); - response.channel = result->channel; - response.rssi = result->rssi; - response.ssidLen = result->ssid_length; + response.channel = result->channel; + response.rssi = result->rssi; + response.ssidLen = result->ssid_length; + response.wiFiBand = ConvertBandEnum(result->band); memcpy(response.ssid, result->ssid, result->ssid_length); // TODO: MAC/BSSID is not filled by the Wi-Fi driver memcpy(response.bssid, result->mac, result->mac_length); @@ -138,57 +153,43 @@ const Map { WIFI_STATE_GROUP_HANDSHAKE, WiFiManager::StationStatus::PROVISIONING }, { WIFI_STATE_COMPLETED, WiFiManager::StationStatus::FULLY_PROVISIONED } }); -const Map - WiFiManager::sEventHandlerMap({ { NET_EVENT_WIFI_SCAN_RESULT, WiFiManager::ScanResultHandler }, - { NET_EVENT_WIFI_SCAN_DONE, WiFiManager::ScanDoneHandler }, - { NET_EVENT_WIFI_CONNECT_RESULT, WiFiManager::ConnectHandler }, - { NET_EVENT_WIFI_DISCONNECT_RESULT, WiFiManager::DisconnectHandler }, - { NET_EVENT_WIFI_DISCONNECT_COMPLETE, WiFiManager::DisconnectHandler } }); +const Map WiFiManager::sEventHandlerMap({ + { NET_EVENT_WIFI_SCAN_RESULT, WiFiManager::ScanResultHandler }, + { NET_EVENT_WIFI_SCAN_DONE, WiFiManager::ScanDoneHandler }, + { NET_EVENT_WIFI_CONNECT_RESULT, WiFiManager::ConnectHandler }, + { NET_EVENT_WIFI_DISCONNECT_RESULT, WiFiManager::DisconnectHandler }, + { NET_EVENT_WIFI_DISCONNECT_COMPLETE, WiFiManager::DisconnectHandler }, +}); void WiFiManager::WifiMgmtEventHandler(net_mgmt_event_callback * cb, uint32_t mgmtEvent, net_if * iface) { - if (0 == strcmp(iface->if_dev->dev->name, InetUtils::GetInterface()->if_dev->dev->name)) + if (iface == Instance().mNetIf) { Platform::UniquePtr eventData(new uint8_t[cb->info_length]); VerifyOrReturn(eventData); memcpy(eventData.get(), cb->info, cb->info_length); - sEventHandlerMap[mgmtEvent](std::move(eventData)); + sEventHandlerMap[mgmtEvent](std::move(eventData), cb->info_length); } } -CHIP_ERROR WiFiManager::Init() +void WiFiManager::IPv6MgmtEventHandler(net_mgmt_event_callback * cb, uint32_t mgmtEvent, net_if * iface) { - // TODO: consider moving these to ConnectivityManagerImpl to be prepared for handling multiple interfaces on a single device. - Inet::UDPEndPointImplSockets::SetMulticastGroupHandler([](Inet::InterfaceId interfaceId, const Inet::IPAddress & address, - Inet::UDPEndPointImplSockets::MulticastOperation operation) { - const in6_addr addr = InetUtils::ToZephyrAddr(address); - net_if * iface = InetUtils::GetInterface(interfaceId); - VerifyOrReturnError(iface != nullptr, INET_ERROR_UNKNOWN_INTERFACE); - - if (operation == Inet::UDPEndPointImplSockets::MulticastOperation::kJoin) - { - net_if_mcast_addr * maddr = net_if_ipv6_maddr_add(iface, &addr); - - if (maddr && !net_if_ipv6_maddr_is_joined(maddr) && !net_ipv6_is_addr_mcast_link_all_nodes(&addr)) - { - net_if_ipv6_maddr_join(iface, maddr); - } - } - else if (operation == Inet::UDPEndPointImplSockets::MulticastOperation::kLeave) - { - VerifyOrReturnError(net_ipv6_is_addr_mcast_link_all_nodes(&addr) || net_if_ipv6_maddr_rm(iface, &addr), - CHIP_ERROR_INVALID_ADDRESS); - } - else - { - return CHIP_ERROR_INCORRECT_STATE; - } + if (((mgmtEvent == NET_EVENT_IPV6_ADDR_ADD) || (mgmtEvent == NET_EVENT_IPV6_ADDR_DEL)) && cb->info) + { + IPv6AddressChangeHandler(cb->info); + } +} - return CHIP_NO_ERROR; - }); +CHIP_ERROR WiFiManager::Init() +{ + mNetIf = InetUtils::GetWiFiInterface(); + VerifyOrReturnError(mNetIf != nullptr, INET_ERROR_UNKNOWN_INTERFACE); net_mgmt_init_event_callback(&mWiFiMgmtClbk, WifiMgmtEventHandler, kWifiManagementEvents); + net_mgmt_init_event_callback(&mIPv6MgmtClbk, IPv6MgmtEventHandler, kIPv6ManagementEvents); + net_mgmt_add_event_callback(&mWiFiMgmtClbk); + net_mgmt_add_event_callback(&mIPv6MgmtClbk); ChipLogDetail(DeviceLayer, "WiFiManager has been initialized"); @@ -197,9 +198,6 @@ CHIP_ERROR WiFiManager::Init() CHIP_ERROR WiFiManager::Scan(const ByteSpan & ssid, ScanResultCallback resultCallback, ScanDoneCallback doneCallback, bool internalScan) { - net_if * iface = InetUtils::GetInterface(); - VerifyOrReturnError(nullptr != iface, CHIP_ERROR_INTERNAL); - mInternalScan = internalScan; mScanResultCallback = resultCallback; mScanDoneCallback = doneCallback; @@ -207,17 +205,22 @@ CHIP_ERROR WiFiManager::Scan(const ByteSpan & ssid, ScanResultCallback resultCal mWiFiState = WIFI_STATE_SCANNING; mSsidFound = false; - /* If the ssid is not null, it means the scan must target a specific SSID, and only include this one in the scan - * result. To do so, we save the requested ssid and we will filter the scan results accordingly in the scan done - * handler. */ - if ((ssid.size() > 0) && (!mInternalScan)) + wifi_scan_params * scanParams{ nullptr }; + size_t scanParamsSize{ 0 }; + + if (!ssid.empty()) { - mNetworkToScan.Erase(); - memcpy(mNetworkToScan.ssid, ssid.data(), ssid.size()); - mNetworkToScan.ssidLen = ssid.size(); + /* We must assume that the ssid is handled as a NULL-terminated string. + Note that the mScanSsidBuffer is initialized with zeros. */ + VerifyOrReturnError(ssid.size() < sizeof(mScanSsidBuffer), CHIP_ERROR_INVALID_ARGUMENT); + memcpy(mScanSsidBuffer, ssid.data(), ssid.size()); + mScanSsidBuffer[ssid.size()] = 0; // indicate the end of ssid string + mScanParams.ssids[0] = mScanSsidBuffer; + mScanParams.ssids[1] = nullptr; // indicate the end of ssids list + scanParams = &mScanParams; + scanParamsSize = sizeof(*scanParams); } - - if (0 != net_mgmt(NET_REQUEST_WIFI_SCAN, iface, NULL, 0)) + if (0 != net_mgmt(NET_REQUEST_WIFI_SCAN, mNetIf, scanParams, scanParamsSize)) { ChipLogError(DeviceLayer, "Scan request failed"); return CHIP_ERROR_INTERNAL; @@ -239,9 +242,7 @@ CHIP_ERROR WiFiManager::Connect(const ByteSpan & ssid, const ByteSpan & credenti { ChipLogDetail(DeviceLayer, "Connecting to WiFi network: %.*s", ssid.size(), ssid.data()); - mHandling.mOnConnectionSuccess = handling.mOnConnectionSuccess; - mHandling.mOnConnectionFailed = handling.mOnConnectionFailed; - mHandling.mConnectionTimeout = handling.mConnectionTimeout; + mHandling = handling; mWiFiState = WIFI_STATE_ASSOCIATING; @@ -258,11 +259,8 @@ CHIP_ERROR WiFiManager::Connect(const ByteSpan & ssid, const ByteSpan & credenti CHIP_ERROR WiFiManager::Disconnect() { - net_if * iface = InetUtils::GetInterface(); - VerifyOrReturnError(nullptr != iface, CHIP_ERROR_INTERNAL); - mApplicationDisconnectRequested = true; - int status = net_mgmt(NET_REQUEST_WIFI_DISCONNECT, iface, NULL, 0); + int status = net_mgmt(NET_REQUEST_WIFI_DISCONNECT, mNetIf, NULL, 0); if (status) { @@ -287,11 +285,9 @@ CHIP_ERROR WiFiManager::Disconnect() CHIP_ERROR WiFiManager::GetWiFiInfo(WiFiInfo & info) const { - net_if * iface = InetUtils::GetInterface(); - VerifyOrReturnError(nullptr != iface, CHIP_ERROR_INTERNAL); - struct wifi_iface_status status = { 0 }; + wifi_iface_status status = { 0 }; - if (net_mgmt(NET_REQUEST_WIFI_IFACE_STATUS, iface, &status, sizeof(struct wifi_iface_status))) + if (net_mgmt(NET_REQUEST_WIFI_IFACE_STATUS, mNetIf, &status, sizeof(wifi_iface_status))) { ChipLogError(DeviceLayer, "Status request failed"); return CHIP_ERROR_INTERNAL; @@ -316,22 +312,31 @@ CHIP_ERROR WiFiManager::GetWiFiInfo(WiFiInfo & info) const CHIP_ERROR WiFiManager::GetNetworkStatistics(NetworkStatistics & stats) const { net_stats_wifi data{}; - net_mgmt(NET_REQUEST_STATS_GET_WIFI, InetUtils::GetInterface(), &data, sizeof(data)); + net_mgmt(NET_REQUEST_STATS_GET_WIFI, mNetIf, &data, sizeof(data)); stats.mPacketMulticastRxCount = data.multicast.rx; stats.mPacketMulticastTxCount = data.multicast.tx; - stats.mPacketUnicastRxCount = data.pkts.rx - data.multicast.rx - data.broadcast.rx; - stats.mPacketUnicastTxCount = data.pkts.tx - data.multicast.tx - data.broadcast.tx; - stats.mBeaconsSuccessCount = data.sta_mgmt.beacons_rx; - stats.mBeaconsLostCount = data.sta_mgmt.beacons_miss; +#if CONFIG_CHIP_NXP_PLATFORM + /* Zephyr 3.6 doesn't support the unicast stat in net_stats_wifi struct */ + stats.mPacketUnicastRxCount = data.pkts.rx - data.multicast.rx - data.broadcast.rx; + stats.mPacketUnicastRxCount = data.pkts.tx - data.multicast.tx - data.broadcast.tx; +#else + stats.mPacketUnicastRxCount = data.unicast.rx; + stats.mPacketUnicastTxCount = data.unicast.tx; +#endif + stats.mBeaconsSuccessCount = data.sta_mgmt.beacons_rx; + stats.mBeaconsLostCount = data.sta_mgmt.beacons_miss; return CHIP_NO_ERROR; } -void WiFiManager::ScanResultHandler(Platform::UniquePtr data) +void WiFiManager::ScanResultHandler(Platform::UniquePtr data, size_t length) { + // Validate that input data size matches the expected one. + VerifyOrReturn(length == sizeof(wifi_scan_result)); + // Contrary to other handlers, offload accumulating of the scan results from the CHIP thread to the caller's thread - const struct wifi_scan_result * scanResult = reinterpret_cast(data.get()); + const wifi_scan_result * scanResult = reinterpret_cast(data.get()); if (Instance().mInternalScan && Instance().mWantedNetwork.GetSsidSpan().data_equal(ByteSpan(scanResult->ssid, scanResult->ssid_length))) @@ -347,7 +352,8 @@ void WiFiManager::ScanResultHandler(Platform::UniquePtr data) Instance().mWiFiParams.mParams.security = scanResult->security <= WIFI_SECURITY_TYPE_MAX ? scanResult->security : WIFI_SECURITY_TYPE_PSK; Instance().mWiFiParams.mParams.psk_length = static_cast(Instance().mWantedNetwork.passLen); - Instance().mWiFiParams.mParams.mfp = (scanResult->mfp == WIFI_MFP_REQUIRED) ? WIFI_MFP_REQUIRED : WIFI_MFP_OPTIONAL; + Instance().mWiFiParams.mParams.mfp = scanResult->mfp; + Instance().mWiFiParams.mParams.band = scanResult->band; // If the security is none, WiFi driver expects the psk to be nullptr if (Instance().mWiFiParams.mParams.security == WIFI_SECURITY_TYPE_NONE) @@ -368,45 +374,33 @@ void WiFiManager::ScanResultHandler(Platform::UniquePtr data) if (Instance().mScanResultCallback && !Instance().mInternalScan) { - /* Here we need to check if the scan is targeting a specific network and filter the scan result accordingly, - * to make sure only the targeted SSID is reported */ - if (Instance().mNetworkToScan.GetSsidSpan().size() == 0) - { - Instance().mScanResultCallback(ToScanResponse(scanResult)); - } - else if (Instance().mNetworkToScan.GetSsidSpan().data_equal(ByteSpan(scanResult->ssid, scanResult->ssid_length))) - { - Instance().mScanResultCallback(ToScanResponse(scanResult)); - } + Instance().mScanResultCallback(ToScanResponse(scanResult)); } } -void WiFiManager::ScanDoneHandler(Platform::UniquePtr data) +void WiFiManager::ScanDoneHandler(Platform::UniquePtr data, size_t length) { + // Validate that input data size matches the expected one. + VerifyOrReturn(length == sizeof(wifi_status)); + CHIP_ERROR err = SystemLayer().ScheduleLambda([capturedData = data.get()] { Platform::UniquePtr safePtr(capturedData); - uint8_t * rawData = safePtr.get(); - const wifi_status * status = reinterpret_cast(rawData); - WiFiRequestStatus requestStatus = static_cast(status->status); - - /* Reset the specific network to scan */ - if (Instance().mNetworkToScan.GetSsidSpan().size() > 0) - { - Instance().mNetworkToScan.Erase(); - } + uint8_t * rawData = safePtr.get(); + const wifi_status * status = reinterpret_cast(rawData); + ScanDoneStatus scanDoneStatus = status->status; - if (requestStatus == WiFiRequestStatus::FAILURE) + if (scanDoneStatus) { - ChipLogError(DeviceLayer, "Wi-Fi scan finalization failure (%d)", status->status); + ChipLogError(DeviceLayer, "Wi-Fi scan finalization failure (%d)", scanDoneStatus); } else { - ChipLogProgress(DeviceLayer, "Wi-Fi scan done (%d)", status->status); + ChipLogProgress(DeviceLayer, "Wi-Fi scan done"); } if (Instance().mScanDoneCallback && !Instance().mInternalScan) { - Instance().mScanDoneCallback(requestStatus); + Instance().mScanDoneCallback(scanDoneStatus); // restore the connection state from before the scan request was issued Instance().mWiFiState = Instance().mCachedWiFiState; return; @@ -415,6 +409,7 @@ void WiFiManager::ScanDoneHandler(Platform::UniquePtr data) // Internal scan is supposed to be followed by a connection request if the SSID has been found if (Instance().mInternalScan) { + if (!Instance().mSsidFound) { ChipLogProgress(DeviceLayer, "No requested SSID found"); @@ -429,12 +424,13 @@ void WiFiManager::ScanDoneHandler(Platform::UniquePtr data) net_if * iface = InetUtils::GetInterface(); VerifyOrReturn(nullptr != iface, CHIP_ERROR_INTERNAL); - if (net_mgmt(NET_REQUEST_WIFI_CONNECT, iface, &(Instance().mWiFiParams.mParams), sizeof(wifi_connect_req_params))) + if (net_mgmt(NET_REQUEST_WIFI_CONNECT, Instance().mNetIf, &(Instance().mWiFiParams.mParams), + sizeof(wifi_connect_req_params))) { ChipLogError(DeviceLayer, "Connection request failed"); - if (Instance().mHandling.mOnConnectionFailed) + if (Instance().mHandling.mOnConnectionDone) { - Instance().mHandling.mOnConnectionFailed(); + Instance().mHandling.mOnConnectionDone(WIFI_STATUS_CONN_FAIL); } Instance().mWiFiState = WIFI_STATE_DISCONNECTED; return; @@ -454,38 +450,65 @@ void WiFiManager::ScanDoneHandler(Platform::UniquePtr data) void WiFiManager::SendRouterSolicitation(System::Layer * layer, void * param) { - net_if * iface = InetUtils::GetInterface(); - if (iface && iface->if_dev->link_addr.type == NET_LINK_ETHERNET) + net_if_start_rs(Instance().mNetIf); + Instance().mRouterSolicitationCounter++; + if (Instance().mRouterSolicitationCounter < kRouterSolicitationMaxCount) { - net_if_start_rs(iface); - Instance().mRouterSolicitationCounter++; - if (Instance().mRouterSolicitationCounter < kRouterSolicitationMaxCount) - { - DeviceLayer::SystemLayer().StartTimer(System::Clock::Milliseconds32(kRouterSolicitationIntervalMs), - SendRouterSolicitation, nullptr); - } - else - { - Instance().mRouterSolicitationCounter = 0; - } + DeviceLayer::SystemLayer().StartTimer(System::Clock::Milliseconds32(kRouterSolicitationIntervalMs), SendRouterSolicitation, + nullptr); + } + else + { + Instance().mRouterSolicitationCounter = 0; } } -void WiFiManager::ConnectHandler(Platform::UniquePtr data) +void WiFiManager::ConnectHandler(Platform::UniquePtr data, size_t length) { + using app::Clusters::WiFiNetworkDiagnostics::AssociationFailureCauseEnum; + + // Validate that input data size matches the expected one. + VerifyOrReturn(length == sizeof(wifi_status)); + CHIP_ERROR err = SystemLayer().ScheduleLambda([capturedData = data.get()] { Platform::UniquePtr safePtr(capturedData); - uint8_t * rawData = safePtr.get(); - const wifi_status * status = reinterpret_cast(rawData); - WiFiRequestStatus requestStatus = static_cast(status->status); + uint8_t * rawData = safePtr.get(); + const wifi_status * status = reinterpret_cast(rawData); + wifi_conn_status connStatus = status->conn_status; - if (requestStatus == WiFiRequestStatus::FAILURE || requestStatus == WiFiRequestStatus::TERMINATED) + if (connStatus) { ChipLogProgress(DeviceLayer, "Connection to WiFi network failed or was terminated by another request"); Instance().mWiFiState = WIFI_STATE_DISCONNECTED; - if (Instance().mHandling.mOnConnectionFailed) + if (Instance().mHandling.mOnConnectionDone) + { + Instance().mHandling.mOnConnectionDone(connStatus); + } + + WiFiDiagnosticsDelegate * delegate = GetDiagnosticDataProvider().GetWiFiDiagnosticsDelegate(); + if (delegate) { - Instance().mHandling.mOnConnectionFailed(); + uint16_t reason = Instance().GetLastDisconnectReason(); + uint8_t associationFailureCause; + + switch (connStatus) + { + case WIFI_STATUS_CONN_WRONG_PASSWORD: + associationFailureCause = to_underlying(AssociationFailureCauseEnum::kAuthenticationFailed); + break; + case WIFI_STATUS_CONN_FAIL: + case WIFI_STATUS_CONN_TIMEOUT: + associationFailureCause = to_underlying(AssociationFailureCauseEnum::kAssociationFailed); + break; + case WIFI_STATUS_CONN_AP_NOT_FOUND: + associationFailureCause = to_underlying(AssociationFailureCauseEnum::kSsidNotFound); + break; + default: + associationFailureCause = to_underlying(AssociationFailureCauseEnum::kUnknown); + break; + } + + delegate->OnAssociationFailureDetected(associationFailureCause, reason); } } else // The connection has been established successfully. @@ -497,9 +520,9 @@ void WiFiManager::ConnectHandler(Platform::UniquePtr data) ChipLogProgress(DeviceLayer, "Connected to WiFi network"); Instance().mWiFiState = WIFI_STATE_COMPLETED; - if (Instance().mHandling.mOnConnectionSuccess) + if (Instance().mHandling.mOnConnectionDone) { - Instance().mHandling.mOnConnectionSuccess(); + Instance().mHandling.mOnConnectionDone(connStatus); } Instance().PostConnectivityStatusChange(kConnectivity_Established); @@ -512,6 +535,13 @@ void WiFiManager::ConnectHandler(Platform::UniquePtr data) { ChipLogError(DeviceLayer, "Cannot post event [error: %s]", ErrorStr(error)); } + + WiFiDiagnosticsDelegate * delegate = GetDiagnosticDataProvider().GetWiFiDiagnosticsDelegate(); + if (delegate) + { + delegate->OnConnectionStatusChanged( + to_underlying(app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum::kConnected)); + } } // cleanup the provisioning data as it is configured per each connect request Instance().ClearStationProvisioningData(); @@ -524,13 +554,74 @@ void WiFiManager::ConnectHandler(Platform::UniquePtr data) } } -void WiFiManager::DisconnectHandler(Platform::UniquePtr) +void WiFiManager::DisconnectHandler(Platform::UniquePtr data, size_t length) { - SystemLayer().ScheduleLambda([] { + // Validate that input data size matches the expected one. + VerifyOrReturn(length == sizeof(wifi_status)); + + CHIP_ERROR err = SystemLayer().ScheduleLambda([capturedData = data.get()] { + Platform::UniquePtr safePtr(capturedData); + uint8_t * rawData = safePtr.get(); + const wifi_status * status = reinterpret_cast(rawData); + uint16_t reason; + + switch (status->disconn_reason) + { + case WIFI_REASON_DISCONN_UNSPECIFIED: + reason = WLAN_REASON_UNSPECIFIED; + break; + case WIFI_REASON_DISCONN_USER_REQUEST: + reason = WLAN_REASON_DEAUTH_LEAVING; + break; + case WIFI_REASON_DISCONN_AP_LEAVING: + reason = WLAN_REASON_DEAUTH_LEAVING; + break; + case WIFI_REASON_DISCONN_INACTIVITY: + reason = WLAN_REASON_DISASSOC_DUE_TO_INACTIVITY; + break; + default: + reason = WLAN_REASON_UNSPECIFIED; + break; + } + Instance().SetLastDisconnectReason(reason); + ChipLogProgress(DeviceLayer, "WiFi station disconnected"); Instance().mWiFiState = WIFI_STATE_DISCONNECTED; Instance().PostConnectivityStatusChange(kConnectivity_Lost); + + WiFiDiagnosticsDelegate * delegate = GetDiagnosticDataProvider().GetWiFiDiagnosticsDelegate(); + if (delegate) + { + delegate->OnConnectionStatusChanged( + to_underlying(app::Clusters::WiFiNetworkDiagnostics::ConnectionStatusEnum::kNotConnected)); + delegate->OnDisconnectionDetected(reason); + } }); + + if (CHIP_NO_ERROR == err) + { + // the ownership has been transferred to the worker thread - release the buffer + data.release(); + } +} + +void WiFiManager::IPv6AddressChangeHandler(const void * data) +{ + const in6_addr * addr = reinterpret_cast(data); + + // Filter out link-local addresses that are not routable outside of a local network. + if (!net_ipv6_is_ll_addr(addr)) + { + // This is needed to send mDNS queries containing updated IPv6 addresses. + ChipDeviceEvent event; + event.Type = DeviceEventType::kDnssdRestartNeeded; + + CHIP_ERROR error = PlatformMgr().PostEvent(&event); + if (error != CHIP_NO_ERROR) + { + ChipLogError(DeviceLayer, "Cannot post event: %" CHIP_ERROR_FORMAT, error.Format()); + } + } } WiFiManager::StationStatus WiFiManager::GetStationStatus() const @@ -596,11 +687,10 @@ System::Clock::Milliseconds32 WiFiManager::CalculateNextRecoveryTime() CHIP_ERROR WiFiManager::SetLowPowerMode(bool onoff) { - net_if * iface = InetUtils::GetInterface(); - VerifyOrReturnError(nullptr != iface, CHIP_ERROR_INTERNAL); + VerifyOrReturnError(nullptr != mNetIf, CHIP_ERROR_INTERNAL); wifi_ps_config currentConfig{}; - if (net_mgmt(NET_REQUEST_WIFI_PS_CONFIG, iface, ¤tConfig, sizeof(currentConfig))) + if (net_mgmt(NET_REQUEST_WIFI_PS_CONFIG, mNetIf, ¤tConfig, sizeof(currentConfig))) { ChipLogError(DeviceLayer, "Get current low power mode config request failed"); return CHIP_ERROR_INTERNAL; @@ -610,7 +700,7 @@ CHIP_ERROR WiFiManager::SetLowPowerMode(bool onoff) (currentConfig.ps_params.enabled == WIFI_PS_DISABLED && onoff == true)) { wifi_ps_params params{ .enabled = onoff ? WIFI_PS_ENABLED : WIFI_PS_DISABLED }; - if (net_mgmt(NET_REQUEST_WIFI_PS, iface, ¶ms, sizeof(params))) + if (net_mgmt(NET_REQUEST_WIFI_PS, mNetIf, ¶ms, sizeof(params))) { ChipLogError(DeviceLayer, "Set low power mode request failed"); return CHIP_ERROR_INTERNAL; @@ -623,5 +713,15 @@ CHIP_ERROR WiFiManager::SetLowPowerMode(bool onoff) return CHIP_NO_ERROR; } +void WiFiManager::SetLastDisconnectReason(uint16_t reason) +{ + mLastDisconnectedReason = reason; +} + +uint16_t WiFiManager::GetLastDisconnectReason() +{ + return mLastDisconnectedReason; +} + } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Zephyr/wifi/WiFiManager.h b/src/platform/Zephyr/wifi/WiFiManager.h index d48536fb3d0da3..99bf777547a800 100644 --- a/src/platform/Zephyr/wifi/WiFiManager.h +++ b/src/platform/Zephyr/wifi/WiFiManager.h @@ -88,16 +88,16 @@ class Map class WiFiManager { public: - enum WiFiRequestStatus : int - { - SUCCESS = 0, - FAILURE = 1, - TERMINATED = 2 - }; + /* No copy, nor move. */ + WiFiManager(const WiFiManager &) = delete; + WiFiManager & operator=(const WiFiManager &) = delete; + WiFiManager(WiFiManager &&) = delete; + WiFiManager & operator=(WiFiManager &&) = delete; + using ScanDoneStatus = decltype(wifi_status::status); using ScanResultCallback = void (*)(const NetworkCommissioning::WiFiScanResponse &); - using ScanDoneCallback = void (*)(WiFiRequestStatus); - using ConnectionCallback = void (*)(); + using ScanDoneCallback = void (*)(const ScanDoneStatus &); + using ConnectionCallback = void (*)(const wifi_conn_status &); enum class StationStatus : uint8_t { @@ -120,8 +120,7 @@ class WiFiManager struct ConnectionHandling { - ConnectionCallback mOnConnectionSuccess{}; - ConnectionCallback mOnConnectionFailed{}; + ConnectionCallback mOnConnectionDone{}; System::Clock::Seconds32 mConnectionTimeout{}; }; @@ -182,12 +181,18 @@ class WiFiManager CHIP_ERROR ClearStationProvisioningData(); CHIP_ERROR Disconnect(); CHIP_ERROR GetWiFiInfo(WiFiInfo & info) const; + const WiFiNetwork & GetWantedNetwork() const { return mWantedNetwork; } CHIP_ERROR GetNetworkStatistics(NetworkStatistics & stats) const; void AbortConnectionRecovery(); CHIP_ERROR SetLowPowerMode(bool onoff); + void SetLastDisconnectReason(uint16_t reason); + uint16_t GetLastDisconnectReason(); private: - using NetEventHandler = void (*)(Platform::UniquePtr); + using NetEventHandler = void (*)(Platform::UniquePtr, size_t); + + WiFiManager() = default; + ~WiFiManager() = default; struct ConnectionParams { @@ -198,14 +203,18 @@ class WiFiManager constexpr static uint32_t kWifiManagementEvents = NET_EVENT_WIFI_SCAN_RESULT | NET_EVENT_WIFI_SCAN_DONE | NET_EVENT_WIFI_CONNECT_RESULT | NET_EVENT_WIFI_DISCONNECT_RESULT | NET_EVENT_WIFI_IFACE_STATUS; + constexpr static uint32_t kIPv6ManagementEvents = NET_EVENT_IPV6_ADDR_ADD | NET_EVENT_IPV6_ADDR_DEL; + // Event handling static void WifiMgmtEventHandler(net_mgmt_event_callback * cb, uint32_t mgmtEvent, net_if * iface); - static void ScanResultHandler(Platform::UniquePtr data); - static void ScanDoneHandler(Platform::UniquePtr data); - static void ConnectHandler(Platform::UniquePtr data); - static void DisconnectHandler(Platform::UniquePtr data); + static void IPv6MgmtEventHandler(net_mgmt_event_callback * cb, uint32_t mgmtEvent, net_if * iface); + static void ScanResultHandler(Platform::UniquePtr data, size_t length); + static void ScanDoneHandler(Platform::UniquePtr data, size_t length); + static void ConnectHandler(Platform::UniquePtr data, size_t length); + static void DisconnectHandler(Platform::UniquePtr data, size_t length); static void PostConnectivityStatusChange(ConnectivityChange changeType); static void SendRouterSolicitation(System::Layer * layer, void * param); + static void IPv6AddressChangeHandler(const void * data); // Connection Recovery feature // This feature allows re-scanning and re-connecting the connection to the known network after @@ -220,21 +229,25 @@ class WiFiManager void ResetRecoveryTime(); System::Clock::Milliseconds32 CalculateNextRecoveryTime(); + net_if * mNetIf{ nullptr }; ConnectionParams mWiFiParams{}; - ConnectionHandling mHandling; + ConnectionHandling mHandling{}; + wifi_scan_params mScanParams{}; + char mScanSsidBuffer[DeviceLayer::Internal::kMaxWiFiSSIDLength + 1] = { 0 }; wifi_iface_state mWiFiState; wifi_iface_state mCachedWiFiState; net_mgmt_event_callback mWiFiMgmtClbk{}; + net_mgmt_event_callback mIPv6MgmtClbk{}; ScanResultCallback mScanResultCallback{ nullptr }; ScanDoneCallback mScanDoneCallback{ nullptr }; WiFiNetwork mWantedNetwork{}; - WiFiNetwork mNetworkToScan{}; bool mInternalScan{ false }; uint8_t mRouterSolicitationCounter = 0; bool mSsidFound{ false }; uint32_t mConnectionRecoveryCounter{ 0 }; uint32_t mConnectionRecoveryTimeMs{ kConnectionRecoveryMinIntervalMs }; bool mApplicationDisconnectRequested{ false }; + uint16_t mLastDisconnectedReason = WLAN_REASON_UNSPECIFIED; static const Map sStatusMap; static const Map sEventHandlerMap; diff --git a/src/platform/Zephyr/wifi/ZephyrWifiDriver.cpp b/src/platform/Zephyr/wifi/ZephyrWifiDriver.cpp index 53b7fa684a2213..7404a0272297be 100644 --- a/src/platform/Zephyr/wifi/ZephyrWifiDriver.cpp +++ b/src/platform/Zephyr/wifi/ZephyrWifiDriver.cpp @@ -17,10 +17,13 @@ #include "ZephyrWifiDriver.h" +#include + #include #include #include +#include #include using namespace ::chip; @@ -103,8 +106,9 @@ CHIP_ERROR ZephyrWifiDriver::Init(NetworkStatusChangeCallback * networkStatusCha if (mStagingNetwork.IsConfigured()) { - WiFiManager::ConnectionHandling handling{ [] { Instance().OnNetworkStatusChanged(Status::kSuccess); }, - [] { Instance().OnNetworkStatusChanged(Status::kUnknownError); }, + WiFiManager::ConnectionHandling handling{ [](const wifi_conn_status & connStatus) { + Instance().OnNetworkConnStatusChanged(connStatus); + }, System::Clock::Seconds32{ kWiFiConnectNetworkTimeoutSeconds } }; ReturnErrorOnFailure( WiFiManager::Instance().Connect(mStagingNetwork.GetSsidSpan(), mStagingNetwork.GetPassSpan(), handling)); @@ -113,8 +117,11 @@ CHIP_ERROR ZephyrWifiDriver::Init(NetworkStatusChangeCallback * networkStatusCha return CHIP_NO_ERROR; } -void ZephyrWifiDriver::OnNetworkStatusChanged(Status status) +void ZephyrWifiDriver::OnNetworkConnStatusChanged(const wifi_conn_status & connStatus) { + // TODO: check if we can report more accurate errors + Status status = connStatus ? Status::kUnknownError : Status::kSuccess; + if (status == Status::kSuccess) { ConnectivityMgr().SetWiFiStationMode(ConnectivityManager::kWiFiStationMode_Enabled); @@ -122,7 +129,23 @@ void ZephyrWifiDriver::OnNetworkStatusChanged(Status status) if (mpNetworkStatusChangeCallback) { - mpNetworkStatusChangeCallback->OnNetworkingStatusChange(status, NullOptional, NullOptional); + const uint8_t * ssid{}; + size_t ssidLen{}; + WiFiManager::WiFiInfo wifiInfo; + + if (CHIP_NO_ERROR == WiFiManager::Instance().GetWiFiInfo(wifiInfo)) + { + ssid = wifiInfo.mSsid; + ssidLen = wifiInfo.mSsidLen; + } + else + { + ssid = WiFiManager::Instance().GetWantedNetwork().ssid; + ssidLen = WiFiManager::Instance().GetWantedNetwork().ssidLen; + } + mpNetworkStatusChangeCallback->OnNetworkingStatusChange(status, MakeOptional(ByteSpan(ssid, ssidLen)), + connStatus ? MakeOptional(static_cast(connStatus)) + : NullOptional); } if (mpConnectCallback) @@ -158,12 +181,15 @@ CHIP_ERROR ZephyrWifiDriver::RevertConfiguration() // we are already connected to this network, so return prematurely return CHIP_NO_ERROR; } + + WiFiManager::Instance().Disconnect(); } if (mStagingNetwork.IsConfigured()) { - WiFiManager::ConnectionHandling handling{ [] { Instance().OnNetworkStatusChanged(Status::kSuccess); }, - [] { Instance().OnNetworkStatusChanged(Status::kUnknownError); }, + WiFiManager::ConnectionHandling handling{ [](const wifi_conn_status & connStatus) { + Instance().OnNetworkConnStatusChanged(connStatus); + }, System::Clock::Seconds32{ kWiFiConnectNetworkTimeoutSeconds } }; ReturnErrorOnFailure( WiFiManager::Instance().Connect(mStagingNetwork.GetSsidSpan(), mStagingNetwork.GetPassSpan(), handling)); @@ -217,8 +243,9 @@ void ZephyrWifiDriver::ConnectNetwork(ByteSpan networkId, ConnectCallback * call { Status status = Status::kSuccess; WiFiManager::StationStatus stationStatus; - WiFiManager::ConnectionHandling handling{ [] { Instance().OnNetworkStatusChanged(Status::kSuccess); }, - [] { Instance().OnNetworkStatusChanged(Status::kUnknownError); }, + WiFiManager::ConnectionHandling handling{ [](const wifi_conn_status & connStatus) { + Instance().OnNetworkConnStatusChanged(connStatus); + }, System::Clock::Seconds32{ kWiFiConnectNetworkTimeoutSeconds } }; VerifyOrExit(mpConnectCallback == nullptr, status = Status::kUnknownError); @@ -262,11 +289,10 @@ void ZephyrWifiDriver::LoadFromStorage() mStagingNetwork = network; } -void ZephyrWifiDriver::OnScanWiFiNetworkDone(WiFiManager::WiFiRequestStatus status) +void ZephyrWifiDriver::OnScanWiFiNetworkDone(const WiFiManager::ScanDoneStatus & status) { VerifyOrReturn(mScanCallback != nullptr); - mScanCallback->OnFinished(status == WiFiManager::WiFiRequestStatus::SUCCESS ? Status::kSuccess : Status::kUnknownError, - CharSpan(), &mScanResponseIterator); + mScanCallback->OnFinished(status ? Status::kUnknownError : Status::kSuccess, CharSpan(), &mScanResponseIterator); mScanCallback = nullptr; } @@ -280,7 +306,7 @@ void ZephyrWifiDriver::ScanNetworks(ByteSpan ssid, WiFiDriver::ScanCallback * ca mScanCallback = callback; CHIP_ERROR error = WiFiManager::Instance().Scan( ssid, [](const WiFiScanResponse & response) { Instance().OnScanWiFiNetworkResult(response); }, - [](WiFiManager::WiFiRequestStatus status) { Instance().OnScanWiFiNetworkDone(status); }); + [](const WiFiManager::ScanDoneStatus & status) { Instance().OnScanWiFiNetworkDone(status); }); if (error != CHIP_NO_ERROR) { @@ -289,6 +315,13 @@ void ZephyrWifiDriver::ScanNetworks(ByteSpan ssid, WiFiDriver::ScanCallback * ca } } +uint32_t ZephyrWifiDriver::GetSupportedWiFiBandsMask() const +{ + uint32_t bands = static_cast(1UL << chip::to_underlying(WiFiBandEnum::k2g4)); + bands |= static_cast(1UL << chip::to_underlying(WiFiBandEnum::k5g)); + return bands; +} + } // namespace NetworkCommissioning } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/Zephyr/wifi/ZephyrWifiDriver.h b/src/platform/Zephyr/wifi/ZephyrWifiDriver.h index 9096aa408b69bd..414311a07ec4bf 100644 --- a/src/platform/Zephyr/wifi/ZephyrWifiDriver.h +++ b/src/platform/Zephyr/wifi/ZephyrWifiDriver.h @@ -25,9 +25,9 @@ namespace chip { namespace DeviceLayer { namespace NetworkCommissioning { -constexpr uint8_t kMaxWiFiNetworks = 1; -constexpr uint8_t kWiFiScanNetworksTimeOutSeconds = 10; -constexpr uint8_t kWiFiConnectNetworkTimeoutSeconds = 35; +inline constexpr uint8_t kMaxWiFiNetworks = 1; +inline constexpr uint8_t kWiFiScanNetworksTimeOutSeconds = 10; +inline constexpr uint8_t kWiFiConnectNetworkTimeoutSeconds = 35; class ZephyrWifiScanResponseIterator : public Iterator { @@ -48,8 +48,8 @@ class ZephyrWifiDriver final : public WiFiDriver public: // Define non-volatile storage keys for SSID and password. // The naming convention is aligned with DefaultStorageKeyAllocator class. - static constexpr const char * kSsidKey = "g/wi/s"; - static constexpr const char * kPassKey = "g/wi/p"; + static constexpr char kSsidKey[] = "g/wi/s"; + static constexpr char kPassKey[] = "g/wi/p"; class WiFiNetworkIterator final : public NetworkIterator { @@ -86,6 +86,7 @@ class ZephyrWifiDriver final : public WiFiDriver Status AddOrUpdateNetwork(ByteSpan ssid, ByteSpan credentials, MutableCharSpan & outDebugText, uint8_t & outNetworkIndex) override; void ScanNetworks(ByteSpan ssid, ScanCallback * callback) override; + uint32_t GetSupportedWiFiBandsMask() const override; static ZephyrWifiDriver & Instance() { @@ -93,9 +94,9 @@ class ZephyrWifiDriver final : public WiFiDriver return sInstance; } - void OnNetworkStatusChanged(Status status); + void OnNetworkConnStatusChanged(const wifi_conn_status & connStatus); void OnScanWiFiNetworkResult(const WiFiScanResponse & result); - void OnScanWiFiNetworkDone(WiFiManager::WiFiRequestStatus status); + void OnScanWiFiNetworkDone(const WiFiManager::ScanDoneStatus & status); private: void LoadFromStorage(); diff --git a/src/platform/android/AndroidChipPlatform-JNI.cpp b/src/platform/android/AndroidChipPlatform-JNI.cpp index 45f54835d44e08..2f758719457971 100644 --- a/src/platform/android/AndroidChipPlatform-JNI.cpp +++ b/src/platform/android/AndroidChipPlatform-JNI.cpp @@ -60,6 +60,8 @@ static bool JavaBytesToUUID(JNIEnv * env, jbyteArray value, chip::Ble::ChipBleUU namespace { JavaVM * sJVM = nullptr; JniGlobalReference sAndroidChipPlatformExceptionCls; +jmethodID sOnLogMessageMethod = nullptr; +JniGlobalReference sJavaLogCallbackObject; } // namespace CHIP_ERROR AndroidChipPlatformJNI_OnLoad(JavaVM * jvm, void * reserved) @@ -274,6 +276,76 @@ JNI_LOGGING_METHOD(void, setLogFilter)(JNIEnv * env, jclass clazz, jint level) SetLogFilter(category); } +static void ENFORCE_FORMAT(3, 0) logRedirectCallback(const char * module, uint8_t category, const char * msg, va_list args) +{ + using namespace chip::Logging; + + JNIEnv * env = JniReferences::GetInstance().GetEnvForCurrentThread(); + VerifyOrReturn(env != nullptr); + VerifyOrReturn(sJavaLogCallbackObject.HasValidObjectRef()); + VerifyOrReturn(sOnLogMessageMethod != nullptr); + + JniLocalReferenceScope scope(env); + int priority = ANDROID_LOG_DEBUG; + switch (category) + { + case kLogCategory_Error: + priority = ANDROID_LOG_ERROR; + break; + case kLogCategory_Progress: + priority = ANDROID_LOG_INFO; + break; + case kLogCategory_Detail: + priority = ANDROID_LOG_DEBUG; + break; + default: + break; + } + + jint jPriority = static_cast(priority); + jobject jModule; + VerifyOrReturn(JniReferences::GetInstance().CharToStringUTF(CharSpan::fromCharString(module), jModule) == CHIP_NO_ERROR); + VerifyOrReturn(jModule != nullptr); + + char buffer[CHIP_CONFIG_LOG_MESSAGE_MAX_SIZE]; + vsnprintf(buffer, sizeof(buffer), msg, args); + jobject jMsg; + VerifyOrReturn(JniReferences::GetInstance().CharToStringUTF(CharSpan::fromCharString(buffer), jMsg) == CHIP_NO_ERROR); + VerifyOrReturn(jMsg != nullptr); + + env->CallVoidMethod(sJavaLogCallbackObject.ObjectRef(), sOnLogMessageMethod, static_cast(jModule), jPriority, + static_cast(jMsg)); +} + +JNI_LOGGING_METHOD(void, setLogCallback)(JNIEnv * env, jclass clazz, jobject callback) +{ + using namespace chip::Logging; + + if (sOnLogMessageMethod == nullptr) + { + jclass callbackClass = env->GetObjectClass(callback); + sOnLogMessageMethod = env->GetMethodID(callbackClass, "onLogMessage", "(Ljava/lang/String;ILjava/lang/String;)V"); + } + VerifyOrReturn(sOnLogMessageMethod != nullptr, + ChipLogError(DeviceLayer, "Failed to access AndroidChipLogging.LogCallback 'onLogMessage' method")); + + if (sJavaLogCallbackObject.HasValidObjectRef()) + { + sJavaLogCallbackObject.Reset(); + } + + if (env->IsSameObject(callback, NULL)) + { + SetLogRedirectCallback(nullptr); + } + else + { + VerifyOrReturn(sJavaLogCallbackObject.Init(callback) == CHIP_NO_ERROR, + ChipLogError(DeviceLayer, "Failed to init sJavaLogCallbackObject")); + SetLogRedirectCallback(logRedirectCallback); + } +} + JNI_MDNSCALLBACK_METHOD(void, handleServiceResolve) (JNIEnv * env, jclass self, jstring instanceName, jstring serviceType, jstring hostName, jstring address, jint port, jobject attributes, jlong callbackHandle, jlong contextHandle) diff --git a/src/platform/android/java/chip/platform/AndroidChipLogging.java b/src/platform/android/java/chip/platform/AndroidChipLogging.java index 4f41b21b78b732..58bcb062e80a88 100644 --- a/src/platform/android/java/chip/platform/AndroidChipLogging.java +++ b/src/platform/android/java/chip/platform/AndroidChipLogging.java @@ -20,4 +20,11 @@ public class AndroidChipLogging { // logging level is in android.util.Log class public static native void setLogFilter(int level); + + // This must be called after System.loadLibrary + public static native void setLogCallback(LogCallback callback); + + public interface LogCallback { + void onLogMessage(String module, int priority, String message); + } } diff --git a/src/platform/android/java/chip/platform/NsdManagerServiceResolver.java b/src/platform/android/java/chip/platform/NsdManagerServiceResolver.java index 40595263cb8214..33d5f44d64ee05 100644 --- a/src/platform/android/java/chip/platform/NsdManagerServiceResolver.java +++ b/src/platform/android/java/chip/platform/NsdManagerServiceResolver.java @@ -27,6 +27,7 @@ import java.util.ArrayList; import java.util.List; import java.util.concurrent.CopyOnWriteArrayList; +import java.util.concurrent.ExecutorService; import java.util.concurrent.Executors; import java.util.concurrent.ScheduledFuture; import java.util.concurrent.TimeUnit; @@ -45,6 +46,8 @@ public class NsdManagerServiceResolver implements ServiceResolver { @Nullable private final NsdManagerResolverAvailState nsdManagerResolverAvailState; private final long timeout; + private ExecutorService mResolveExecutorService; + /** * @param context application context * @param nsdManagerResolverAvailState Passing NsdManagerResolverAvailState allows @@ -69,6 +72,8 @@ public NsdManagerServiceResolver( this.nsdManagerResolverAvailState = nsdManagerResolverAvailState; this.timeout = timeout; + + mResolveExecutorService = Executors.newSingleThreadExecutor(); } public NsdManagerServiceResolver(Context context) { @@ -116,29 +121,28 @@ public void run() { } }; - new Thread( - () -> { - if (nsdManagerResolverAvailState != null) { - nsdManagerResolverAvailState.acquireResolver(); - } + mResolveExecutorService.execute( + () -> { + if (nsdManagerResolverAvailState != null) { + nsdManagerResolverAvailState.acquireResolver(); + } - ScheduledFuture resolveTimeoutExecutor = - Executors.newSingleThreadScheduledExecutor() - .schedule(timeoutRunnable, timeout, TimeUnit.MILLISECONDS); + ScheduledFuture resolveTimeoutExecutor = + Executors.newSingleThreadScheduledExecutor() + .schedule(timeoutRunnable, timeout, TimeUnit.MILLISECONDS); - NsdServiceFinderAndResolver serviceFinderResolver = - new NsdServiceFinderAndResolver( - this.nsdManager, - serviceInfo, - callbackHandle, - contextHandle, - chipMdnsCallback, - multicastLock, - resolveTimeoutExecutor, - nsdManagerResolverAvailState); - serviceFinderResolver.start(); - }) - .start(); + NsdServiceFinderAndResolver serviceFinderResolver = + new NsdServiceFinderAndResolver( + this.nsdManager, + serviceInfo, + callbackHandle, + contextHandle, + chipMdnsCallback, + multicastLock, + resolveTimeoutExecutor, + nsdManagerResolverAvailState); + serviceFinderResolver.start(); + }); } @Override diff --git a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h index d0d31252f99368..c05dfb11845605 100644 --- a/src/platform/nrfconnect/CHIPDevicePlatformConfig.h +++ b/src/platform/nrfconnect/CHIPDevicePlatformConfig.h @@ -221,6 +221,12 @@ #endif // CONFIG_CHIP_ICD_SLOW_POLL_INTERVAL #endif // CHIP_DEVICE_CONFIG_ICD_SLOW_POLL_INTERVAL +#ifndef CHIP_DEVICE_CONFIG_ICD_SIT_SLOW_POLL_LIMIT +#ifdef CONFIG_CHIP_ICD_SIT_SLOW_POLL_LIMIT +#define CHIP_DEVICE_CONFIG_ICD_SIT_SLOW_POLL_LIMIT chip::System::Clock::Milliseconds32(CONFIG_CHIP_ICD_SIT_SLOW_POLL_LIMIT) +#endif // CONFIG_CHIP_ICD_SIT_SLOW_POLL_LIMIT +#endif // CHIP_DEVICE_CONFIG_ICD_SIT_SLOW_POLL_LIMIT + #ifndef CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL #ifdef CONFIG_CHIP_ICD_FAST_POLLING_INTERVAL #define CHIP_DEVICE_CONFIG_ICD_FAST_POLL_INTERVAL chip::System::Clock::Milliseconds32(CONFIG_CHIP_ICD_FAST_POLLING_INTERVAL) diff --git a/src/platform/nrfconnect/wifi/NrfWiFiDriver.cpp b/src/platform/nrfconnect/wifi/NrfWiFiDriver.cpp index 0cf1b383d295ad..616027d605f96e 100644 --- a/src/platform/nrfconnect/wifi/NrfWiFiDriver.cpp +++ b/src/platform/nrfconnect/wifi/NrfWiFiDriver.cpp @@ -143,7 +143,7 @@ void NrfWiFiDriver::OnNetworkConnStatusChanged(const wifi_conn_status & connStat ssid = WiFiManager::Instance().GetWantedNetwork().ssid; ssidLen = WiFiManager::Instance().GetWantedNetwork().ssidLen; } - mpNetworkStatusChangeCallback->OnNetworkingStatusChange(status, MakeOptional(ByteSpan(wifiInfo.mSsid, wifiInfo.mSsidLen)), + mpNetworkStatusChangeCallback->OnNetworkingStatusChange(status, MakeOptional(ByteSpan(ssid, ssidLen)), connStatus ? MakeOptional(static_cast(connStatus)) : NullOptional); } diff --git a/src/platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h b/src/platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h index 28e26038e6a3e2..ba2321c9a26566 100644 --- a/src/platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h +++ b/src/platform/nxp/common/CHIPDeviceNXPPlatformDefaultConfig.h @@ -118,3 +118,7 @@ #ifndef CHIP_DEVICE_CONFIG_INIT_OT_PLAT_ALARM #define CHIP_DEVICE_CONFIG_INIT_OT_PLAT_ALARM 1 #endif // CHIP_DEVICE_CONFIG_INIT_OT_PLAT_ALARM + +#ifndef CHIP_DEVICE_CONFIG_WIFI_STATION_RECONNECT_INTERVAL +#define CHIP_DEVICE_CONFIG_WIFI_STATION_RECONNECT_INTERVAL 300 +#endif // CHIP_DEVICE_CONFIG_WIFI_STATION_RECONNECT_INTERVAL in Milliseconds diff --git a/src/platform/nxp/common/CHIPDevicePlatformEvent.h b/src/platform/nxp/common/CHIPDevicePlatformEvent.h index 5c6a5c3c39ecf9..2f0947b859f27b 100644 --- a/src/platform/nxp/common/CHIPDevicePlatformEvent.h +++ b/src/platform/nxp/common/CHIPDevicePlatformEvent.h @@ -70,6 +70,7 @@ enum InternalPlatformSpecificEventTypes kPlatformNxpIpChangeEvent, kPlatformNxpStartWlanConnectEvent, kPlatformNxpScanWiFiNetworkDoneEvent, + kPlatformNxpStartWlanInitWaitTimerEvent, }; } // namespace DeviceEventType diff --git a/src/platform/nxp/common/ConfigurationManagerImpl.cpp b/src/platform/nxp/common/ConfigurationManagerImpl.cpp index ad8f00eaf3a4cb..09fb98abac6a3f 100644 --- a/src/platform/nxp/common/ConfigurationManagerImpl.cpp +++ b/src/platform/nxp/common/ConfigurationManagerImpl.cpp @@ -106,7 +106,6 @@ CHIP_ERROR ConfigurationManagerImpl::Init() { CHIP_ERROR err; uint32_t rebootCount = 0; - bool failSafeArmed; #if CONFIG_BOOT_REASON_SDK_SUPPORT uint8_t rebootCause = POWER_GetResetCause(); diff --git a/src/platform/nxp/common/ConnectivityManagerImpl.cpp b/src/platform/nxp/common/ConnectivityManagerImpl.cpp index cbdb866ae71973..09d716ac6ea77f 100644 --- a/src/platform/nxp/common/ConnectivityManagerImpl.cpp +++ b/src/platform/nxp/common/ConnectivityManagerImpl.cpp @@ -48,21 +48,23 @@ extern "C" { #include "wlan.h" #include "wm_net.h" -#include } #include #if CHIP_DEVICE_CONFIG_ENABLE_THREAD -#include +#include +#include "border_agent.h" #include "br_rtos_manager.h" +#include "infra_if.h" #endif /* CHIP_DEVICE_CONFIG_ENABLE_THREAD */ #endif /* CHIP_DEVICE_CONFIG_ENABLE_WPA */ #if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#include "ConnectivityManagerImpl.h" #include #endif /* CHIP_DEVICE_CONFIG_ENABLE_THREAD */ @@ -160,6 +162,11 @@ void ConnectivityManagerImpl::_OnPlatformEvent(const ChipDeviceEvent * event) NetworkCommissioning::NXPWiFiDriver::GetInstance().ScanWiFINetworkDoneFromMatterTaskContext( event->Platform.ScanWiFiNetworkCount); } + else if (event->Type == kPlatformNxpStartWlanInitWaitTimerEvent) + { + DeviceLayer::SystemLayer().StartTimer(System::Clock::Milliseconds32(kWlanInitWaitMs), ConnectNetworkTimerHandler, + (void *) event->Platform.pNetworkDataEvent); + } #endif } @@ -319,7 +326,6 @@ int ConnectivityManagerImpl::_WlanEventCallback(enum wlan_event_reason wlanEvent void ConnectivityManagerImpl::OnStationConnected() { - CHIP_ERROR err; ChipDeviceEvent event; event.Type = DeviceEventType::kWiFiConnectivityChange; @@ -332,7 +338,6 @@ void ConnectivityManagerImpl::OnStationConnected() void ConnectivityManagerImpl::OnStationDisconnected() { - CHIP_ERROR err; ChipDeviceEvent event; event.Type = DeviceEventType::kWiFiConnectivityChange; @@ -353,9 +358,6 @@ void ConnectivityManagerImpl::UpdateInternetConnectivityState() const ip6_addr_t * addr6; CHIP_ERROR err; ChipDeviceEvent event; -#if CHIP_ENABLE_OPENTHREAD - otIp6Address newIpAddress; -#endif // If the WiFi station is currently in the connected state... if (_IsWiFiStationConnected()) @@ -392,11 +394,6 @@ void ConnectivityManagerImpl::UpdateInternetConnectivityState() { haveIPv6Conn = true; addr6 = netif_ip6_addr(netif, i); -#if CHIP_ENABLE_OPENTHREAD - // We are using ot mDNS sever and need to add IP address to server list - memcpy(&newIpAddress.mFields.m32, addr6->addr, sizeof(Inet::IPAddress)); - otMdnsServerAddAddress(ThreadStackMgrImpl().OTInstance(), &newIpAddress); -#endif break; } } @@ -428,20 +425,29 @@ void ConnectivityManagerImpl::UpdateInternetConnectivityState() event.Type = DeviceEventType::kInternetConnectivityChange; event.InternetConnectivityChange.IPv4 = kConnectivity_NoChange; event.InternetConnectivityChange.IPv6 = GetConnectivityChange(hadIPv6Conn, haveIPv6Conn); - if (haveIPv6Conn) - { - event.InternetConnectivityChange.ipAddress = IPAddress(*addr6); #if CHIP_ENABLE_OPENTHREAD - // Start the Border Router services including MDNS Server - StartBrServices(); + // In case of boot, start the Border Router services including MDNS Server, otherwise inform of link state change + // The posted event will signal the application to restart the Matter mDNS server instance + bool bLinkState = event.InternetConnectivityChange.IPv6 == kConnectivity_Established ? true : false; + BrHandleStateChange(bLinkState); #endif + if (haveIPv6Conn) + { + event.InternetConnectivityChange.ipAddress = IPAddress(*addr6); } err = PlatformMgr().PostEvent(&event); VerifyOrDie(err == CHIP_NO_ERROR); ChipLogProgress(DeviceLayer, "%s Internet connectivity %s", "IPv6", (haveIPv6Conn) ? "ESTABLISHED" : "LOST"); } + +#if CHIP_ENABLE_OPENTHREAD + if (haveIPv6Conn && UpdateIp6AddrList()) + { + UpdateMdnsHost(); + } +#endif } void ConnectivityManagerImpl::_NetifExtCallback(struct netif * netif, netif_nsc_reason_t reason, @@ -463,7 +469,6 @@ void ConnectivityManagerImpl::_NetifExtCallback(struct netif * netif, netif_nsc_ void ConnectivityManagerImpl::StartWiFiManagement() { struct netif * netif = nullptr; - EventBits_t bits; int32_t result; LOCK_TCPIP_CORE(); @@ -484,35 +489,107 @@ void ConnectivityManagerImpl::StartWiFiManagement() } } #if CHIP_ENABLE_OPENTHREAD -void ConnectivityManagerImpl::StartBrServices() +void ConnectivityManagerImpl::BrHandleStateChange(bool bLinkState) { if (mBorderRouterInit == false) { - struct netif * extNetIfPtr = static_cast(net_get_mlan_handle()); - struct netif * thrNetIfPtr = ThreadStackMgrImpl().ThreadNetIf(); - otInstance * thrInstancePtr; - - // Initalize internal interface variables, these can be used by other modules like the DNSSD Impl to - // get the underlying IP interface - Inet::InterfaceId tmpExtIf(extNetIfPtr); - Inet::InterfaceId tmpThrIf(thrNetIfPtr); - mExternalNetIf = tmpExtIf; - mThreadNetIf = tmpThrIf; - - // Need to wait for the wifi to be connected because the mlan netif can be !=null but not initialized - // properly. If the thread netif is !=null it means that it was fully initialized - - // Lock OT task - if ((thrNetIfPtr) && (mWiFiStationState == kWiFiStationState_Connected)) + if (bLinkState) { - mBorderRouterInit = true; - // Check if OT instance is init - thrInstancePtr = ThreadStackMgrImpl().OTInstance(); + struct netif * extNetIfPtr = static_cast(net_get_mlan_handle()); + struct netif * thrNetIfPtr = ThreadStackMgrImpl().ThreadNetIf(); + otInstance * thrInstancePtr; - BrInitServices(thrInstancePtr, extNetIfPtr, thrNetIfPtr); - otMdnsServerStart(thrInstancePtr); + // Need to wait for the wifi to be connected because the mlan netif can be !=null but not initialized + // properly. If the thread netif is !=null it means that it was fully initialized + + // Lock OT task ? + if ((thrNetIfPtr) && (mWiFiStationState == kWiFiStationState_Connected)) + { + // Initalize internal interface variables, these can be used by other modules like the DNSSD Impl to + // get the underlying IP interface + Inet::InterfaceId tmpExtIf(extNetIfPtr); + Inet::InterfaceId tmpThrIf(thrNetIfPtr); + mExternalNetIf = tmpExtIf; + mThreadNetIf = tmpThrIf; + + mBorderRouterInit = true; + // Check if OT instance is init + thrInstancePtr = ThreadStackMgrImpl().OTInstance(); + + BrInitPlatform(thrInstancePtr, extNetIfPtr, thrNetIfPtr); + BrInitServices(); + + UpdateIp6AddrList(); + UpdateMdnsHost(); + BorderAgentInit(thrInstancePtr, mHostname); + } } } + else + { + InfraIfLinkState(bLinkState); + } +} + +void ConnectivityManagerImpl::UpdateMdnsHost() +{ + CHIP_ERROR err = CHIP_NO_ERROR; + otMdnsHost mdnsHost; + + if (strlen(mHostname) == 0) + { + uint8_t macBuffer[ConfigurationManager::kPrimaryMACAddressLength]; + MutableByteSpan mac(macBuffer); + err = DeviceLayer::ConfigurationMgr().GetPrimaryMACAddress(mac); + SuccessOrExit(err); + + chip::Dnssd::MakeHostName(mHostname, sizeof(mHostname), mac); + } + + mdnsHost.mAddresses = mIp6AddrList; + mdnsHost.mAddressesLength = mIp6AddrNum; + mdnsHost.mHostName = mHostname; + mdnsHost.mInfraIfIndex = netif_get_index(mExternalNetIf.GetPlatformInterface()); + + // Allways use ID 0 for host + otMdnsRegisterHost(ThreadStackMgrImpl().OTInstance(), &mdnsHost, 0, nullptr); + +exit: + return; +} + +bool ConnectivityManagerImpl::UpdateIp6AddrList() +{ + const ip6_addr_t * addr6 = nullptr; + bool bAddrChange = false; + uint32_t newIp6AddrNum = 0; + struct netif * extNetIfPtr = mExternalNetIf.GetPlatformInterface(); + uint32_t lwipIterator, addrListIterator; + + for (lwipIterator = 0; lwipIterator < LWIP_IPV6_NUM_ADDRESSES; lwipIterator++) + { + if (ip6_addr_ispreferred(netif_ip6_addr_state(extNetIfPtr, lwipIterator)) && (mIp6AddrNum <= kMaxIp6Addr)) + { + addr6 = netif_ip6_addr(extNetIfPtr, lwipIterator); + for (addrListIterator = 0; addrListIterator < kMaxIp6Addr; addrListIterator++) + { + if (0 == memcmp(&mIp6AddrList[addrListIterator].mFields.m32, addr6->addr, sizeof(Inet::IPAddress))) + { + break; + } + } + if (addrListIterator == kMaxIp6Addr) + { + bAddrChange |= true; + } + memcpy(&mIp6AddrList[newIp6AddrNum++].mFields.m32, addr6->addr, sizeof(Inet::IPAddress)); + } + } + + bAddrChange |= (newIp6AddrNum != mIp6AddrNum) ? true : false; + mIp6AddrNum = newIp6AddrNum; + + return bAddrChange; } Inet::InterfaceId ConnectivityManagerImpl::GetThreadInterface() @@ -532,7 +609,6 @@ CHIP_ERROR ConnectivityManagerImpl::ProvisionWiFiNetwork(const char * ssid, uint #if CHIP_DEVICE_CONFIG_ENABLE_WPA CHIP_ERROR ret = CHIP_NO_ERROR; struct wlan_network * pNetworkData = (struct wlan_network *) malloc(sizeof(struct wlan_network)); - int result; VerifyOrExit(pNetworkData != NULL, ret = CHIP_ERROR_NO_MEMORY); VerifyOrExit(ssidLen <= IEEEtypes_SSID_SIZE, ret = CHIP_ERROR_INVALID_ARGUMENT); @@ -591,10 +667,10 @@ void ConnectivityManagerImpl::ConnectNetworkTimerHandler(::chip::System::Layer * } else { - PlatformMgr().LockChipStack(); - DeviceLayer::SystemLayer().StartTimer(System::Clock::Milliseconds32(CHIP_DEVICE_CONFIG_WIFI_STATION_RECONNECT_INTERVAL), - ConnectNetworkTimerHandler, context); - PlatformMgr().UnlockChipStack(); + /* Post an event to start a delay timer asynchronously in the Matter task context */ + event.Type = DeviceEventType::kPlatformNxpStartWlanInitWaitTimerEvent; + event.Platform.pNetworkDataEvent = (struct wlan_network *) context; + (void) PlatformMgr().PostEvent(&event); } } diff --git a/src/platform/nxp/common/ConnectivityManagerImpl.h b/src/platform/nxp/common/ConnectivityManagerImpl.h index 82ce24f814d544..a187d0baf39e60 100644 --- a/src/platform/nxp/common/ConnectivityManagerImpl.h +++ b/src/platform/nxp/common/ConnectivityManagerImpl.h @@ -20,6 +20,7 @@ #pragma once +#include #include #include #include @@ -93,6 +94,7 @@ class ConnectivityManagerImpl final : public ConnectivityManager, #if CHIP_ENABLE_OPENTHREAD Inet::InterfaceId GetExternalInterface(); Inet::InterfaceId GetThreadInterface(); + const char * GetHostName() { return sInstance.mHostname; } #endif #endif @@ -142,10 +144,17 @@ class ConnectivityManagerImpl final : public ConnectivityManager, BitFlags mFlags; static netif_ext_callback_t sNetifCallback; + static constexpr uint32_t kWlanInitWaitMs = CHIP_DEVICE_CONFIG_WIFI_STATION_RECONNECT_INTERVAL; #if CHIP_ENABLE_OPENTHREAD + static constexpr uint8_t kMaxIp6Addr = 3; + Inet::InterfaceId mThreadNetIf; Inet::InterfaceId mExternalNetIf; + + char mHostname[chip::Dnssd::kHostNameMaxLength + 1] = ""; + otIp6Address mIp6AddrList[kMaxIp6Addr]; + uint32_t mIp6AddrNum = 0; #endif static int _WlanEventCallback(enum wlan_event_reason event, void * data); @@ -155,9 +164,12 @@ class ConnectivityManagerImpl final : public ConnectivityManager, void OnStationDisconnected(void); void UpdateInternetConnectivityState(void); #if CHIP_ENABLE_OPENTHREAD - void StartBrServices(void); + void BrHandleStateChange(bool bLinkState); + void UpdateMdnsHost(void); + bool UpdateIp6AddrList(void); #endif /* CHIP_DEVICE_CONFIG_ENABLE_THREAD */ -#endif /* CHIP_DEVICE_CONFIG_ENABLE_WPA */ +#endif + /* CHIP_DEVICE_CONFIG_ENABLE_WPA */ }; inline bool ConnectivityManagerImpl::_HaveIPv4InternetConnectivity(void) diff --git a/src/platform/nxp/common/DnssdImpl.cpp b/src/platform/nxp/common/DnssdImpl.cpp index 743e4ab30cafa1..d0069cebcf1c4a 100644 --- a/src/platform/nxp/common/DnssdImpl.cpp +++ b/src/platform/nxp/common/DnssdImpl.cpp @@ -24,7 +24,8 @@ #include -#include +#include +#include using namespace ::chip::DeviceLayer; using namespace chip::DeviceLayer::Internal; @@ -32,9 +33,7 @@ using namespace chip::DeviceLayer::Internal; namespace chip { namespace Dnssd { -#define LOCAL_DOMAIN_STRING_SIZE 7 -#define ARPA_DOMAIN_STRING_SIZE 22 -#define MATTER_DNS_TXT_SIZE 128 +#define USE_MDNS_NEXT_SERVICE_API 1 // Support both operational and commissionable discovery, so buffers sizes must be worst case. static constexpr uint8_t kMaxMdnsServiceTxtEntriesNumber = @@ -47,6 +46,9 @@ static constexpr size_t kTotalMdnsServiceTxtKeySize = static constexpr size_t kTotalMdnsServiceTxtBufferSize = kTotalMdnsServiceTxtKeySize + kMaxMdnsServiceTxtEntriesNumber + kTotalMdnsServiceTxtValueSize; +// For each fabric we can register one _matter._tcp and one _matterc._udp service +static constexpr uint32_t kServiceListSize = CHIP_CONFIG_MAX_FABRICS * 2; + static const char * GetProtocolString(DnssdServiceProtocol protocol) { return protocol == DnssdServiceProtocol::kDnssdProtocolUdp ? "_udp" : "_tcp"; @@ -63,99 +65,192 @@ struct mDnsQueryCtx void * matterCtx; chip::Dnssd::DnssdService mMdnsService; DnsServiceTxtEntries mServiceTxtEntry; - char mServiceType[chip::Dnssd::kDnssdTypeAndProtocolMaxSize + LOCAL_DOMAIN_STRING_SIZE + 1]; + char mServiceType[chip::Dnssd::kDnssdTypeAndProtocolMaxSize + 1]; CHIP_ERROR error; + union + { + otMdnsBrowser mBrowseInfo; + otMdnsSrvResolver mSrvInfo; + otMdnsTxtResolver mTxtInfo; + otMdnsAddressResolver mAddrInfo; + }; + union + { + DnsBrowseCallback mDnsBrowseCallback; + DnsResolveCallback mDnsResolveCallback; + }; - mDnsQueryCtx(void * context, CHIP_ERROR aError) + mDnsQueryCtx(void * context, DnsBrowseCallback aBrowseCallback) { - matterCtx = context; - error = aError; + matterCtx = context; + mDnsBrowseCallback = aBrowseCallback; + error = CHIP_NO_ERROR; } + mDnsQueryCtx(void * context, DnsResolveCallback aResolveCallback) + { + matterCtx = context; + mDnsResolveCallback = aResolveCallback; + error = CHIP_NO_ERROR; + } +}; + +enum ResolveStep : uint8_t +{ + kResolveStepSrv = 0, + kResolveStepTxt, + kResolveStepIpAddr, }; static const char * GetProtocolString(DnssdServiceProtocol protocol); -static void OtBrowseCallback(otError aError, const otDnsBrowseResponse * aResponse, void * aContext); -static void OtServiceCallback(otError aError, const otDnsServiceResponse * aResponse, void * aContext); +static void OtBrowseCallback(otInstance * aInstance, const otMdnsBrowseResult * aResult); +static void OtServiceCallback(otInstance * aInstance, const otMdnsSrvResult * aResult); +static void OtTxtCallback(otInstance * aInstance, const otMdnsTxtResult * aResult); +static void OtAddressCallback(otInstance * aInstance, const otMdnsAddressResult * aResult); static void DispatchBrowseEmpty(intptr_t context); static void DispatchBrowse(intptr_t context); -static void DispatchBrowseNoMemory(intptr_t context); -void DispatchAddressResolve(intptr_t context); -void DispatchResolve(intptr_t context); -void DispatchResolveNoMemory(intptr_t context); +static void DispatchTxtResolve(intptr_t context); +static void DispatchAddressResolve(intptr_t context); +static void DispatchResolve(intptr_t context); +static void DispatchResolveError(intptr_t context); -static DnsBrowseCallback mDnsBrowseCallback; -static DnsResolveCallback mDnsResolveCallback; +static void HandleResolveCleanup(mDnsQueryCtx & resolveContext, ResolveStep stepType); -CHIP_ERROR ResolveBySrp(DnssdService * mdnsReq, otInstance * thrInstancePtr, char * instanceName, void * context); -CHIP_ERROR BrowseBySrp(otInstance * thrInstancePtr, char * serviceName, void * context); +static CHIP_ERROR ResolveBySrp(otInstance * thrInstancePtr, char * serviceName, mDnsQueryCtx * context, DnssdService * mdnsReq); +static CHIP_ERROR BrowseBySrp(otInstance * thrInstancePtr, char * serviceName, mDnsQueryCtx * context); +static CHIP_ERROR FromSrpCacheToMdnsData(const otSrpServerService * service, const otSrpServerHost * host, + const DnssdService * mdnsQueryReq, chip::Dnssd::DnssdService & mdnsService, + DnsServiceTxtEntries & serviceTxtEntries); -CHIP_ERROR FromSrpCacheToMdnsData(const otSrpServerService * service, const otSrpServerHost * host, - const DnssdService * mdnsQueryReq, chip::Dnssd::DnssdService & mdnsService, - DnsServiceTxtEntries & serviceTxtEntries); +static CHIP_ERROR FromServiceTypeToMdnsData(chip::Dnssd::DnssdService & mdnsService, const char * aServiceType); static bool bBrowseInProgress = false; +// ID 0 is reserved for host +static uint32_t mRegisterServiceId = 1; +static uint8_t mNetifIndex = 0; + +// Matter currently only supports one browse and resolve operation at a time so there is no need to create a list +// If the Matter implementation evolves in the future this functionality can be extended to a list. +static mDnsQueryCtx * mBrowseContext = nullptr; +static mDnsQueryCtx * mResolveContext = nullptr; + +#if USE_MDNS_NEXT_SERVICE_API +static otMdnsService * mServiceList[kServiceListSize]; +static uint32_t mServiceListFreeIndex; +#endif CHIP_ERROR ChipDnssdInit(DnssdAsyncReturnCallback initCallback, DnssdAsyncReturnCallback errorCallback, void * context) { CHIP_ERROR error = CHIP_NO_ERROR; otInstance * thrInstancePtr = ThreadStackMgrImpl().OTInstance(); + struct netif * extNetif = (ConnectivityManagerImpl().GetExternalInterface()).GetPlatformInterface(); - uint8_t macBuffer[ConfigurationManager::kPrimaryMACAddressLength]; - MutableByteSpan mac(macBuffer); - char hostname[kHostNameMaxLength + LOCAL_DOMAIN_STRING_SIZE + 1] = ""; - ReturnErrorOnFailure(DeviceLayer::ConfigurationMgr().GetPrimaryMACAddress(mac)); - MakeHostName(hostname, sizeof(hostname), mac); - snprintf(hostname + strlen(hostname), sizeof(hostname), ".local."); + // Don't try to do anything until the mDNS server is started + VerifyOrExit(otMdnsIsEnabled(thrInstancePtr), error = CHIP_ERROR_INCORRECT_STATE); - error = MapOpenThreadError(otMdnsServerSetHostName(thrInstancePtr, hostname)); + mNetifIndex = netif_get_index(extNetif); +exit: initCallback(context, error); return error; } void ChipDnssdShutdown() { - otMdnsServerStop(ThreadStackMgrImpl().OTInstance()); + otMdnsSetEnabled(ThreadStackMgrImpl().OTInstance(), false, 0); } +#if USE_MDNS_NEXT_SERVICE_API +CHIP_ERROR ChipDnssdRemoveServices() +{ + otInstance * thrInstancePtr = ThreadStackMgrImpl().OTInstance(); + otMdnsService otServiceData = { 0 }; + otMdnsIterator * iterator = nullptr; + ChipError error = CHIP_NO_ERROR; + otError otError = OT_ERROR_NONE; + otMdnsEntryState state; + + const char * hostName = ConnectivityManagerImpl().GetHostName(); + + iterator = otMdnsAllocateIterator(thrInstancePtr); + VerifyOrExit(iterator != nullptr, error = CHIP_ERROR_NO_MEMORY); + + mServiceListFreeIndex = 0; + + while (mServiceListFreeIndex <= kServiceListSize) + { + // allocate memory for new entry if the entry is not allready allocated from previous iteration + if (mServiceList[mServiceListFreeIndex] == nullptr) + { + mServiceList[mServiceListFreeIndex] = static_cast(Platform::MemoryAlloc(sizeof(otMdnsService))); + VerifyOrExit(mServiceList[mServiceListFreeIndex] != nullptr, error = CHIP_ERROR_NO_MEMORY); + } + + otError = otMdnsGetNextService(thrInstancePtr, iterator, mServiceList[mServiceListFreeIndex], &state); + if (otError == OT_ERROR_NOT_FOUND) + { + Platform::MemoryFree(mServiceList[mServiceListFreeIndex]); + mServiceList[mServiceListFreeIndex] = nullptr; + break; + } + + if ((0 == strcmp(mServiceList[mServiceListFreeIndex]->mHostName, hostName)) && + ((0 == strcmp(mServiceList[mServiceListFreeIndex]->mServiceType, "_matter._tcp")) || + (0 == strcmp(mServiceList[mServiceListFreeIndex]->mServiceType, "_matterc._udp")))) + { + mServiceListFreeIndex++; + } + } +exit: + if (iterator != nullptr) + { + otMdnsFreeIterator(thrInstancePtr, iterator); + } + return error; +} +#else CHIP_ERROR ChipDnssdRemoveServices() { otInstance * thrInstancePtr = ThreadStackMgrImpl().OTInstance(); + otMdnsService otServiceData = { 0 }; + + otServiceData.mHostName = ConnectivityManagerImpl().GetHostName(); - otMdnsServerMarkServiceForRemoval(thrInstancePtr, nullptr, "_matter._tcp.local."); - otMdnsServerMarkServiceForRemoval(thrInstancePtr, nullptr, "_matterc._udp.local."); + otServiceData.mServiceType = "_matter._tcp"; + otMdnsUnregisterServiceType(thrInstancePtr, &otServiceData, OT_MDNS_SERVICE_MARK_FOR_UNREGISTER); + otServiceData.mServiceType = "_matterc._udp"; + otMdnsUnregisterServiceType(thrInstancePtr, &otServiceData, OT_MDNS_SERVICE_MARK_FOR_UNREGISTER); return CHIP_NO_ERROR; } +#endif CHIP_ERROR ChipDnssdPublishService(const DnssdService * service, DnssdPublishCallback callback, void * context) { ReturnErrorCodeIf(service == nullptr, CHIP_ERROR_INVALID_ARGUMENT); + otInstance * thrInstancePtr = ThreadStackMgrImpl().OTInstance(); - otError otErr; - otDnsTxtEntry aTxtEntry; - uint32_t txtBufferOffset = 0; + uint32_t txtBufferOffset = 0; + otError otErr = OT_ERROR_NONE; + otMdnsService otServiceData = { 0 }; + +#if USE_MDNS_NEXT_SERVICE_API + bool bRegisterService = true; +#endif + + char serviceType[chip::Dnssd::kDnssdTypeAndProtocolMaxSize + 1] = ""; + snprintf(serviceType, sizeof(serviceType), "%s.%s", service->mType, GetProtocolString(service->mProtocol)); - char fullInstName[Common::kInstanceNameMaxLength + chip::Dnssd::kDnssdTypeAndProtocolMaxSize + LOCAL_DOMAIN_STRING_SIZE + 1] = - ""; - char serviceType[chip::Dnssd::kDnssdTypeAndProtocolMaxSize + LOCAL_DOMAIN_STRING_SIZE + 1] = ""; // secure space for the raw TXT data in the worst-case scenario relevant for Matter: // each entry consists of txt_entry_size (1B) + txt_entry_key + "=" + txt_entry_data uint8_t txtBuffer[kMaxMdnsServiceTxtEntriesNumber + kTotalMdnsServiceTxtBufferSize] = { 0 }; - if ((strcmp(service->mHostName, "") != 0) && (nullptr == otMdnsServerGetHostName(thrInstancePtr))) - { - char hostname[kHostNameMaxLength + LOCAL_DOMAIN_STRING_SIZE + 1] = ""; - snprintf(hostname, sizeof(hostname), "%s.local.", service->mHostName); - otMdnsServerSetHostName(thrInstancePtr, hostname); - } - - snprintf(serviceType, sizeof(serviceType), "%s.%s.local.", service->mType, GetProtocolString(service->mProtocol)); - snprintf(fullInstName, sizeof(fullInstName), "%s.%s", service->mName, serviceType); + // Don't try to do anything until the mDNS server is started + VerifyOrReturnValue(otMdnsIsEnabled(thrInstancePtr), CHIP_NO_ERROR); + // Create TXT Data as one string from multiple key entries for (uint32_t i = 0; i < service->mTextEntrySize; i++) { uint32_t keySize = strlen(service->mTextEntries[i].mKey); @@ -174,56 +269,124 @@ CHIP_ERROR ChipDnssdPublishService(const DnssdService * service, DnssdPublishCal txtBufferOffset += service->mTextEntries[i].mDataSize; } } - aTxtEntry.mKey = nullptr; - aTxtEntry.mValue = txtBuffer; - aTxtEntry.mValueLength = txtBufferOffset; - otErr = otMdnsServerAddService(thrInstancePtr, fullInstName, serviceType, service->mSubTypes, service->mSubTypeSize, - service->mPort, &aTxtEntry, 1); - // Ignore duplicate error and threat it as error none - if (otErr == OT_ERROR_DUPLICATED) - otErr = OT_ERROR_NONE; +#if USE_MDNS_NEXT_SERVICE_API + for (uint32_t i = 0; i < mServiceListFreeIndex; i++) + { + if ((0 == strcmp(mServiceList[i]->mHostName, service->mHostName)) && + (0 == strcmp(mServiceList[i]->mServiceInstance, service->mName)) && + (0 == strcmp(mServiceList[i]->mServiceType, serviceType))) + { + if ((mServiceList[i]->mTxtDataLength == txtBufferOffset) && + (0 == memcmp(txtBuffer, mServiceList[i]->mTxtData, txtBufferOffset))) + { + // In this case the service is + bRegisterService = false; + } + Platform::MemoryFree(mServiceList[i]); + if (i < --mServiceListFreeIndex) + { + // move last element in place of the removed one + mServiceList[i] = mServiceList[mServiceListFreeIndex]; + mServiceList[mServiceListFreeIndex] = nullptr; + } + else + { + mServiceList[i] = nullptr; + } + break; + } + } +#endif + if (bRegisterService) + { + if (strcmp(service->mHostName, "") != 0) + { + otServiceData.mHostName = service->mHostName; + } + + otServiceData.mServiceInstance = service->mName; + otServiceData.mServiceType = serviceType; + otServiceData.mSubTypeLabels = service->mSubTypes; + otServiceData.mSubTypeLabelsLength = service->mSubTypeSize; + otServiceData.mPort = service->mPort; + otServiceData.mTtl = service->mTtlSeconds; + otServiceData.mTxtData = txtBuffer; + otServiceData.mTxtDataLength = txtBufferOffset; + + otErr = otMdnsRegisterService(thrInstancePtr, &otServiceData, mRegisterServiceId++, NULL); + } return MapOpenThreadError(otErr); } +#if USE_MDNS_NEXT_SERVICE_API +CHIP_ERROR ChipDnssdFinalizeServiceUpdate() +{ + otInstance * thrInstancePtr = ThreadStackMgrImpl().OTInstance(); + + for (uint32_t i = 0; i < mServiceListFreeIndex; i++) + { + if (mServiceList[i] != nullptr) + { + otMdnsUnregisterService(thrInstancePtr, mServiceList[i]); + Platform::MemoryFree(mServiceList[i]); + mServiceList[i] = nullptr; + } + } + + mServiceListFreeIndex = 0; + return CHIP_NO_ERROR; +} + +#else CHIP_ERROR ChipDnssdFinalizeServiceUpdate() { - otMdnsServerRemoveMarkedServices(ThreadStackMgrImpl().OTInstance()); + otInstance * thrInstancePtr = ThreadStackMgrImpl().OTInstance(); + otMdnsService otServiceData = { 0 }; + + otServiceData.mHostName = ConnectivityManagerImpl().GetHostName(); + + otServiceData.mServiceType = "_matter._tcp"; + otMdnsUnregisterServiceType(thrInstancePtr, &otServiceData, OT_MDNS_SERVICE_UNREGISTER_MARKED_SERVICE); + otServiceData.mServiceType = "_matterc._udp"; + otMdnsUnregisterServiceType(thrInstancePtr, &otServiceData, OT_MDNS_SERVICE_UNREGISTER_MARKED_SERVICE); + return CHIP_NO_ERROR; } +#endif CHIP_ERROR ChipDnssdBrowse(const char * type, DnssdServiceProtocol protocol, Inet::IPAddressType addressType, Inet::InterfaceId interface, DnssdBrowseCallback callback, void * context, intptr_t * browseIdentifier) { - *browseIdentifier = reinterpret_cast(nullptr); - CHIP_ERROR error = CHIP_NO_ERROR; - CHIP_ERROR srpBrowseError = CHIP_NO_ERROR; - char serviceType[chip::Dnssd::kDnssdTypeAndProtocolMaxSize + ARPA_DOMAIN_STRING_SIZE + 1] = ""; // +1 for null-terminator + *browseIdentifier = reinterpret_cast(nullptr); + CHIP_ERROR error = CHIP_NO_ERROR; + CHIP_ERROR srpBrowseError = CHIP_NO_ERROR; + otInstance * thrInstancePtr = ThreadStackMgrImpl().OTInstance(); if (type == nullptr || callback == nullptr) return CHIP_ERROR_INVALID_ARGUMENT; - otInstance * thrInstancePtr = ThreadStackMgrImpl().OTInstance(); - mDnsBrowseCallback = callback; - - mDnsQueryCtx * browseContext = Platform::New(context, CHIP_NO_ERROR); - VerifyOrReturnError(browseContext != nullptr, CHIP_ERROR_NO_MEMORY); + mBrowseContext = Platform::New(context, callback); + VerifyOrReturnError(mBrowseContext != nullptr, CHIP_ERROR_NO_MEMORY); - // First try to browse the service in the SRP cache, use default.service.arpa as domain name - snprintf(serviceType, sizeof(serviceType), "%s.%s.default.service.arpa.", type, GetProtocolString(protocol)); + // First try to browse the service in the SRP cache + snprintf(mBrowseContext->mServiceType, sizeof(mBrowseContext->mServiceType), "%s.%s", type, GetProtocolString(protocol)); // After browsing in the SRP cache we will continue with regular mDNS browse - srpBrowseError = BrowseBySrp(thrInstancePtr, serviceType, context); + srpBrowseError = BrowseBySrp(thrInstancePtr, mBrowseContext->mServiceType, mBrowseContext); // Proceed to generate a mDNS query - snprintf(browseContext->mServiceType, sizeof(browseContext->mServiceType), "%s.%s.local.", type, GetProtocolString(protocol)); + mBrowseContext->mBrowseInfo.mServiceType = mBrowseContext->mServiceType; + mBrowseContext->mBrowseInfo.mSubTypeLabel = nullptr; + mBrowseContext->mBrowseInfo.mInfraIfIndex = mNetifIndex; + mBrowseContext->mBrowseInfo.mCallback = OtBrowseCallback; - error = MapOpenThreadError(otMdnsServerBrowse(thrInstancePtr, browseContext->mServiceType, OtBrowseCallback, browseContext)); + error = MapOpenThreadError(otMdnsStartBrowser(thrInstancePtr, &mBrowseContext->mBrowseInfo)); if (CHIP_NO_ERROR == error) { bBrowseInProgress = true; - *browseIdentifier = reinterpret_cast(browseContext); + *browseIdentifier = reinterpret_cast(mBrowseContext); } else { @@ -231,12 +394,13 @@ CHIP_ERROR ChipDnssdBrowse(const char * type, DnssdServiceProtocol protocol, Ine { // In this case, we need to send a final browse indication to signal the Matter App that there are no more // browse results coming - browseContext->error = error; - DeviceLayer::PlatformMgr().ScheduleWork(DispatchBrowseEmpty, reinterpret_cast(browseContext)); + mBrowseContext->error = error; + DeviceLayer::PlatformMgr().ScheduleWork(DispatchBrowseEmpty, reinterpret_cast(mBrowseContext)); } else { - Platform::Delete(browseContext); + Platform::Delete(mBrowseContext); + mBrowseContext = nullptr; } } return error; @@ -249,54 +413,73 @@ CHIP_ERROR ChipDnssdStopBrowse(intptr_t browseIdentifier) otError error = OT_ERROR_INVALID_ARGS; // browseContext is only valid when bBrowseInProgress is true. The Matter stack can call this function even with a browseContext - // that has been freed in DispatchBrowseEmpty before. + // that has been freed in DispatchBrowseEmpty. if ((true == bBrowseInProgress) && (browseContext)) { - browseContext->error = MapOpenThreadError(otMdnsServerStopQuery(thrInstancePtr, browseContext->mServiceType)); + browseContext->error = MapOpenThreadError(otMdnsStopBrowser(thrInstancePtr, &browseContext->mBrowseInfo)); // browse context will be freed in DispatchBrowseEmpty - DeviceLayer::PlatformMgr().ScheduleWork(DispatchBrowseEmpty, reinterpret_cast(browseContext)); + DispatchBrowseEmpty(reinterpret_cast(browseContext)); } return MapOpenThreadError(error); } CHIP_ERROR ChipDnssdResolve(DnssdService * browseResult, Inet::InterfaceId interface, DnssdResolveCallback callback, void * context) { - ChipError error; + ChipError error = CHIP_ERROR_NOT_FOUND; + if (browseResult == nullptr || callback == nullptr) return CHIP_ERROR_INVALID_ARGUMENT; otInstance * thrInstancePtr = ThreadStackMgrImpl().OTInstance(); - mDnsResolveCallback = callback; - char serviceType[chip::Dnssd::kDnssdTypeAndProtocolMaxSize + ARPA_DOMAIN_STRING_SIZE + 1] = ""; // +1 for null-terminator - char fullInstName[Common::kInstanceNameMaxLength + chip::Dnssd::kDnssdTypeAndProtocolMaxSize + ARPA_DOMAIN_STRING_SIZE + 1] = - ""; + mResolveContext = Platform::New(context, callback); + VerifyOrReturnError(mResolveContext != nullptr, CHIP_ERROR_NO_MEMORY); // First try to find the service in the SRP cache, use default.service.arpa as domain name - snprintf(serviceType, sizeof(serviceType), "%s.%s.default.service.arpa.", browseResult->mType, + snprintf(mResolveContext->mServiceType, sizeof(mResolveContext->mServiceType), "%s.%s", browseResult->mType, GetProtocolString(browseResult->mProtocol)); - snprintf(fullInstName, sizeof(fullInstName), "%s.%s", browseResult->mName, serviceType); - error = ResolveBySrp(browseResult, thrInstancePtr, fullInstName, context); + error = ResolveBySrp(thrInstancePtr, mResolveContext->mServiceType, mResolveContext, browseResult); + // If the SRP cache returns not found, proceed to generate a MDNS query if (CHIP_ERROR_NOT_FOUND == error) { - // If the SRP cache returns not found, proceed to generate a MDNS query - memset(serviceType, 0, sizeof(serviceType)); - memset(fullInstName, 0, sizeof(fullInstName)); + // The otMdnsSrvResolver structure contains only pointers to instance name and service type strings + // Use the memory from mMdnsService.mName to store the instance name string we are looking for + Platform::CopyString(mResolveContext->mMdnsService.mName, sizeof(mResolveContext->mMdnsService.mName), browseResult->mName); - snprintf(serviceType, sizeof(serviceType), "%s.%s.local.", browseResult->mType, GetProtocolString(browseResult->mProtocol)); - snprintf(fullInstName, sizeof(fullInstName), "%s.%s", browseResult->mName, serviceType); + mResolveContext->mSrvInfo.mInfraIfIndex = mNetifIndex; + mResolveContext->mSrvInfo.mCallback = OtServiceCallback; + mResolveContext->mSrvInfo.mServiceInstance = mResolveContext->mMdnsService.mName; + mResolveContext->mSrvInfo.mServiceType = mResolveContext->mServiceType; - return MapOpenThreadError(otMdnsServerResolveService(thrInstancePtr, fullInstName, OtServiceCallback, context)); + return MapOpenThreadError(otMdnsStartSrvResolver(thrInstancePtr, &mResolveContext->mSrvInfo)); } else { return error; } } +void ChipDnssdResolveNoLongerNeeded(const char * instanceName) +{ + if (mResolveContext != nullptr) + { + if (strcmp(instanceName, mResolveContext->mMdnsService.mName) == 0) + { + otMdnsStopSrvResolver(ThreadStackMgrImpl().OTInstance(), &mResolveContext->mSrvInfo); + + Platform::Delete(mResolveContext); + mResolveContext = nullptr; + } + } +} + +CHIP_ERROR ChipDnssdReconfirmRecord(const char * hostname, chip::Inet::IPAddress address, chip::Inet::InterfaceId interface) +{ + return CHIP_ERROR_NOT_IMPLEMENTED; +} -CHIP_ERROR BrowseBySrp(otInstance * thrInstancePtr, char * serviceName, void * context) +CHIP_ERROR BrowseBySrp(otInstance * thrInstancePtr, char * serviceName, mDnsQueryCtx * context) { const otSrpServerHost * host = nullptr; const otSrpServerService * service = nullptr; @@ -304,24 +487,26 @@ CHIP_ERROR BrowseBySrp(otInstance * thrInstancePtr, char * serviceName, void * c while ((host = otSrpServerGetNextHost(thrInstancePtr, host)) != nullptr) { - service = otSrpServerHostFindNextService(host, service, OT_SRP_SERVER_FLAGS_ANY_TYPE_ACTIVE_SERVICE, serviceName, nullptr); - if (service != nullptr) + while ((service = otSrpServerHostGetNextService(host, service)) != nullptr) { - mDnsQueryCtx * serviceContext; - - serviceContext = Platform::New(context, CHIP_NO_ERROR); - if (serviceContext != nullptr) + if ((false == otSrpServerServiceIsDeleted(service)) && + (0 == strncmp(otSrpServerServiceGetServiceName(service), serviceName, strlen(serviceName)))) { - if (CHIP_NO_ERROR == - FromSrpCacheToMdnsData(service, host, nullptr, serviceContext->mMdnsService, serviceContext->mServiceTxtEntry)) + mDnsQueryCtx * serviceContext = Platform::New(context->matterCtx, context->mDnsBrowseCallback); + if (serviceContext != nullptr) { - // Set error to CHIP_NO_ERROR to signal that there was at least one service found in the cache - error = CHIP_NO_ERROR; - DeviceLayer::PlatformMgr().ScheduleWork(DispatchBrowse, reinterpret_cast(serviceContext)); - } - else - { - Platform::Delete(serviceContext); + if (CHIP_NO_ERROR == + FromSrpCacheToMdnsData(service, host, nullptr, serviceContext->mMdnsService, + serviceContext->mServiceTxtEntry)) + { + // Set error to CHIP_NO_ERROR to signal that there was at least one service found in the cache + error = CHIP_NO_ERROR; + DeviceLayer::PlatformMgr().ScheduleWork(DispatchBrowse, reinterpret_cast(serviceContext)); + } + else + { + Platform::Delete(serviceContext); + } } } } @@ -329,7 +514,7 @@ CHIP_ERROR BrowseBySrp(otInstance * thrInstancePtr, char * serviceName, void * c return error; } -CHIP_ERROR ResolveBySrp(DnssdService * mdnsReq, otInstance * thrInstancePtr, char * instanceName, void * context) +CHIP_ERROR ResolveBySrp(otInstance * thrInstancePtr, char * serviceName, mDnsQueryCtx * context, DnssdService * mdnsReq) { const otSrpServerHost * host = nullptr; const otSrpServerService * service = nullptr; @@ -337,34 +522,27 @@ CHIP_ERROR ResolveBySrp(DnssdService * mdnsReq, otInstance * thrInstancePtr, cha while ((host = otSrpServerGetNextHost(thrInstancePtr, host)) != nullptr) { - service = otSrpServerHostFindNextService( - host, service, (OT_SRP_SERVER_SERVICE_FLAG_BASE_TYPE | OT_SRP_SERVER_SERVICE_FLAG_ACTIVE), nullptr, instanceName); - if (service != nullptr) + while ((service = otSrpServerHostGetNextService(host, service)) != nullptr) { - error = CHIP_NO_ERROR; - mDnsQueryCtx * serviceContext; - - serviceContext = Platform::New(context, CHIP_NO_ERROR); - if (serviceContext != nullptr) + if ((false == otSrpServerServiceIsDeleted(service)) && + (0 == strncmp(otSrpServerServiceGetServiceName(service), serviceName, strlen(serviceName))) && + (0 == strncmp(otSrpServerServiceGetInstanceName(service), mdnsReq->mName, strlen(mdnsReq->mName)))) { - error = - FromSrpCacheToMdnsData(service, host, mdnsReq, serviceContext->mMdnsService, serviceContext->mServiceTxtEntry); + error = FromSrpCacheToMdnsData(service, host, mdnsReq, context->mMdnsService, context->mServiceTxtEntry); if (error == CHIP_NO_ERROR) { - DeviceLayer::PlatformMgr().ScheduleWork(DispatchResolve, reinterpret_cast(serviceContext)); - } - else - { - Platform::Delete(serviceContext); + DeviceLayer::PlatformMgr().ScheduleWork(DispatchResolve, reinterpret_cast(context)); } + break; } - else - { - error = CHIP_ERROR_NO_MEMORY; - } + } + + if (error == CHIP_NO_ERROR) + { break; } } + return error; } @@ -480,35 +658,36 @@ CHIP_ERROR FromSrpCacheToMdnsData(const otSrpServerService * service, const otSr return CHIP_NO_ERROR; } -CHIP_ERROR FromOtDnsResponseToMdnsData(otDnsServiceInfo & serviceInfo, const char * serviceType, - chip::Dnssd::DnssdService & mdnsService, DnsServiceTxtEntries & serviceTxtEntries, - otError error) +static CHIP_ERROR FromServiceTypeToMdnsData(chip::Dnssd::DnssdService & mdnsService, const char * aServiceType) { char protocol[chip::Dnssd::kDnssdProtocolTextMaxSize + 1]; + const char * protocolSubstringStart; + size_t substringSize; - if (strchr(serviceType, '.') == nullptr) - return CHIP_ERROR_INVALID_ARGUMENT; - - // Extract from the ... the part. - size_t substringSize = strchr(serviceType, '.') - serviceType; + // Extract from the . the part. + substringSize = strchr(aServiceType, '.') - aServiceType; if (substringSize >= ArraySize(mdnsService.mType)) { return CHIP_ERROR_INVALID_ARGUMENT; } - Platform::CopyString(mdnsService.mType, substringSize + 1, serviceType); + Platform::CopyString(mdnsService.mType, ArraySize(mdnsService.mType), aServiceType); - // Extract from the ... the part. - const char * protocolSubstringStart = serviceType + substringSize + 1; + // Extract from the .. the . part. + protocolSubstringStart = aServiceType + substringSize; + // Check that the protocolSubstringStart starts wit a '.' to be sure we are in the right place if (strchr(protocolSubstringStart, '.') == nullptr) + { return CHIP_ERROR_INVALID_ARGUMENT; + } - substringSize = strchr(protocolSubstringStart, '.') - protocolSubstringStart; + // Jump over '.' in protocolSubstringStart and substract the string terminator from the size + substringSize = strlen(++protocolSubstringStart) - 1; if (substringSize >= ArraySize(protocol)) { return CHIP_ERROR_INVALID_ARGUMENT; } - Platform::CopyString(protocol, substringSize + 1, protocolSubstringStart); + Platform::CopyString(protocol, ArraySize(protocol), protocolSubstringStart); if (strncmp(protocol, "_udp", chip::Dnssd::kDnssdProtocolTextMaxSize) == 0) { @@ -523,274 +702,236 @@ CHIP_ERROR FromOtDnsResponseToMdnsData(otDnsServiceInfo & serviceInfo, const cha mdnsService.mProtocol = chip::Dnssd::DnssdServiceProtocol::kDnssdProtocolUnknown; } - // Check if SRV record was included in DNS response. - if (error != OT_ERROR_NOT_FOUND) - { - if (strchr(serviceInfo.mHostNameBuffer, '.') == nullptr) - return CHIP_ERROR_INVALID_ARGUMENT; + return CHIP_NO_ERROR; +} - // Extract from the .. the part. - substringSize = strchr(serviceInfo.mHostNameBuffer, '.') - serviceInfo.mHostNameBuffer; - if (substringSize >= ArraySize(mdnsService.mHostName)) - { - return CHIP_ERROR_INVALID_ARGUMENT; - } - Platform::CopyString(mdnsService.mHostName, substringSize + 1, serviceInfo.mHostNameBuffer); +static void OtBrowseCallback(otInstance * aInstance, const otMdnsBrowseResult * aResult) +{ + CHIP_ERROR error; - mdnsService.mPort = serviceInfo.mPort; - } + // Ingnore reponses with TTL 0, the record is no longer valid and was removed from the mDNS cache + VerifyOrReturn(aResult->mTtl > 0); - // All mDNS replies come from the External Netif - mdnsService.mInterface = ConnectivityManagerImpl().GetExternalInterface(); + mDnsQueryCtx * tmpContext = Platform::New(mBrowseContext->matterCtx, mBrowseContext->mDnsBrowseCallback); + VerifyOrReturn(tmpContext != nullptr); - // Check if AAAA record was included in DNS response. - if (!otIp6IsAddressUnspecified(&serviceInfo.mHostAddress)) - { - mdnsService.mAddressType = Inet::IPAddressType::kIPv6; - mdnsService.mAddress = std::optional(ToIPAddress(serviceInfo.mHostAddress)); - } + Platform::CopyString(tmpContext->mMdnsService.mName, sizeof(tmpContext->mMdnsService.mName), aResult->mServiceInstance); + error = FromServiceTypeToMdnsData(tmpContext->mMdnsService, aResult->mServiceType); - // Check if TXT record was included in DNS response. - if (serviceInfo.mTxtDataSize != 0) + if (CHIP_NO_ERROR == error) { - otDnsTxtEntryIterator iterator; - otDnsInitTxtEntryIterator(&iterator, serviceInfo.mTxtData, serviceInfo.mTxtDataSize); - - otDnsTxtEntry txtEntry; - chip::FixedBufferAllocator alloc(serviceTxtEntries.mBuffer); - - uint8_t entryIndex = 0; - while ((otDnsGetNextTxtEntry(&iterator, &txtEntry) == OT_ERROR_NONE) && entryIndex < 64) - { - if (txtEntry.mKey == nullptr || txtEntry.mValue == nullptr) - continue; - - serviceTxtEntries.mTxtEntries[entryIndex].mKey = alloc.Clone(txtEntry.mKey); - serviceTxtEntries.mTxtEntries[entryIndex].mData = alloc.Clone(txtEntry.mValue, txtEntry.mValueLength); - serviceTxtEntries.mTxtEntries[entryIndex].mDataSize = txtEntry.mValueLength; - entryIndex++; - } - - ReturnErrorCodeIf(alloc.AnyAllocFailed(), CHIP_ERROR_BUFFER_TOO_SMALL); - - mdnsService.mTextEntries = serviceTxtEntries.mTxtEntries; - mdnsService.mTextEntrySize = entryIndex; + DeviceLayer::PlatformMgr().ScheduleWork(DispatchBrowse, reinterpret_cast(tmpContext)); } else { - mdnsService.mTextEntrySize = 0; + Platform::Delete(tmpContext); } - - return CHIP_NO_ERROR; -} - -void ChipDnssdResolveNoLongerNeeded(const char * instanceName) {} - -CHIP_ERROR ChipDnssdReconfirmRecord(const char * hostname, chip::Inet::IPAddress address, chip::Inet::InterfaceId interface) -{ - return CHIP_ERROR_NOT_IMPLEMENTED; } -static void OtBrowseCallback(otError aError, const otDnsBrowseResponse * aResponse, void * aContext) +static void OtServiceCallback(otInstance * aInstance, const otMdnsSrvResult * aResult) { CHIP_ERROR error; - // type buffer size is kDnssdTypeAndProtocolMaxSize + . + kMaxDomainNameSize + . + termination character - char type[Dnssd::kDnssdTypeAndProtocolMaxSize + LOCAL_DOMAIN_STRING_SIZE + 3]; - // hostname buffer size is kHostNameMaxLength + . + kMaxDomainNameSize + . + termination character - char hostname[Dnssd::kHostNameMaxLength + LOCAL_DOMAIN_STRING_SIZE + 3]; - // secure space for the raw TXT data in the worst-case scenario relevant for Matter: - // each entry consists of txt_entry_size (1B) + txt_entry_key + "=" + txt_entry_data - uint8_t txtBuffer[kMaxMdnsServiceTxtEntriesNumber + kTotalMdnsServiceTxtBufferSize]; - mDnsQueryCtx * browseContext = reinterpret_cast(aContext); - otDnsServiceInfo serviceInfo; - uint16_t index = 0; + // Ingnore reponses with TTL 0, the record is no longer valid and was removed from the mDNS cache + VerifyOrReturn(aResult->mTtl > 0); + + VerifyOrReturn(mResolveContext != nullptr); + + error = FromServiceTypeToMdnsData(mResolveContext->mMdnsService, aResult->mServiceType); + mResolveContext->error = error; + + if (CHIP_NO_ERROR == error) + { + Platform::CopyString(mResolveContext->mMdnsService.mName, sizeof(mResolveContext->mMdnsService.mName), + aResult->mServiceInstance); + Platform::CopyString(mResolveContext->mMdnsService.mHostName, sizeof(mResolveContext->mMdnsService.mHostName), + aResult->mHostName); - /// TODO: check this code, might be remvoed, or if not free browseContext - if (mDnsBrowseCallback == nullptr) + mResolveContext->mMdnsService.mPort = aResult->mPort; + mResolveContext->mMdnsService.mTtlSeconds = aResult->mTtl; + DeviceLayer::PlatformMgr().ScheduleWork(DispatchTxtResolve, reinterpret_cast(mResolveContext)); + } + else { - ChipLogError(DeviceLayer, "Invalid dns browse callback"); - return; + HandleResolveCleanup(*mResolveContext, kResolveStepSrv); } +} - VerifyOrExit(aError == OT_ERROR_NONE, error = MapOpenThreadError(aError)); +static void OtTxtCallback(otInstance * aInstance, const otMdnsTxtResult * aResult) +{ + bool bSendDispatch = true; - error = MapOpenThreadError(otDnsBrowseResponseGetServiceName(aResponse, type, sizeof(type))); + // Ingnore reponses with TTL 0, the record is no longer valid and was removed from the mDNS cache + VerifyOrReturn(aResult->mTtl > 0); - VerifyOrExit(error == CHIP_NO_ERROR, ); + VerifyOrReturn(mResolveContext != nullptr); - char serviceName[Dnssd::Common::kInstanceNameMaxLength + 1]; - while (otDnsBrowseResponseGetServiceInstance(aResponse, index, serviceName, sizeof(serviceName)) == OT_ERROR_NONE) + // Check if TXT record was included in the response. + if (aResult->mTxtDataLength != 0) { - serviceInfo.mHostNameBuffer = hostname; - serviceInfo.mHostNameBufferSize = sizeof(hostname); - serviceInfo.mTxtData = txtBuffer; - serviceInfo.mTxtDataSize = sizeof(txtBuffer); - - otError err = otDnsBrowseResponseGetServiceInfo(aResponse, serviceName, &serviceInfo); - error = MapOpenThreadError(err); + otDnsTxtEntryIterator iterator; + otDnsInitTxtEntryIterator(&iterator, aResult->mTxtData, aResult->mTxtDataLength); - VerifyOrExit(err == OT_ERROR_NOT_FOUND || err == OT_ERROR_NONE, ); + otDnsTxtEntry txtEntry; + chip::FixedBufferAllocator alloc(mResolveContext->mServiceTxtEntry.mBuffer); - mDnsQueryCtx * tmpContext = Platform::New(browseContext->matterCtx, CHIP_NO_ERROR); + uint8_t entryIndex = 0; + while ((otDnsGetNextTxtEntry(&iterator, &txtEntry) == OT_ERROR_NONE) && entryIndex < 64) + { + if (txtEntry.mKey == nullptr || txtEntry.mValue == nullptr) + continue; - VerifyOrExit(tmpContext != nullptr, error = CHIP_ERROR_NO_MEMORY); + mResolveContext->mServiceTxtEntry.mTxtEntries[entryIndex].mKey = alloc.Clone(txtEntry.mKey); + mResolveContext->mServiceTxtEntry.mTxtEntries[entryIndex].mData = alloc.Clone(txtEntry.mValue, txtEntry.mValueLength); + mResolveContext->mServiceTxtEntry.mTxtEntries[entryIndex].mDataSize = txtEntry.mValueLength; + entryIndex++; + } - error = FromOtDnsResponseToMdnsData(serviceInfo, type, tmpContext->mMdnsService, tmpContext->mServiceTxtEntry, err); - if (CHIP_NO_ERROR == error) + if (alloc.AnyAllocFailed()) { - // Invoke callback for every service one by one instead of for the whole - // list due to large memory size needed to allocate on stack. - static_assert(ArraySize(tmpContext->mMdnsService.mName) >= ArraySize(serviceName), - "The target buffer must be big enough"); - Platform::CopyString(tmpContext->mMdnsService.mName, serviceName); - DeviceLayer::PlatformMgr().ScheduleWork(DispatchBrowse, reinterpret_cast(tmpContext)); + bSendDispatch = false; } else { - Platform::Delete(tmpContext); + mResolveContext->mMdnsService.mTextEntries = mResolveContext->mServiceTxtEntry.mTxtEntries; + mResolveContext->mMdnsService.mTextEntrySize = entryIndex; } - index++; } - -exit: - // Invoke callback to notify about end-of-browse when OT_ERROR_RESPONSE_TIMEOUT is received, otherwise ignore errors - if (aError == OT_ERROR_RESPONSE_TIMEOUT) + else { - DeviceLayer::PlatformMgr().ScheduleWork(DispatchBrowseEmpty, reinterpret_cast(browseContext)); + mResolveContext->mMdnsService.mTextEntrySize = 0; } -} -static void OtServiceCallback(otError aError, const otDnsServiceResponse * aResponse, void * aContext) -{ - CHIP_ERROR error; - otError otErr; - otDnsServiceInfo serviceInfo; - mDnsQueryCtx * serviceContext; - bool bStopQuery = false; - - // If error is timeout we don't need to inform the Matter app and we can just exit - VerifyOrReturn(aError != OT_ERROR_RESPONSE_TIMEOUT, ); - - bStopQuery = true; - serviceContext = Platform::New(aContext, MapOpenThreadError(aError)); - VerifyOrExit(serviceContext != nullptr, error = CHIP_ERROR_NO_MEMORY); - - // type buffer size is kDnssdTypeAndProtocolMaxSize + . + kMaxDomainNameSize + . + termination character - char type[Dnssd::kDnssdTypeAndProtocolMaxSize + LOCAL_DOMAIN_STRING_SIZE + 3]; - // hostname buffer size is kHostNameMaxLength + . + kMaxDomainNameSize + . + termination character - char hostname[Dnssd::kHostNameMaxLength + LOCAL_DOMAIN_STRING_SIZE + 3]; - // secure space for the raw TXT data in the worst-case scenario relevant for Matter: - // each entry consists of txt_entry_size (1B) + txt_entry_key + "=" + txt_entry_data - uint8_t txtBuffer[kMaxMdnsServiceTxtEntriesNumber + kTotalMdnsServiceTxtBufferSize]; - if (mDnsResolveCallback == nullptr) + if (bSendDispatch) { - ChipLogError(DeviceLayer, "Invalid dns resolve callback"); - return; + DeviceLayer::PlatformMgr().ScheduleWork(DispatchAddressResolve, reinterpret_cast(mResolveContext)); } - - VerifyOrExit(aError == OT_ERROR_NONE, error = MapOpenThreadError(aError)); - - error = MapOpenThreadError(otDnsServiceResponseGetServiceName(aResponse, serviceContext->mMdnsService.mName, - sizeof(serviceContext->mMdnsService.mName), type, sizeof(type))); - - VerifyOrExit(error == CHIP_NO_ERROR, ); - - serviceInfo.mHostNameBuffer = hostname; - serviceInfo.mHostNameBufferSize = sizeof(hostname); - serviceInfo.mTxtData = txtBuffer; - serviceInfo.mTxtDataSize = sizeof(txtBuffer); - - otErr = otDnsServiceResponseGetServiceInfo(aResponse, &serviceInfo); - error = MapOpenThreadError(otErr); - - VerifyOrExit(error == CHIP_NO_ERROR, ); - - error = FromOtDnsResponseToMdnsData(serviceInfo, type, serviceContext->mMdnsService, serviceContext->mServiceTxtEntry, otErr); - -exit: - if (serviceContext == nullptr) + else { - DeviceLayer::PlatformMgr().ScheduleWork(DispatchResolveNoMemory, reinterpret_cast(aContext)); - return; + HandleResolveCleanup(*mResolveContext, kResolveStepTxt); } +} - serviceContext->error = error; +static void OtAddressCallback(otInstance * aInstance, const otMdnsAddressResult * aResult) +{ + // Ingnore reponses with TTL 0, the record is no longer valid and was removed from the mDNS cache + VerifyOrReturn((aResult->mAddressesLength > 0) && (aResult->mAddresses[0].mTtl > 0)); - // If IPv6 address in unspecified (AAAA record not present), send additional DNS query to obtain IPv6 address. - if (otIp6IsAddressUnspecified(&serviceInfo.mHostAddress)) - { - DeviceLayer::PlatformMgr().ScheduleWork(DispatchAddressResolve, reinterpret_cast(serviceContext)); - } - else - { - DeviceLayer::PlatformMgr().ScheduleWork(DispatchResolve, reinterpret_cast(serviceContext)); - } + VerifyOrReturn(mResolveContext != nullptr); - if (bStopQuery) - { - char fullInstName[Common::kInstanceNameMaxLength + chip::Dnssd::kDnssdTypeAndProtocolMaxSize + LOCAL_DOMAIN_STRING_SIZE + - 1] = ""; - snprintf(fullInstName, sizeof(fullInstName), "%s.%s", serviceContext->mMdnsService.mName, type); + mResolveContext->mMdnsService.mAddressType = Inet::IPAddressType::kIPv6; + mResolveContext->mMdnsService.mAddress = std::optional(ToIPAddress(aResult->mAddresses[0].mAddress)); - otInstance * thrInstancePtr = ThreadStackMgrImpl().OTInstance(); - otMdnsServerStopQuery(thrInstancePtr, fullInstName); - } + DeviceLayer::PlatformMgr().ScheduleWork(DispatchResolve, reinterpret_cast(mResolveContext)); } -void DispatchBrowseEmpty(intptr_t context) +static void DispatchBrowseEmpty(intptr_t context) { auto * browseContext = reinterpret_cast(context); - mDnsBrowseCallback(browseContext->matterCtx, nullptr, 0, true, browseContext->error); + browseContext->mDnsBrowseCallback(browseContext->matterCtx, nullptr, 0, true, browseContext->error); Platform::Delete(browseContext); + mBrowseContext = nullptr; bBrowseInProgress = false; } -void DispatchBrowse(intptr_t context) +static void DispatchBrowse(intptr_t context) { auto * browseContext = reinterpret_cast(context); - mDnsBrowseCallback(browseContext->matterCtx, &browseContext->mMdnsService, 1, false, browseContext->error); + browseContext->mDnsBrowseCallback(browseContext->matterCtx, &browseContext->mMdnsService, 1, false, browseContext->error); Platform::Delete(browseContext); } -void DispatchBrowseNoMemory(intptr_t context) +static void DispatchTxtResolve(intptr_t context) { - mDnsBrowseCallback(reinterpret_cast(context), nullptr, 0, true, CHIP_ERROR_NO_MEMORY); + mDnsQueryCtx * resolveContext = reinterpret_cast(context); + otError error; + + // Stop SRV resolver before starting TXT one, ignore error as it will only happen if mMDS module is not initialized + otMdnsStopSrvResolver(ThreadStackMgrImpl().OTInstance(), &resolveContext->mSrvInfo); + + resolveContext->mTxtInfo.mServiceInstance = resolveContext->mMdnsService.mName; + resolveContext->mTxtInfo.mServiceType = resolveContext->mServiceType; + resolveContext->mTxtInfo.mCallback = OtTxtCallback; + resolveContext->mTxtInfo.mInfraIfIndex = mNetifIndex; + + error = otMdnsStartTxtResolver(ThreadStackMgrImpl().OTInstance(), &resolveContext->mTxtInfo); + if (error != OT_ERROR_NONE) + { + resolveContext->error = MapOpenThreadError(error); + DeviceLayer::PlatformMgr().ScheduleWork(DispatchResolveError, reinterpret_cast(resolveContext)); + } } -void DispatchAddressResolve(intptr_t context) +static void DispatchAddressResolve(intptr_t context) { - CHIP_ERROR error = CHIP_ERROR_NO_MEMORY; // ResolveAddress(context, OnDnsAddressResolveResult); + otError error; + mDnsQueryCtx * resolveContext = reinterpret_cast(context); + // Stop TXT resolver before starting address one, ignore error as it will only happen if mMDS module is not initialized + otMdnsStopTxtResolver(ThreadStackMgrImpl().OTInstance(), &resolveContext->mTxtInfo); - // In case of address resolve failure, fill the error code field and dispatch method to end resolve process. - if (error != CHIP_NO_ERROR) - { - mDnsQueryCtx * resolveContext = reinterpret_cast(context); - resolveContext->error = error; + resolveContext->mAddrInfo.mCallback = OtAddressCallback; + resolveContext->mAddrInfo.mHostName = resolveContext->mMdnsService.mHostName; + resolveContext->mAddrInfo.mInfraIfIndex = mNetifIndex; - DeviceLayer::PlatformMgr().ScheduleWork(DispatchResolve, reinterpret_cast(resolveContext)); + error = otMdnsStartIp6AddressResolver(ThreadStackMgrImpl().OTInstance(), &resolveContext->mAddrInfo); + if (error != OT_ERROR_NONE) + { + resolveContext->error = MapOpenThreadError(error); + DeviceLayer::PlatformMgr().ScheduleWork(DispatchResolveError, reinterpret_cast(resolveContext)); } } -void DispatchResolve(intptr_t context) +static void DispatchResolve(intptr_t context) { mDnsQueryCtx * resolveContext = reinterpret_cast(context); Dnssd::DnssdService & service = resolveContext->mMdnsService; Span ipAddrs; + // Stop Address resolver, we have finished resolving the service + otMdnsStopIp6AddressResolver(ThreadStackMgrImpl().OTInstance(), &resolveContext->mAddrInfo); + if (service.mAddress.has_value()) { ipAddrs = Span(&*service.mAddress, 1); } - mDnsResolveCallback(resolveContext->matterCtx, &service, ipAddrs, resolveContext->error); + // Signal that the context will be freed and that the resolve operation is stopped because Matter will + // try do stop it again on the mDnsResolveCallback + mResolveContext = nullptr; + + resolveContext->mDnsResolveCallback(resolveContext->matterCtx, &service, ipAddrs, resolveContext->error); Platform::Delete(resolveContext); } -void DispatchResolveNoMemory(intptr_t context) +static void DispatchResolveError(intptr_t context) { + mDnsQueryCtx * resolveContext = reinterpret_cast(context); Span ipAddrs; - mDnsResolveCallback(reinterpret_cast(context), nullptr, ipAddrs, CHIP_ERROR_NO_MEMORY); + + // Signal that the context will be freed and that the resolve operation is stopped because Matter will + // try do stop it again on the mDnsResolveCallback + mResolveContext = nullptr; + + resolveContext->mDnsResolveCallback(resolveContext->matterCtx, nullptr, ipAddrs, resolveContext->error); + Platform::Delete(resolveContext); +} + +void HandleResolveCleanup(mDnsQueryCtx & resolveContext, ResolveStep stepType) +{ + switch (stepType) + { + case kResolveStepSrv: + otMdnsStopSrvResolver(ThreadStackMgrImpl().OTInstance(), &resolveContext.mSrvInfo); + break; + case kResolveStepTxt: + otMdnsStopTxtResolver(ThreadStackMgrImpl().OTInstance(), &resolveContext.mTxtInfo); + break; + case kResolveStepIpAddr: + otMdnsStopIp6AddressResolver(ThreadStackMgrImpl().OTInstance(), &resolveContext.mAddrInfo); + break; + } + + DeviceLayer::PlatformMgr().ScheduleWork(DispatchResolve, reinterpret_cast(&resolveContext)); } } // namespace Dnssd diff --git a/src/platform/nxp/common/NXPConfig.h b/src/platform/nxp/common/NXPConfig.h index 432acfa196abbb..03d6174763fb69 100644 --- a/src/platform/nxp/common/NXPConfig.h +++ b/src/platform/nxp/common/NXPConfig.h @@ -59,7 +59,7 @@ namespace Internal { constexpr inline uint16_t config_key(uint8_t chipId, uint8_t pdmId) { - return static_cast(chipId) << 8 | pdmId; + return (uint16_t) (static_cast(chipId) << 8 | pdmId); } /** diff --git a/src/platform/nxp/common/ram_storage.c b/src/platform/nxp/common/ram_storage.c index bfd1869710ebf6..b966b38816e2a7 100644 --- a/src/platform/nxp/common/ram_storage.c +++ b/src/platform/nxp/common/ram_storage.c @@ -319,13 +319,9 @@ int ramStorageSavetoFlash(const char * file_name, uint8_t * buffer, uint32_t buf void ramStorageDump(const ramBufferDescriptor * pBuffer) { - uint16_t i = 0; - uint16_t j = 0; - uint16_t valueLength = 0; - uint16_t readLength; - int currentIndex = 0; + uint16_t i = 0; + uint16_t j = 0; const struct settingsBlock * currentBlock; - rsError error = RS_ERROR_NOT_FOUND; (void) OSA_MutexLock((osa_mutex_handle_t) mRamStorageMutexId, osaWaitForever_c); diff --git a/src/platform/nxp/k32w1/BLEManagerImpl.cpp b/src/platform/nxp/mcxw71_k32w1/BLEManagerImpl.cpp similarity index 98% rename from src/platform/nxp/k32w1/BLEManagerImpl.cpp rename to src/platform/nxp/mcxw71_k32w1/BLEManagerImpl.cpp index fe3ebd0c0b5027..1eefdf5ef16ffc 100644 --- a/src/platform/nxp/k32w1/BLEManagerImpl.cpp +++ b/src/platform/nxp/mcxw71_k32w1/BLEManagerImpl.cpp @@ -28,7 +28,7 @@ messaging_t gHci2Host_TaskQueue; /*! Event for the Host Task Queue */ OSA_EVENT_HANDLE_DEFINE(gHost_TaskEvent); -#include +#include extern "C" bleResult_t Hci_Reset(void); diff --git a/src/platform/nxp/k32w1/BLEManagerImpl.h b/src/platform/nxp/mcxw71_k32w1/BLEManagerImpl.h similarity index 100% rename from src/platform/nxp/k32w1/BLEManagerImpl.h rename to src/platform/nxp/mcxw71_k32w1/BLEManagerImpl.h diff --git a/src/platform/nxp/k32w1/BUILD.gn b/src/platform/nxp/mcxw71_k32w1/BUILD.gn similarity index 96% rename from src/platform/nxp/k32w1/BUILD.gn rename to src/platform/nxp/mcxw71_k32w1/BUILD.gn index 89e9ad06e918f4..9e190474031296 100644 --- a/src/platform/nxp/k32w1/BUILD.gn +++ b/src/platform/nxp/mcxw71_k32w1/BUILD.gn @@ -24,7 +24,7 @@ import("${nxp_sdk_build_root}/nxp_sdk.gni") import("${nxp_sdk_build_root}/${nxp_sdk_name}/${nxp_sdk_name}.gni") assert(chip_device_platform == "nxp") -assert(nxp_platform == "k32w1") +assert(nxp_platform == "mcxw71_k32w1") assert(chip_with_low_power == 0 || (chip_with_low_power == 1 && chip_with_ot_cli == 0), @@ -43,7 +43,7 @@ source_set("nxp_factory_data") { "${chip_root}/src/credentials/CertificationDeclaration.h", ] - defines = [ "PLATFORM_FACTORY_DATA_PROVIDER_IMPL_HEADER=\"platform/nxp/k32w1/FactoryDataProviderImpl.h\"" ] + defines = [ "PLATFORM_FACTORY_DATA_PROVIDER_IMPL_HEADER=\"platform/nxp/mcxw71_k32w1/FactoryDataProviderImpl.h\"" ] deps = [ ":nxp_platform", @@ -151,8 +151,8 @@ static_library("nxp_platform") { "${chip_root}/src/credentials/examples/DeviceAttestationCredsExample.h", "${chip_root}/src/credentials/examples/ExampleDACs.h", "${chip_root}/src/credentials/examples/ExamplePAI.h", - "${chip_root}/src/platform/nxp/k32w1/BLEManagerImpl.h", - "${chip_root}/src/platform/nxp/k32w1/SMU2Manager.h", + "${chip_root}/src/platform/nxp/mcxw71_k32w1/BLEManagerImpl.h", + "${chip_root}/src/platform/nxp/mcxw71_k32w1/SMU2Manager.h", ] public_deps = [ "${chip_root}/src/platform:platform_base" ] diff --git a/src/platform/nxp/k32w1/BlePlatformConfig.h b/src/platform/nxp/mcxw71_k32w1/BlePlatformConfig.h similarity index 100% rename from src/platform/nxp/k32w1/BlePlatformConfig.h rename to src/platform/nxp/mcxw71_k32w1/BlePlatformConfig.h diff --git a/src/platform/nxp/k32w1/CHIPCryptoPalK32W1.cpp b/src/platform/nxp/mcxw71_k32w1/CHIPCryptoPalK32W1.cpp similarity index 100% rename from src/platform/nxp/k32w1/CHIPCryptoPalK32W1.cpp rename to src/platform/nxp/mcxw71_k32w1/CHIPCryptoPalK32W1.cpp diff --git a/src/platform/nxp/k32w1/CHIPDevicePlatformConfig.h b/src/platform/nxp/mcxw71_k32w1/CHIPDevicePlatformConfig.h similarity index 100% rename from src/platform/nxp/k32w1/CHIPDevicePlatformConfig.h rename to src/platform/nxp/mcxw71_k32w1/CHIPDevicePlatformConfig.h diff --git a/src/platform/nxp/k32w1/CHIPDevicePlatformEvent.h b/src/platform/nxp/mcxw71_k32w1/CHIPDevicePlatformEvent.h similarity index 100% rename from src/platform/nxp/k32w1/CHIPDevicePlatformEvent.h rename to src/platform/nxp/mcxw71_k32w1/CHIPDevicePlatformEvent.h diff --git a/src/platform/nxp/k32w1/CHIPPlatformConfig.h b/src/platform/nxp/mcxw71_k32w1/CHIPPlatformConfig.h similarity index 100% rename from src/platform/nxp/k32w1/CHIPPlatformConfig.h rename to src/platform/nxp/mcxw71_k32w1/CHIPPlatformConfig.h diff --git a/src/platform/nxp/k32w1/ConfigurationManagerImpl.cpp b/src/platform/nxp/mcxw71_k32w1/ConfigurationManagerImpl.cpp similarity index 99% rename from src/platform/nxp/k32w1/ConfigurationManagerImpl.cpp rename to src/platform/nxp/mcxw71_k32w1/ConfigurationManagerImpl.cpp index fc6815d20fd157..34e7faa8e57531 100644 --- a/src/platform/nxp/k32w1/ConfigurationManagerImpl.cpp +++ b/src/platform/nxp/mcxw71_k32w1/ConfigurationManagerImpl.cpp @@ -30,7 +30,7 @@ #include #include #if defined(USE_SMU2_DYNAMIC) -#include +#include #endif // #include diff --git a/src/platform/nxp/k32w1/ConfigurationManagerImpl.h b/src/platform/nxp/mcxw71_k32w1/ConfigurationManagerImpl.h similarity index 98% rename from src/platform/nxp/k32w1/ConfigurationManagerImpl.h rename to src/platform/nxp/mcxw71_k32w1/ConfigurationManagerImpl.h index ba6dd2e721340b..c732ad6230b828 100644 --- a/src/platform/nxp/k32w1/ConfigurationManagerImpl.h +++ b/src/platform/nxp/mcxw71_k32w1/ConfigurationManagerImpl.h @@ -26,7 +26,7 @@ #pragma once #if (CHIP_PLAT_NVM_SUPPORT == 1) -#include +#include #else #include #endif diff --git a/src/platform/nxp/k32w1/ConnectivityManagerImpl.cpp b/src/platform/nxp/mcxw71_k32w1/ConnectivityManagerImpl.cpp similarity index 100% rename from src/platform/nxp/k32w1/ConnectivityManagerImpl.cpp rename to src/platform/nxp/mcxw71_k32w1/ConnectivityManagerImpl.cpp diff --git a/src/platform/nxp/k32w1/ConnectivityManagerImpl.h b/src/platform/nxp/mcxw71_k32w1/ConnectivityManagerImpl.h similarity index 100% rename from src/platform/nxp/k32w1/ConnectivityManagerImpl.h rename to src/platform/nxp/mcxw71_k32w1/ConnectivityManagerImpl.h diff --git a/src/platform/nxp/k32w1/DiagnosticDataProviderImpl.cpp b/src/platform/nxp/mcxw71_k32w1/DiagnosticDataProviderImpl.cpp similarity index 99% rename from src/platform/nxp/k32w1/DiagnosticDataProviderImpl.cpp rename to src/platform/nxp/mcxw71_k32w1/DiagnosticDataProviderImpl.cpp index 090feb53adde4a..9b60fabfca98bf 100644 --- a/src/platform/nxp/k32w1/DiagnosticDataProviderImpl.cpp +++ b/src/platform/nxp/mcxw71_k32w1/DiagnosticDataProviderImpl.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #if CHIP_SYSTEM_CONFIG_USE_LWIP #include diff --git a/src/platform/nxp/k32w1/DiagnosticDataProviderImpl.h b/src/platform/nxp/mcxw71_k32w1/DiagnosticDataProviderImpl.h similarity index 100% rename from src/platform/nxp/k32w1/DiagnosticDataProviderImpl.h rename to src/platform/nxp/mcxw71_k32w1/DiagnosticDataProviderImpl.h diff --git a/src/platform/nxp/k32w1/FactoryDataDriverImpl.cpp b/src/platform/nxp/mcxw71_k32w1/FactoryDataDriverImpl.cpp similarity index 98% rename from src/platform/nxp/k32w1/FactoryDataDriverImpl.cpp rename to src/platform/nxp/mcxw71_k32w1/FactoryDataDriverImpl.cpp index ae50e2361b8257..473c4932ee1ba1 100644 --- a/src/platform/nxp/k32w1/FactoryDataDriverImpl.cpp +++ b/src/platform/nxp/mcxw71_k32w1/FactoryDataDriverImpl.cpp @@ -17,7 +17,7 @@ #include #include -#include +#include using namespace chip::DeviceLayer::PersistedStorage; diff --git a/src/platform/nxp/k32w1/FactoryDataDriverImpl.h b/src/platform/nxp/mcxw71_k32w1/FactoryDataDriverImpl.h similarity index 100% rename from src/platform/nxp/k32w1/FactoryDataDriverImpl.h rename to src/platform/nxp/mcxw71_k32w1/FactoryDataDriverImpl.h diff --git a/src/platform/nxp/k32w1/FactoryDataProviderImpl.cpp b/src/platform/nxp/mcxw71_k32w1/FactoryDataProviderImpl.cpp similarity index 99% rename from src/platform/nxp/k32w1/FactoryDataProviderImpl.cpp rename to src/platform/nxp/mcxw71_k32w1/FactoryDataProviderImpl.cpp index f3af97803b13d0..c55940e8838395 100644 --- a/src/platform/nxp/k32w1/FactoryDataProviderImpl.cpp +++ b/src/platform/nxp/mcxw71_k32w1/FactoryDataProviderImpl.cpp @@ -15,7 +15,7 @@ * limitations under the License. */ #include -#include +#include #include #include "fsl_adapter_flash.h" diff --git a/src/platform/nxp/k32w1/FactoryDataProviderImpl.h b/src/platform/nxp/mcxw71_k32w1/FactoryDataProviderImpl.h similarity index 100% rename from src/platform/nxp/k32w1/FactoryDataProviderImpl.h rename to src/platform/nxp/mcxw71_k32w1/FactoryDataProviderImpl.h diff --git a/src/platform/nxp/k32w1/InetPlatformConfig.h b/src/platform/nxp/mcxw71_k32w1/InetPlatformConfig.h similarity index 100% rename from src/platform/nxp/k32w1/InetPlatformConfig.h rename to src/platform/nxp/mcxw71_k32w1/InetPlatformConfig.h diff --git a/src/platform/nxp/k32w1/K32W1Config.cpp b/src/platform/nxp/mcxw71_k32w1/K32W1Config.cpp similarity index 99% rename from src/platform/nxp/k32w1/K32W1Config.cpp rename to src/platform/nxp/mcxw71_k32w1/K32W1Config.cpp index 6f578f8ed01624..c4ac984244d6bd 100644 --- a/src/platform/nxp/k32w1/K32W1Config.cpp +++ b/src/platform/nxp/mcxw71_k32w1/K32W1Config.cpp @@ -25,7 +25,7 @@ /* this file behaves like a config.h, comes first */ #include -#include +#include #include #include diff --git a/src/platform/nxp/k32w1/K32W1Config.h b/src/platform/nxp/mcxw71_k32w1/K32W1Config.h similarity index 100% rename from src/platform/nxp/k32w1/K32W1Config.h rename to src/platform/nxp/mcxw71_k32w1/K32W1Config.h diff --git a/src/platform/nxp/k32w1/K32W1PersistentStorageOpKeystore.cpp b/src/platform/nxp/mcxw71_k32w1/K32W1PersistentStorageOpKeystore.cpp similarity index 100% rename from src/platform/nxp/k32w1/K32W1PersistentStorageOpKeystore.cpp rename to src/platform/nxp/mcxw71_k32w1/K32W1PersistentStorageOpKeystore.cpp diff --git a/src/platform/nxp/k32w1/K32W1PersistentStorageOpKeystore.h b/src/platform/nxp/mcxw71_k32w1/K32W1PersistentStorageOpKeystore.h similarity index 100% rename from src/platform/nxp/k32w1/K32W1PersistentStorageOpKeystore.h rename to src/platform/nxp/mcxw71_k32w1/K32W1PersistentStorageOpKeystore.h diff --git a/src/platform/nxp/k32w1/KeyValueStoreManagerImpl.cpp b/src/platform/nxp/mcxw71_k32w1/KeyValueStoreManagerImpl.cpp similarity index 99% rename from src/platform/nxp/k32w1/KeyValueStoreManagerImpl.cpp rename to src/platform/nxp/mcxw71_k32w1/KeyValueStoreManagerImpl.cpp index f70c6abb6c9e83..5b1d89de4e263e 100644 --- a/src/platform/nxp/k32w1/KeyValueStoreManagerImpl.cpp +++ b/src/platform/nxp/mcxw71_k32w1/KeyValueStoreManagerImpl.cpp @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include diff --git a/src/platform/nxp/k32w1/KeyValueStoreManagerImpl.h b/src/platform/nxp/mcxw71_k32w1/KeyValueStoreManagerImpl.h similarity index 100% rename from src/platform/nxp/k32w1/KeyValueStoreManagerImpl.h rename to src/platform/nxp/mcxw71_k32w1/KeyValueStoreManagerImpl.h diff --git a/src/platform/nxp/k32w1/Logging.cpp b/src/platform/nxp/mcxw71_k32w1/Logging.cpp similarity index 100% rename from src/platform/nxp/k32w1/Logging.cpp rename to src/platform/nxp/mcxw71_k32w1/Logging.cpp diff --git a/src/platform/nxp/k32w1/LowPowerHooks.cpp b/src/platform/nxp/mcxw71_k32w1/LowPowerHooks.cpp similarity index 100% rename from src/platform/nxp/k32w1/LowPowerHooks.cpp rename to src/platform/nxp/mcxw71_k32w1/LowPowerHooks.cpp diff --git a/src/platform/nxp/k32w1/OTAFirmwareProcessor.cpp b/src/platform/nxp/mcxw71_k32w1/OTAFirmwareProcessor.cpp similarity index 98% rename from src/platform/nxp/k32w1/OTAFirmwareProcessor.cpp rename to src/platform/nxp/mcxw71_k32w1/OTAFirmwareProcessor.cpp index 33eed513ba033c..2ea4d47cc655a1 100644 --- a/src/platform/nxp/k32w1/OTAFirmwareProcessor.cpp +++ b/src/platform/nxp/mcxw71_k32w1/OTAFirmwareProcessor.cpp @@ -18,7 +18,7 @@ #include #include -#include +#include #include "OtaSupport.h" diff --git a/src/platform/nxp/k32w1/OTAFirmwareProcessor.h b/src/platform/nxp/mcxw71_k32w1/OTAFirmwareProcessor.h similarity index 100% rename from src/platform/nxp/k32w1/OTAFirmwareProcessor.h rename to src/platform/nxp/mcxw71_k32w1/OTAFirmwareProcessor.h diff --git a/src/platform/nxp/k32w1/OTAHooks.cpp b/src/platform/nxp/mcxw71_k32w1/OTAHooks.cpp similarity index 97% rename from src/platform/nxp/k32w1/OTAHooks.cpp rename to src/platform/nxp/mcxw71_k32w1/OTAHooks.cpp index 3bbabaa274fba4..c476e705fd67be 100644 --- a/src/platform/nxp/k32w1/OTAHooks.cpp +++ b/src/platform/nxp/mcxw71_k32w1/OTAHooks.cpp @@ -21,10 +21,10 @@ #include -#include +#include #if CONFIG_CHIP_OTA_FACTORY_DATA_PROCESSOR #include -#include +#include #endif // CONFIG_CHIP_OTA_FACTORY_DATA_PROCESSOR #include "OtaSupport.h" diff --git a/src/platform/nxp/k32w1/PlatformManagerImpl.cpp b/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.cpp similarity index 96% rename from src/platform/nxp/k32w1/PlatformManagerImpl.cpp rename to src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.cpp index 964884e77523c6..9a52321e48fce8 100644 --- a/src/platform/nxp/k32w1/PlatformManagerImpl.cpp +++ b/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.cpp @@ -33,10 +33,10 @@ #ifdef EXTERNAL_CONFIGURATIONMANAGERIMPL_HEADER #include EXTERNAL_CONFIGURATIONMANAGERIMPL_HEADER #else -#include +#include #endif -#include -#include +#include +#include #if CHIP_SYSTEM_CONFIG_USE_LWIP #include diff --git a/src/platform/nxp/k32w1/PlatformManagerImpl.h b/src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.h similarity index 100% rename from src/platform/nxp/k32w1/PlatformManagerImpl.h rename to src/platform/nxp/mcxw71_k32w1/PlatformManagerImpl.h diff --git a/src/platform/nxp/k32w1/SMU2Manager.cpp b/src/platform/nxp/mcxw71_k32w1/SMU2Manager.cpp similarity index 100% rename from src/platform/nxp/k32w1/SMU2Manager.cpp rename to src/platform/nxp/mcxw71_k32w1/SMU2Manager.cpp diff --git a/src/platform/nxp/k32w1/SMU2Manager.h b/src/platform/nxp/mcxw71_k32w1/SMU2Manager.h similarity index 100% rename from src/platform/nxp/k32w1/SMU2Manager.h rename to src/platform/nxp/mcxw71_k32w1/SMU2Manager.h diff --git a/src/platform/nxp/k32w1/SystemPlatformConfig.h b/src/platform/nxp/mcxw71_k32w1/SystemPlatformConfig.h similarity index 100% rename from src/platform/nxp/k32w1/SystemPlatformConfig.h rename to src/platform/nxp/mcxw71_k32w1/SystemPlatformConfig.h diff --git a/src/platform/nxp/k32w1/SystemTimeSupport.cpp b/src/platform/nxp/mcxw71_k32w1/SystemTimeSupport.cpp similarity index 100% rename from src/platform/nxp/k32w1/SystemTimeSupport.cpp rename to src/platform/nxp/mcxw71_k32w1/SystemTimeSupport.cpp diff --git a/src/platform/nxp/k32w1/ThreadStackManagerImpl.cpp b/src/platform/nxp/mcxw71_k32w1/ThreadStackManagerImpl.cpp similarity index 98% rename from src/platform/nxp/k32w1/ThreadStackManagerImpl.cpp rename to src/platform/nxp/mcxw71_k32w1/ThreadStackManagerImpl.cpp index c7b16ffd3e5c6a..b85052bf993920 100644 --- a/src/platform/nxp/k32w1/ThreadStackManagerImpl.cpp +++ b/src/platform/nxp/mcxw71_k32w1/ThreadStackManagerImpl.cpp @@ -35,7 +35,7 @@ #include #if defined(USE_SMU2_DYNAMIC) -#include +#include #endif #include diff --git a/src/platform/nxp/k32w1/ThreadStackManagerImpl.h b/src/platform/nxp/mcxw71_k32w1/ThreadStackManagerImpl.h similarity index 100% rename from src/platform/nxp/k32w1/ThreadStackManagerImpl.h rename to src/platform/nxp/mcxw71_k32w1/ThreadStackManagerImpl.h diff --git a/src/platform/nxp/k32w1/args.gni b/src/platform/nxp/mcxw71_k32w1/args.gni similarity index 89% rename from src/platform/nxp/k32w1/args.gni rename to src/platform/nxp/mcxw71_k32w1/args.gni index 1c984c386ea086..68e1cdeeec672e 100644 --- a/src/platform/nxp/k32w1/args.gni +++ b/src/platform/nxp/mcxw71_k32w1/args.gni @@ -19,26 +19,18 @@ import("//build_overrides/openthread.gni") declare_args() { chip_with_ot_cli = 0 chip_with_low_power = 0 - sdk_release = false - k32w1_sdk_root = "" # The key storage solution. Developers can select between "littlefs", "nvs" # and the older "fwk_nvm". chip_key_storage = "nvs" chip_use_plain_dac_key = false - - k32w1_sdk_root = "${nxp_sdk_matter_support_root}/github_sdk/common_sdk/repo" -} - -if (sdk_release || getenv("NXP_SDK_ROOT") != "") { - k32w1_sdk_root = getenv("NXP_SDK_ROOT") } openthread_root = "//third_party/connectedhomeip/third_party/openthread/ot-nxp/openthread" -nxp_platform = "k32w1" -nxp_sdk_name = "k32w1_sdk" +nxp_platform = "mcxw71_k32w1" +nxp_sdk_name = "mcxw71_k32w1_sdk" nxp_device_layer = "nxp/${nxp_platform}" nxp_use_lwip = false diff --git a/src/platform/nxp/k32w1/ble_function_mux.c b/src/platform/nxp/mcxw71_k32w1/ble_function_mux.c similarity index 100% rename from src/platform/nxp/k32w1/ble_function_mux.c rename to src/platform/nxp/mcxw71_k32w1/ble_function_mux.c diff --git a/src/platform/nxp/k32w1/ble_function_mux.h b/src/platform/nxp/mcxw71_k32w1/ble_function_mux.h similarity index 100% rename from src/platform/nxp/k32w1/ble_function_mux.h rename to src/platform/nxp/mcxw71_k32w1/ble_function_mux.h diff --git a/src/platform/nxp/k32w1/gatt_db.h b/src/platform/nxp/mcxw71_k32w1/gatt_db.h similarity index 100% rename from src/platform/nxp/k32w1/gatt_db.h rename to src/platform/nxp/mcxw71_k32w1/gatt_db.h diff --git a/src/platform/nxp/k32w1/gatt_uuid128.h b/src/platform/nxp/mcxw71_k32w1/gatt_uuid128.h similarity index 100% rename from src/platform/nxp/k32w1/gatt_uuid128.h rename to src/platform/nxp/mcxw71_k32w1/gatt_uuid128.h diff --git a/src/platform/nxp/k32w1/k32w1-chip-mbedtls-config.h b/src/platform/nxp/mcxw71_k32w1/k32w1-chip-mbedtls-config.h similarity index 100% rename from src/platform/nxp/k32w1/k32w1-chip-mbedtls-config.h rename to src/platform/nxp/mcxw71_k32w1/k32w1-chip-mbedtls-config.h diff --git a/src/platform/nxp/k32w1/ram_storage.c b/src/platform/nxp/mcxw71_k32w1/ram_storage.c similarity index 100% rename from src/platform/nxp/k32w1/ram_storage.c rename to src/platform/nxp/mcxw71_k32w1/ram_storage.c diff --git a/src/platform/nxp/k32w1/ram_storage.h b/src/platform/nxp/mcxw71_k32w1/ram_storage.h similarity index 100% rename from src/platform/nxp/k32w1/ram_storage.h rename to src/platform/nxp/mcxw71_k32w1/ram_storage.h diff --git a/src/platform/nxp/rt/rw61x/BUILD.gn b/src/platform/nxp/rt/rw61x/BUILD.gn index 1793b50884dd30..447ef2905bb300 100644 --- a/src/platform/nxp/rt/rw61x/BUILD.gn +++ b/src/platform/nxp/rt/rw61x/BUILD.gn @@ -13,11 +13,17 @@ # See the License for the specific language governing permissions and # limitations under the License. +import("//build_overrides/build.gni") import("//build_overrides/chip.gni") import("//build_overrides/nxp_sdk.gni") import("//build_overrides/openthread.gni") import("${chip_root}/src/platform/device.gni") -import("${nxp_sdk_build_root}/${nxp_sdk_name}/${nxp_sdk_name}.gni") + +# If external SDK is used, do not import ${nxp_sdk_name}.gni +if (!nxp_external_sdk) { + import("${nxp_sdk_build_root}/${nxp_sdk_name}/${nxp_sdk_name}.gni") +} + import("${nxp_sdk_build_root}/nxp_sdk.gni") assert(chip_device_platform == "nxp") @@ -43,8 +49,16 @@ config("nxp_platform_config") { "CONFIG_CHIP_ENCRYPTED_FACTORY_DATA=1", ] - if (chip_enable_secure_dac_private_key_storage == 1) { + if (chip_enable_secure_dac_private_key_storage) { + assert(chip_enable_secure_dac_private_key_storage && + !chip_enable_secure_whole_factory_data, + "please select only one protection solution") defines += [ "EXTERNAL_FACTORY_DATA_PROVIDER_IMPL_HEADER=\"platform/nxp/rt/rw61x/FactoryDataProviderImpl.h\"" ] + } else if (chip_enable_secure_whole_factory_data) { + assert(chip_enable_secure_whole_factory_data && + !chip_enable_secure_dac_private_key_storage, + "please select only one protection solution") + defines += [ "EXTERNAL_FACTORY_DATA_PROVIDER_IMPL_HEADER=\"platform/nxp/rt/rw61x/FactoryDataProviderEncImpl.h\"" ] } else { defines += [ "EXTERNAL_FACTORY_DATA_PROVIDER_IMPL_HEADER=\"platform/nxp/common/factory_data/FactoryDataProviderFwkImpl.h\"" ] } @@ -56,6 +70,11 @@ config("nxp_platform_config") { } static_library("nxp_platform") { + output_name = "libCHIP_NXP_Port_RW61x" + cflags = [ + "-Wno-conversion", + "-Wno-sign-compare", + ] deps = [] defines = [] sources = [ @@ -78,20 +97,22 @@ static_library("nxp_platform") { "PlatformManagerImpl.cpp", ] - if (rt_nvm_component == "nvm_fwk" || rt_nvm_component == "littlefs") { + if (nxp_nvm_component == "nvm_fwk" || nxp_nvm_component == "littlefs") { sources += [ "../../common/NXPConfig.cpp", "../../common/ram_storage.c", "../../common/ram_storage.h", ] - } else if (rt_nvm_component == "key_storage") { + } else if (nxp_nvm_component == "key_storage") { sources += [ "../../common/NXPConfigKS.cpp" ] + } else if (nxp_nvm_component == "nvs") { + sources += [ "../../common/NXPConfigNVS.cpp" ] } if (chip_enable_ble) { sources += [ # Adding random file which defines the function sys_csrand_get which is called by BLEManagerImpl from Zephyr - "${nxp_sdk_build_root}/${nxp_sdk_name}/sdk_hook/zephyr/random/random.cpp", + "${nxp_sdk_build_root}/rt_sdk/sdk_hook/zephyr/random/random.cpp", "../../common/ble_zephyr/BLEAdvertisingArbiter.cpp", "../../common/ble_zephyr/BLEManagerImpl.cpp", "../../common/ble_zephyr/BLEManagerImpl.h", @@ -100,14 +121,17 @@ static_library("nxp_platform") { public_deps = [ "${chip_root}/src/platform:platform_base" ] - deps += [ "${chip_root}/src/platform/logging:headers" ] + deps += [ + "${chip_root}/src/lib/dnssd:constants", + "${chip_root}/src/platform/logging:headers", + ] # define CHIP_PLAT_NVM_SUPPORT - See NXPConfig.cpp for definition - if (rt_nvm_component == "nvm_fwk") { + if (nxp_nvm_component == "nvm_fwk") { defines += [ "CHIP_PLAT_NVM_SUPPORT=1" ] - } else if (rt_nvm_component == "littlefs") { + } else if (nxp_nvm_component == "littlefs") { defines += [ "CHIP_PLAT_NVM_SUPPORT=2" ] - } else if (rt_nvm_component == "key_storage") { + } else if (nxp_nvm_component == "key_storage") { defines += [ "CHIP_PLAT_NVM_SUPPORT=3" ] } @@ -157,14 +181,16 @@ static_library("nxp_platform") { "../../common/factory_data/FactoryDataProvider.cpp", "../../common/factory_data/FactoryDataProvider.h", ] - if (chip_enable_secure_dac_private_key_storage == 1) { + if (chip_enable_secure_dac_private_key_storage) { sources += [ - # TO BE MOVED TO THE SDK - "ELSFactoryData.c", - "ELSFactoryData.h", "FactoryDataProviderImpl.cpp", "FactoryDataProviderImpl.h", ] + } else if (chip_enable_secure_whole_factory_data) { + sources += [ + "FactoryDataProviderEncImpl.cpp", + "FactoryDataProviderEncImpl.h", + ] } else { sources += [ "../../common/factory_data/FactoryDataProviderFwkImpl.cpp", @@ -175,10 +201,6 @@ static_library("nxp_platform") { deps += [ "${chip_root}/src/credentials:credentials_header" ] } - if (chip_convert_dac_private_key == 1) { - defines += [ "CHIP_DEVICE_CONFIG_SECURE_DAC_PRIVATE_KEY=1" ] - } - deps += [ "${nxp_sdk_build_root}:nxp_sdk" ] public_deps += [ diff --git a/src/platform/nxp/rt/rw61x/CHIPPlatformConfig.h b/src/platform/nxp/rt/rw61x/CHIPPlatformConfig.h index caa7e32a9e3000..45b080fe52e9b3 100644 --- a/src/platform/nxp/rt/rw61x/CHIPPlatformConfig.h +++ b/src/platform/nxp/rt/rw61x/CHIPPlatformConfig.h @@ -35,7 +35,7 @@ /* In src/crypto/CHIPCryptoPALmbedTLS.cpp we verify kMAX_Hash_SHA256_Context_Size >= sizeof(mbedtls_sha256_context) * sizeof(mbedtls_sha256_context) is 392 bytes with els_pkc mbedtls port */ -#define CHIP_CONFIG_SHA256_CONTEXT_SIZE (sizeof(unsigned int) * 98) +#define CHIP_CONFIG_SHA256_CONTEXT_SIZE (sizeof(unsigned int) * 120) // ==================== Security Adaptations ==================== diff --git a/src/platform/nxp/rt/rw61x/ELSFactoryData.c b/src/platform/nxp/rt/rw61x/ELSFactoryData.c deleted file mode 100644 index a440c42569ffbd..00000000000000 --- a/src/platform/nxp/rt/rw61x/ELSFactoryData.c +++ /dev/null @@ -1,453 +0,0 @@ -/* - * Copyright 2023 NXP - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#include "ELSFactoryData.h" - -uint8_t * append_u32(uint8_t * pos, uint32_t val) -{ - *pos++ = 4; - *pos++ = (val >> 24) & 0xFF; - *pos++ = (val >> 16) & 0xFF; - *pos++ = (val >> 8) & 0xFF; - *pos++ = val & 0xFF; - return pos; -} - -uint8_t * append_u16(uint8_t * pos, uint32_t val) -{ - *pos++ = 2; - *pos++ = (val >> 8) & 0xFF; - *pos++ = val & 0xFF; - return pos; -} - -void write_uint32_msb_first(uint8_t * pos, uint32_t data) -{ - pos[0] = ((data) >> 24) & 0xFF; - pos[1] = ((data) >> 16) & 0xFF; - pos[2] = ((data) >> 8) & 0xFF; - pos[3] = ((data) >> 0) & 0xFF; -} - -void printf_buffer(const char * name, const unsigned char * buffer, size_t size) -{ -#define PP_BYTES_PER_LINE (32) - char line_buffer[PP_BYTES_PER_LINE * 2 + 2]; - const unsigned char * pos = buffer; - size_t remaining = size; - while (remaining > 0) - { - size_t block_size = remaining > PP_BYTES_PER_LINE ? PP_BYTES_PER_LINE : remaining; - uint32_t len = 0; - for (size_t i = 0; i < block_size; i++) - { - line_buffer[len++] = nibble_to_char[((*pos) & 0xf0) >> 4]; - line_buffer[len++] = nibble_to_char[(*pos++) & 0x0f]; - } - line_buffer[len++] = '\n'; - line_buffer[len++] = '\0'; - PRINTF("%s (%p): %s", name, pos, line_buffer); - remaining -= block_size; - } -} - -uint32_t get_required_keyslots(mcuxClEls_KeyProp_t prop) -{ - return prop.bits.ksize == MCUXCLELS_KEYPROPERTY_KEY_SIZE_128 ? 1U : 2U; -} - -bool els_is_active_keyslot(mcuxClEls_KeyIndex_t keyIdx) -{ - mcuxClEls_KeyProp_t key_properties; - key_properties.word.value = ((const volatile uint32_t *) (&ELS->ELS_KS0))[keyIdx]; - return key_properties.bits.kactv; -} - -status_t els_enable() -{ - PLOG_INFO("Enabling ELS..."); - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, mcuxClEls_Enable_Async()); - - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_Enable_Async) != token) || (MCUXCLELS_STATUS_OK_WAIT != result)) - { - PLOG_ERROR("mcuxClEls_Enable_Async failed: 0x%08x", result); - return STATUS_ERROR_GENERIC; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, mcuxClEls_WaitForOperation(MCUXCLELS_ERROR_FLAGS_CLEAR)); - - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_WaitForOperation) != token) || (MCUXCLELS_STATUS_OK != result)) - { - PLOG_ERROR("mcuxClEls_WaitForOperation failed: 0x%08x", result); - return STATUS_ERROR_GENERIC; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - return STATUS_SUCCESS; -} - -status_t els_get_key_properties(mcuxClEls_KeyIndex_t key_index, mcuxClEls_KeyProp_t * key_properties) -{ - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, mcuxClEls_GetKeyProperties(key_index, key_properties)); - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_GetKeyProperties) != token) || (MCUXCLELS_STATUS_OK != result)) - { - PLOG_ERROR("mcuxClEls_GetKeyProperties failed: 0x%08lx", result); - return STATUS_ERROR_GENERIC; - } - - MCUX_CSSL_FP_FUNCTION_CALL_END(); - return STATUS_SUCCESS; -} - -mcuxClEls_KeyIndex_t els_get_free_keyslot(uint32_t required_keyslots) -{ - for (mcuxClEls_KeyIndex_t keyIdx = 0U; keyIdx <= (MCUXCLELS_KEY_SLOTS - required_keyslots); keyIdx++) - { - bool is_valid_keyslot = true; - for (uint32_t i = 0U; i < required_keyslots; i++) - { - if (els_is_active_keyslot(keyIdx + i)) - { - is_valid_keyslot = false; - break; - } - } - - if (is_valid_keyslot) - { - return keyIdx; - } - } - return MCUXCLELS_KEY_SLOTS; -} - -status_t els_derive_key(mcuxClEls_KeyIndex_t src_key_index, mcuxClEls_KeyProp_t key_prop, const uint8_t * dd, - mcuxClEls_KeyIndex_t * dst_key_index) -{ - uint32_t required_keyslots = get_required_keyslots(key_prop); - - *dst_key_index = els_get_free_keyslot(required_keyslots); - - if (!(*dst_key_index < MCUXCLELS_KEY_SLOTS)) - { - PLOG_ERROR("no free keyslot found"); - return STATUS_ERROR_GENERIC; - } - - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, mcuxClEls_Ckdf_Sp800108_Async(src_key_index, *dst_key_index, key_prop, dd)); - - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_Ckdf_Sp800108_Async) != token) || (MCUXCLELS_STATUS_OK_WAIT != result)) - { - PLOG_ERROR("mcuxClEls_Ckdf_Sp800108_Async failed: 0x%08x", result); - return STATUS_ERROR_GENERIC; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, mcuxClEls_WaitForOperation(MCUXCLELS_ERROR_FLAGS_CLEAR)); - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_WaitForOperation) != token) || (MCUXCLELS_STATUS_OK != result)) - { - PLOG_ERROR("mcuxClEls_WaitForOperation failed: 0x%08x", result); - return STATUS_ERROR_GENERIC; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - return STATUS_SUCCESS; -} - -status_t els_delete_key(mcuxClEls_KeyIndex_t key_index) -{ - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, mcuxClEls_KeyDelete_Async(key_index)); - - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_KeyDelete_Async) != token) || (MCUXCLELS_STATUS_OK_WAIT != result)) - { - PLOG_ERROR("mcuxClEls_KeyDelete_Async failed: 0x%08x", result); - return STATUS_ERROR_GENERIC; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, mcuxClEls_WaitForOperation(MCUXCLELS_ERROR_FLAGS_CLEAR)); - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_WaitForOperation) != token) || (MCUXCLELS_STATUS_OK != result)) - { - PLOG_ERROR("mcuxClEls_WaitForOperation failed: 0x%08x", result); - return STATUS_ERROR_GENERIC; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - return STATUS_SUCCESS; -} - -status_t els_import_key(const uint8_t * wrapped_key, size_t wrapped_key_size, mcuxClEls_KeyProp_t key_prop, - mcuxClEls_KeyIndex_t unwrap_key_index, mcuxClEls_KeyIndex_t * dst_key_index) -{ - uint32_t required_keyslots = get_required_keyslots(key_prop); - *dst_key_index = els_get_free_keyslot(required_keyslots); - - if (!(*dst_key_index < MCUXCLELS_KEY_SLOTS)) - { - PLOG_ERROR("no free keyslot found"); - return STATUS_ERROR_GENERIC; - } - - mcuxClEls_KeyImportOption_t options; - options.bits.kfmt = MCUXCLELS_KEYIMPORT_KFMT_RFC3394; - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN( - result, token, mcuxClEls_KeyImport_Async(options, wrapped_key, wrapped_key_size, unwrap_key_index, *dst_key_index)); - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_KeyImport_Async) != token) || (MCUXCLELS_STATUS_OK_WAIT != result)) - { - PLOG_ERROR("mcuxClEls_KeyImport_Async failed: 0x%08lx", result); - return STATUS_ERROR_GENERIC; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, mcuxClEls_WaitForOperation(MCUXCLELS_ERROR_FLAGS_CLEAR)); - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_WaitForOperation) != token) || (MCUXCLELS_STATUS_OK != result)) - { - PLOG_ERROR("mcuxClEls_WaitForOperation failed: 0x%08lx", result); - return STATUS_ERROR_GENERIC; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - return STATUS_SUCCESS; -} - -status_t els_keygen(mcuxClEls_KeyIndex_t key_index, uint8_t * public_key, size_t * public_key_size) -{ - status_t status = STATUS_SUCCESS; - - mcuxClEls_EccKeyGenOption_t key_gen_options; - key_gen_options.word.value = 0u; - key_gen_options.bits.kgsign = MCUXCLELS_ECC_PUBLICKEY_SIGN_DISABLE; - key_gen_options.bits.kgsrc = MCUXCLELS_ECC_OUTPUTKEY_DETERMINISTIC; - key_gen_options.bits.skip_pbk = MCUXCLELS_ECC_GEN_PUBLIC_KEY; - - mcuxClEls_KeyProp_t key_properties; - status = els_get_key_properties(key_index, &key_properties); - STATUS_SUCCESS_OR_EXIT_MSG("get_key_properties failed: 0x%08x", status); - - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN( - result, token, - mcuxClEls_EccKeyGen_Async(key_gen_options, (mcuxClEls_KeyIndex_t) 0, key_index, key_properties, NULL, &public_key[0])); - - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_EccKeyGen_Async) != token) || (MCUXCLELS_STATUS_OK_WAIT != result)) - { - PRINTF("Css_EccKeyGen_Async failed: 0x%08lx\r\n", result); - return STATUS_ERROR_GENERIC; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, mcuxClEls_WaitForOperation(MCUXCLELS_ERROR_FLAGS_CLEAR)); - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_WaitForOperation) != token) || (MCUXCLELS_STATUS_OK != result)) - { - PRINTF("Css_EccKeyGen_Async WaitForOperation failed: 0x%08lx\r\n", result); - return STATUS_ERROR_GENERIC; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); -exit: - return status; -} - -status_t calculate_psa_import_blob_cmac(uint8_t * psa_import_blob, size_t psa_import_blob_length_before_mac, - size_t psa_import_blob_size) -{ - status_t status = STATUS_SUCCESS; - mcuxClEls_KeyIndex_t mac_key_index = MCUXCLELS_KEY_SLOTS; - - assert(psa_import_blob_size >= psa_import_blob_length_before_mac + AES_BLOCK_SIZE); - - uint8_t * pos = &psa_import_blob[psa_import_blob_length_before_mac]; - uint8_t mac[AES_BLOCK_SIZE] = { 0 }; - uint32_t missing_bytes_to_fill_block = AES_BLOCK_SIZE - (psa_import_blob_length_before_mac % AES_BLOCK_SIZE); - - mcuxClEls_CmacOption_t cmac_options = { 0U }; - cmac_options.bits.initialize = MCUXCLELS_CMAC_INITIALIZE_ENABLE; - cmac_options.bits.finalize = MCUXCLELS_CMAC_FINALIZE_ENABLE; - cmac_options.bits.extkey = MCUXCLELS_CMAC_EXTERNAL_KEY_DISABLE; - // ELS needs us to pad the message, it does not do that itself :-( - if (missing_bytes_to_fill_block != 0) - { - memset(pos, 0, missing_bytes_to_fill_block); - *pos = 0x80; - } - - PLOG_INFO("Deriving cmac key for integrity protection on key blob..."); - status = els_derive_key(DIE_INT_MK_SK_INDEX, mac_key_prop, ckdf_derivation_data_mac, &mac_key_index); - STATUS_SUCCESS_OR_EXIT_MSG("derive_key failed: 0x%08x", status); - - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN( - result, token, - mcuxClEls_Cmac_Async(cmac_options, mac_key_index, NULL, 0, psa_import_blob, psa_import_blob_length_before_mac, mac)); - - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_Cmac_Async) != token) || (MCUXCLELS_STATUS_OK_WAIT != result)) - { - PLOG_ERROR("mcuxClEls_Cmac_Async failed: 0x%08x", result); - return STATUS_ERROR_GENERIC; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, mcuxClEls_WaitForOperation(MCUXCLELS_ERROR_FLAGS_CLEAR)); - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_WaitForOperation) != token) || (MCUXCLELS_STATUS_OK != result)) - { - PLOG_ERROR("mcuxClEls_WaitForOperation failed: 0x%08x\n", result); - return STATUS_ERROR_GENERIC; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - - status = els_delete_key(mac_key_index); - STATUS_SUCCESS_OR_EXIT_MSG("delete_key failed: 0x%08x", status); - - memcpy(pos, mac, sizeof(mac)); -exit: - return status; -} - -status_t create_psa_import_blob(const uint8_t * els_key_blob, size_t els_key_blob_size, const psa_key_attributes_t * attributes, - uint8_t * output, size_t * output_size) -{ - assert(els_key_blob_size <= 48); - assert(sizeof(key_blob_magic) < 0x80); - - status_t status = STATUS_SUCCESS; - // clang-format off - size_t required_output_size = 0 - + 2 + sizeof(key_blob_magic) - + 2 + 4 // key_id - + 2 + 4 // algorithms - + 2 + 4 // usage - + 2 + 2 // type - + 2 + 4 // bits - + 2 + 4 // lifetime - + 2 + 4 // device lifecycle - + 2 + 4 // wrapping key id - + 2 + 4 // wrapping algorithm - + 2 + 4 // signing key id - + 2 + 4 // signing algorithm - + 2 + els_key_blob_size // key blob from S50 - + 2 + AES_BLOCK_SIZE; // CMAC - // clang-format on - - if (*output_size < required_output_size) - { - PLOG_ERROR("key blob buffer too small"); - return STATUS_ERROR_GENERIC; - } - *output_size = required_output_size; - - uint32_t key_id = psa_get_key_id(attributes); - uint32_t key_alg = psa_get_key_algorithm(attributes); - uint32_t key_usage = psa_get_key_usage_flags(attributes); - uint16_t key_type = psa_get_key_type(attributes); - uint32_t key_bits = psa_get_key_bits(attributes); - uint32_t key_lifetime = psa_get_key_lifetime(attributes); - uint32_t device_lifecycle = 0x1; // 0x01: OPEN, 0x02: CLOSED, 0x04: CLOSED_LOCKED - uint32_t wrapping_key_id = NXP_DIE_INT_IMPORT_KEK_SK; - uint32_t signing_key_id = NXP_DIE_INT_IMPORT_AUTH_SK; - - PLOG_INFO("Creating key blob..."); - uint8_t * pos = output; - - *pos++ = 0x40; - *pos++ = sizeof(key_blob_magic); - memcpy(pos, key_blob_magic, sizeof(key_blob_magic)); - pos += sizeof(key_blob_magic); - - *pos++ = 0x41; - pos = append_u32(pos, key_id); - - *pos++ = 0x42; - pos = append_u32(pos, key_alg); - - *pos++ = 0x43; - pos = append_u32(pos, key_usage); - - *pos++ = 0x44; - pos = append_u16(pos, key_type); - - *pos++ = 0x45; - pos = append_u32(pos, key_bits); - - *pos++ = 0x46; - pos = append_u32(pos, key_lifetime); - - *pos++ = 0x47; - pos = append_u32(pos, device_lifecycle); - - *pos++ = 0x50; - pos = append_u32(pos, wrapping_key_id); - - *pos++ = 0x51; - pos = append_u32(pos, 0x01); // ELS RFC3394 wrapping - - *pos++ = 0x53; - pos = append_u32(pos, signing_key_id); - - *pos++ = 0x54; - pos = append_u32(pos, 0x01); // CMAC - - *pos++ = 0x55; - *pos++ = els_key_blob_size; - memcpy(pos, els_key_blob, els_key_blob_size); - pos += els_key_blob_size; - - // signature - *pos++ = 0x5E; - *pos++ = AES_BLOCK_SIZE; - size_t psa_import_blob_length_before_mac = pos - output; - - status = calculate_psa_import_blob_cmac(output, psa_import_blob_length_before_mac, *output_size); - return status; -} - -status_t import_die_int_wrapped_key_into_els(const uint8_t * wrapped_key, size_t wrapped_key_size, - mcuxClEls_KeyProp_t key_properties, mcuxClEls_KeyIndex_t * index_output) -{ - status_t status = STATUS_SUCCESS; - mcuxClEls_KeyIndex_t index_unwrap = MCUXCLELS_KEY_SLOTS; - - PLOG_INFO("Deriving wrapping key for import of die_int wrapped key on ELS..."); - status = els_derive_key(DIE_INT_MK_SK_INDEX, wrap_out_key_prop, ckdf_derivation_data_wrap_out, &index_unwrap); - STATUS_SUCCESS_OR_EXIT_MSG("derive_key failed: 0x%08x", status); - - status = els_import_key(wrapped_key, wrapped_key_size, key_properties, index_unwrap, index_output); - STATUS_SUCCESS_OR_EXIT_MSG("import_wrapped_key failed: 0x%08x", status); - - status = els_delete_key(index_unwrap); - STATUS_SUCCESS_OR_EXIT_MSG("delete_key failed: 0x%08x", status); - index_unwrap = MCUXCLELS_KEY_SLOTS; - -exit: - if (index_unwrap < MCUXCLELS_KEY_SLOTS) - { - (void) els_delete_key(index_unwrap); - } - return status; -} - -status_t ELS_sign_hash(uint8_t * digest, mcuxClEls_EccByte_t * ecc_signature, mcuxClEls_EccSignOption_t * sign_options, - mcuxClEls_KeyIndex_t key_index) -{ - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, - mcuxClEls_EccSign_Async( // Perform signature generation. - *sign_options, // Set the prepared configuration. - key_index, // Set index of private key in keystore. - digest, NULL, (size_t) 0U, // Pre-hashed data to sign. Note that inputLength parameter is - // ignored since pre-hashed data has a fixed length. - ecc_signature // Output buffer, which the operation will write the signature to. - )); - PLOG_DEBUG_BUFFER("mcuxClEls_EccSign_Async ecc_signature", ecc_signature, MCUXCLELS_ECC_SIGNATURE_SIZE); - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_EccSign_Async) != token) || (MCUXCLELS_STATUS_OK_WAIT != result)) - { - PLOG_ERROR("mcuxClEls_EccSign_Async failed. token: 0x%08x, result: 0x%08x", token, result); - return STATUS_ERROR_GENERIC; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, mcuxClEls_WaitForOperation(MCUXCLELS_ERROR_FLAGS_CLEAR)); - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_WaitForOperation) != token) || (MCUXCLELS_STATUS_OK != result)) - { - PLOG_ERROR("mcuxClEls_WaitForOperation failed. token: 0x%08x, result: 0x%08x", token, result); - return STATUS_ERROR_GENERIC; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - return STATUS_SUCCESS; -} diff --git a/src/platform/nxp/rt/rw61x/ELSFactoryData.h b/src/platform/nxp/rt/rw61x/ELSFactoryData.h deleted file mode 100644 index 0ac259a66a4158..00000000000000 --- a/src/platform/nxp/rt/rw61x/ELSFactoryData.h +++ /dev/null @@ -1,247 +0,0 @@ -/* - * Copyright 2023 NXP - * All rights reserved. - * - * SPDX-License-Identifier: BSD-3-Clause - */ - -#ifndef __ELS_FACTORY_DATA_H__ -#define __ELS_FACTORY_DATA_H__ - -#include -#include - -#include "fsl_common.h" -#include "mbedtls/bignum.h" -#include "mbedtls/ecp.h" -#include "mcuxClAes.h" -#include "mcuxClEls_Cipher.h" -#include "mcuxClEls_Cmac.h" -#include "mcuxClEls_Ecc.h" -#include "mcuxClEls_Hash.h" -#include "mcuxClEls_Kdf.h" -#include "mcuxClEls_KeyManagement.h" -#include "mcuxClEls_Rng.h" -#include "mcuxClEls_Types.h" -#include "mcuxClHash_Constants.h" - -#include "psa/crypto.h" -#include "psa/crypto_values.h" - -#include "mbedtls/ecdh.h" -#include "mbedtls/entropy.h" -#include "mbedtls/nist_kw.h" - -#define BLOCK_SIZE_16_BYTES 16 -#define SHA256_OUTPUT_SIZE 32 -#define HASH_ID 0xCE47BA5E -#define HASH_LEN 4 -#define CBC_INITIAL_VECTOR_SIZE 16 - -#define STATUS_SUCCESS 0 -#define STATUS_ERROR_GENERIC 1 - -#define AES_BLOCK_SIZE 16U -#define DIE_INT_MK_SK_INDEX 0U - -#define ELS_BLOB_METADATA_SIZE 8 -#define MAX_ELS_KEY_SIZE 32 -#define ELS_WRAP_OVERHEAD 8 - -#if FACTORY_DATA_PROVIDER_LOG -#define PLOG_ERROR(...) \ - for (;;) \ - { \ - PRINTF("ERROR "); \ - PRINTF(__VA_ARGS__); \ - PRINTF(" (%s:%d)\n", __FILE__, __LINE__); \ - break; \ - } -#else -#define PLOG_ERROR(...) -#endif - -#if FACTORY_DATA_PROVIDER_LOG -#define PLOG_INFO(...) \ - for (;;) \ - { \ - PRINTF("INFO "); \ - PRINTF(__VA_ARGS__); \ - PRINTF("\n"); \ - break; \ - } -#else -#define PLOG_INFO(...) -#endif - -#if FACTORY_DATA_PROVIDER_LOG -#define PLOG_DEBUG(...) \ - for (;;) \ - { \ - PRINTF("DEBUG "); \ - PRINTF(__VA_ARGS__); \ - PRINTF("\n"); \ - break; \ - } -#else -#define PLOG_DEBUG(...) -#endif - -#if FACTORY_DATA_PROVIDER_LOG -#define PLOG_DEBUG_BUFFER(...) printf_buffer(__VA_ARGS__) -#else -#define PLOG_DEBUG_BUFFER(...) -#endif - -#define RET_MBEDTLS_SUCCESS_OR_EXIT_MSG(MSG, ...) \ - if (0 != ret) \ - { \ - status = STATUS_ERROR_GENERIC; \ - PLOG_ERROR(MSG, __VA_ARGS__); \ - goto exit; \ - } - -#define STATUS_SUCCESS_OR_EXIT_MSG(MSG, ...) \ - if (STATUS_SUCCESS != status) \ - { \ - PLOG_ERROR(MSG, __VA_ARGS__); \ - goto exit; \ - } - -// common flags -#define PSA_KEY_LOCATION_NXP_FLAG 0x400000U -#define PSA_KEY_LOCATION_EL2GO_FLAG 0x200000U -#define PSA_KEY_LOCATION_S50_FLAG 0x000001U -#define PSA_KEY_LOCATION_COMMON_FLAG \ - (PSA_KEY_LOCATION_VENDOR_FLAG | PSA_KEY_LOCATION_NXP_FLAG | PSA_KEY_LOCATION_EL2GO_FLAG | PSA_KEY_LOCATION_S50_FLAG) - -// key/data -#define PSA_KEY_LOCATION_KEY_FLAG 0x000000 -#define PSA_KEY_LOCATION_DATA_FLAG 0x008000 - -// blob/encrypted -#define PSA_KEY_LOCATION_BLOB_STORAGE_FLAG 0x000000 -#define PSA_KEY_LOCATION_ENC_STORAGE_FLAG 0x000100 -#define PSA_KEY_LOCATION_TEMP_STORAGE_FLAG 0x000200 -#define PSA_KEY_LOCATION_KEY_GEN_STORAGE_FLAG 0x000300 - -#define PSA_KEY_LOCATION_S50_BLOB_STORAGE \ - ((PSA_KEY_LOCATION_COMMON_FLAG | PSA_KEY_LOCATION_BLOB_STORAGE_FLAG | PSA_KEY_LOCATION_KEY_FLAG)) -#define MCUXCLPSADRIVER_IS_S50_BLOB_STORAGE(location) ((location) == PSA_KEY_LOCATION_S50_BLOB_STORAGE) -#define PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(persistence, location) ((location) << 8 | (persistence)) - -#define NXP_DIE_INT_IMPORT_KEK_SK 0x7FFF817CU -#define NXP_DIE_INT_IMPORT_AUTH_SK 0x7FFF817EU - -const mcuxClEls_KeyProp_t keypair_prop = { .bits = { - .ksize = MCUXCLELS_KEYPROPERTY_KEY_SIZE_256, - .upprot_priv = MCUXCLELS_KEYPROPERTY_PRIVILEGED_TRUE, - .upprot_sec = MCUXCLELS_KEYPROPERTY_SECURE_TRUE, - - } }; - -const mcuxClEls_KeyProp_t shared_secret_prop = { - .bits = - { - .ksize = MCUXCLELS_KEYPROPERTY_KEY_SIZE_128, - .uckdf = MCUXCLELS_KEYPROPERTY_CKDF_TRUE, - .upprot_priv = MCUXCLELS_KEYPROPERTY_PRIVILEGED_TRUE, - .upprot_sec = MCUXCLELS_KEYPROPERTY_SECURE_TRUE, - - - }, -}; - -const mcuxClEls_KeyProp_t wrap_in_key_prop = { - .bits = - { - .ksize = MCUXCLELS_KEYPROPERTY_KEY_SIZE_128, - .kactv = MCUXCLELS_KEYPROPERTY_ACTIVE_TRUE, - .ukuok = MCUXCLELS_KEYPROPERTY_KUOK_TRUE, - .upprot_priv = MCUXCLELS_KEYPROPERTY_PRIVILEGED_TRUE, - .upprot_sec = MCUXCLELS_KEYPROPERTY_SECURE_TRUE, - - }, -}; - -const uint8_t ckdf_derivation_data_wrap_in[12] = { - 0xc8, 0xac, 0x48, 0x88, 0xa6, 0x1b, 0x3d, 0x9b, 0x56, 0xa9, 0x75, 0xe7, -}; - -const mcuxClEls_KeyProp_t wrap_out_key_prop = { - .bits = - { - .ksize = MCUXCLELS_KEYPROPERTY_KEY_SIZE_256, - .kactv = MCUXCLELS_KEYPROPERTY_ACTIVE_TRUE, - .ukwk = MCUXCLELS_KEYPROPERTY_KWK_TRUE, - .upprot_priv = MCUXCLELS_KEYPROPERTY_PRIVILEGED_TRUE, - .upprot_sec = MCUXCLELS_KEYPROPERTY_SECURE_TRUE, - - - }, -}; - -const uint8_t ckdf_derivation_data_wrap_out[12] = { - 0x4e, 0x5f, 0x0a, 0x1c, 0x43, 0x37, 0x2c, 0xd0, 0x54, 0x8e, 0x46, 0xc9, -}; - -const mcuxClEls_KeyProp_t mac_key_prop = { - .bits = - { - .ksize = MCUXCLELS_KEYPROPERTY_KEY_SIZE_256, - .kactv = MCUXCLELS_KEYPROPERTY_ACTIVE_TRUE, - .ucmac = MCUXCLELS_KEYPROPERTY_CMAC_TRUE, - .upprot_priv = MCUXCLELS_KEYPROPERTY_PRIVILEGED_TRUE, - .upprot_sec = MCUXCLELS_KEYPROPERTY_SECURE_TRUE, - }, -}; - -const uint8_t ckdf_derivation_data_mac[12] = { - 0xea, 0x93, 0x05, 0x7a, 0x50, 0xb6, 0x4d, 0x58, 0x0a, 0xe6, 0x6b, 0x57, -}; - -const uint8_t import_die_int_ecdh_sk[32] = { - 0x82, 0x9b, 0xb4, 0x4a, 0x3b, 0x6d, 0x73, 0x35, 0x09, 0x5e, 0xd9, 0x8d, 0xf6, 0x09, 0x89, 0x98, - 0xac, 0x63, 0xab, 0x4e, 0x4e, 0x78, 0xf6, 0x0a, 0x70, 0xea, 0x64, 0x92, 0xd4, 0xfc, 0xe4, 0x92, -}; - -const uint8_t import_die_int_ecdh_pk[64] = { - 0x8c, 0xe2, 0x3a, 0x89, 0xe7, 0xc5, 0xe9, 0xb1, 0x3e, 0x89, 0xed, 0xdb, 0x69, 0xb9, 0x22, 0xf8, - 0xc2, 0x8f, 0x5d, 0xcc, 0x59, 0x3e, 0x5f, 0x7b, 0x6e, 0x5a, 0x6c, 0xb3, 0x62, 0xc0, 0x17, 0x8a, - 0x2f, 0xda, 0xe8, 0x72, 0x67, 0x7b, 0xdf, 0xfe, 0xdb, 0x4a, 0x6e, 0x39, 0x2a, 0x1b, 0xae, 0xf8, - 0x88, 0x8f, 0xc5, 0x11, 0xc3, 0x67, 0x85, 0x5a, 0xc5, 0x54, 0xbb, 0xeb, 0x19, 0xf6, 0x52, 0x66, -}; - -const uint8_t key_blob_magic[7] = { 'k', 'e', 'y', 'b', 'l', 'o', 'b' }; - -const size_t s50_blob_size = 100; - -const char nibble_to_char[16] = { - '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f', -}; - -uint8_t * append_u32(uint8_t * pos, uint32_t val); -uint8_t * append_u16(uint8_t * pos, uint32_t val); -void write_uint32_msb_first(uint8_t * pos, uint32_t data); -void printf_buffer(const char * name, const unsigned char * buffer, size_t size); -uint32_t get_required_keyslots(mcuxClEls_KeyProp_t prop); -bool els_is_active_keyslot(mcuxClEls_KeyIndex_t keyIdx); -status_t els_enable(); -status_t els_get_key_properties(mcuxClEls_KeyIndex_t key_index, mcuxClEls_KeyProp_t * key_properties); -mcuxClEls_KeyIndex_t els_get_free_keyslot(uint32_t required_keyslots); -status_t els_derive_key(mcuxClEls_KeyIndex_t src_key_index, mcuxClEls_KeyProp_t key_prop, const uint8_t * dd, - mcuxClEls_KeyIndex_t * dst_key_index); -status_t els_delete_key(mcuxClEls_KeyIndex_t key_index); -status_t els_import_key(const uint8_t * wrapped_key, size_t wrapped_key_size, mcuxClEls_KeyProp_t key_prop, - mcuxClEls_KeyIndex_t unwrap_key_index, mcuxClEls_KeyIndex_t * dst_key_index); -status_t els_keygen(mcuxClEls_KeyIndex_t key_index, uint8_t * public_key, size_t * public_key_size); -status_t calculate_psa_import_blob_cmac(uint8_t * psa_import_blob, size_t psa_import_blob_length_before_mac, - size_t psa_import_blob_size); -status_t create_psa_import_blob(const uint8_t * els_key_blob, size_t els_key_blob_size, const psa_key_attributes_t * attributes, - uint8_t * output, size_t * output_size); -status_t import_die_int_wrapped_key_into_els(const uint8_t * wrapped_key, size_t wrapped_key_size, - mcuxClEls_KeyProp_t key_properties, mcuxClEls_KeyIndex_t * index_output); -status_t ELS_sign_hash(uint8_t * digest, mcuxClEls_EccByte_t * ecc_signature, mcuxClEls_EccSignOption_t * sign_options, - mcuxClEls_KeyIndex_t key_index); - -#endif diff --git a/src/platform/nxp/rt/rw61x/FactoryDataProviderEncImpl.cpp b/src/platform/nxp/rt/rw61x/FactoryDataProviderEncImpl.cpp new file mode 100644 index 00000000000000..b57a48883bbb41 --- /dev/null +++ b/src/platform/nxp/rt/rw61x/FactoryDataProviderEncImpl.cpp @@ -0,0 +1,481 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * Copyright 2023 NXP + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "FactoryDataProviderEncImpl.h" + +#if defined(__cplusplus) +extern "C" { +#endif /* __cplusplus */ + +#include "ELSFactoryData.h" +#include "mflash_drv.h" + +#include "fsl_adapter_flash.h" + +/* mbedtls */ +#include "mbedtls/aes.h" +#include "mbedtls/sha256.h" + +#if defined(__cplusplus) +} +#endif /* __cplusplus */ + +#ifndef FACTORY_DATA_PROVIDER_LOG +#define FACTORY_DATA_PROVIDER_LOG 0 +#endif + +#if FACTORY_DATA_PROVIDER_LOG +#include "fsl_debug_console.h" +#define FACTORY_DATA_PROVIDER_PRINTF(...) \ + PRINTF("[%s] ", __FUNCTION__); \ + PRINTF(__VA_ARGS__); \ + PRINTF("\n\r"); +#else +#define FACTORY_DATA_PROVIDER_PRINTF(...) +#endif + +/* Grab symbol for the base address from the linker file. */ +extern uint32_t __FACTORY_DATA_START_OFFSET[]; +extern uint32_t __FACTORY_DATA_SIZE[]; +extern uint32_t __FACTORY_DATA_END[]; + +using namespace ::chip::Credentials; +using namespace ::chip::Crypto; + +namespace chip { +namespace DeviceLayer { + +FactoryDataProviderImpl FactoryDataProviderImpl::sInstance; + +static constexpr size_t kAesKeyBlobLength = Crypto::kP256_PrivateKey_Length + ELS_BLOB_METADATA_SIZE + ELS_WRAP_OVERHEAD; + +#define TAG_ID_FOR_AES_KEY_BOLB 0xFE +#define MEM_ALIGN_4(size) ((size + 4) / 4 * 4) + +CHIP_ERROR FactoryDataProviderImpl::SearchForId(uint8_t searchedType, uint8_t * pBuf, size_t bufLength, uint16_t & length, + uint32_t * contentAddr) +{ + CHIP_ERROR err = CHIP_ERROR_NOT_FOUND; + uint8_t type = 0; + uint32_t index = 0; + uint8_t * addrContent = NULL; + uint8_t * factoryDataAddress = &factoryDataRamBuffer[0]; + uint32_t factoryDataSize = sizeof(factoryDataRamBuffer); + uint16_t currentLen = 0; + + while (index < factoryDataSize) + { + /* Read the type */ + memcpy((uint8_t *) &type, factoryDataAddress + index, sizeof(type)); + index += sizeof(type); + + /* Read the len */ + memcpy((uint8_t *) ¤tLen, factoryDataAddress + index, sizeof(currentLen)); + index += sizeof(currentLen); + + /* Check if the type gotten is the expected one */ + if (searchedType == type) + { + FACTORY_DATA_PROVIDER_PRINTF("type = %d, currentLen = %d, bufLength =%d", type, currentLen, bufLength); + /* If pBuf is null it means that we only want to know if the Type has been found */ + if (pBuf != NULL) + { + /* If the buffer given is too small, fill only the available space */ + if (bufLength < currentLen) + { + currentLen = bufLength; + } + memcpy((uint8_t *) pBuf, factoryDataAddress + index, currentLen); + } + length = currentLen; + if (contentAddr != NULL) + { + *contentAddr = (uint32_t) factoryDataAddress + index; + } + err = CHIP_NO_ERROR; + break; + } + else if (type == 0) + { + /* No more type available , break the loop */ + break; + } + else + { + /* Jump to next data */ + index += currentLen; + } + } + + return err; +} + +CHIP_ERROR FactoryDataProviderImpl::ELS_ImportWrappedKeyAndDecrypt(MutableByteSpan & key, uint8_t * encrypt, uint16_t size, + uint8_t * decrypt) +{ + uint8_t els_key_blob[kAesKeyBlobLength]; + size_t els_key_blob_size = sizeof(els_key_blob); + status_t status = STATUS_SUCCESS; + mcuxClEls_KeyIndex_t key_index = MCUXCLELS_KEY_SLOTS; + uint8_t public_key[64] = { 0 }; + size_t public_key_size = sizeof(public_key); + + mcuxClEls_KeyProp_t plain_key_properties = { + .word = { .value = MCUXCLELS_KEYPROPERTY_VALUE_SECURE | MCUXCLELS_KEYPROPERTY_VALUE_PRIVILEGED | + MCUXCLELS_KEYPROPERTY_VALUE_KEY_SIZE_256 | MCUXCLELS_KEYPROPERTY_VALUE_AES } + }; + + if (key.data() == NULL) + return CHIP_ERROR_INTERNAL; + + memcpy(els_key_blob, key.data(), key.size()); + + PLOG_DEBUG_BUFFER("els key blob", els_key_blob, els_key_blob_size); + + /* Import blob DAC key into SE50 (reserved key slot) */ + status = import_die_int_wrapped_key_into_els(els_key_blob, els_key_blob_size, plain_key_properties, &key_index); + STATUS_SUCCESS_OR_EXIT_MSG("import_die_int_wrapped_key_into_els failed: 0x%08x", status); + + ELS_Cipher_Aes_Ecb_Decrypt(key_index, encrypt, size, decrypt); + + els_delete_key(key_index); + + return CHIP_NO_ERROR; +exit: + els_delete_key(key_index); + return CHIP_ERROR_INVALID_SIGNATURE; +} + +CHIP_ERROR FactoryDataProviderImpl::LoadKeypairFromRaw(ByteSpan privateKey, ByteSpan publicKey, Crypto::P256Keypair & keypair) +{ + Crypto::P256SerializedKeypair serialized_keypair; + ReturnErrorOnFailure(serialized_keypair.SetLength(privateKey.size() + publicKey.size())); + memcpy(serialized_keypair.Bytes(), publicKey.data(), publicKey.size()); + memcpy(serialized_keypair.Bytes() + publicKey.size(), privateKey.data(), privateKey.size()); + return keypair.Deserialize(serialized_keypair); +} + +CHIP_ERROR FactoryDataProviderImpl::SignWithDacKey(const ByteSpan & digestToSign, MutableByteSpan & outSignBuffer) +{ + Crypto::P256ECDSASignature signature; + Crypto::P256Keypair keypair; + + VerifyOrReturnError(IsSpanUsable(outSignBuffer), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(IsSpanUsable(digestToSign), CHIP_ERROR_INVALID_ARGUMENT); + VerifyOrReturnError(outSignBuffer.size() >= signature.Capacity(), CHIP_ERROR_BUFFER_TOO_SMALL); + + // In a non-exemplary implementation, the public key is not needed here. It is used here merely because + // Crypto::P256Keypair is only (currently) constructable from raw keys if both private/public keys are present. + Crypto::P256PublicKey dacPublicKey; + uint16_t certificateSize = 0; + uint32_t certificateAddr; + ReturnLogErrorOnFailure(SearchForId(FactoryDataId::kDacCertificateId, NULL, 0, certificateSize, &certificateAddr)); + MutableByteSpan dacCertSpan((uint8_t *) certificateAddr, certificateSize); + + /* Extract Public Key of DAC certificate from itself */ + ReturnLogErrorOnFailure(Crypto::ExtractPubkeyFromX509Cert(dacCertSpan, dacPublicKey)); + + /* Get private key of DAC certificate from reserved section */ + uint16_t keySize = 0; + uint32_t keyAddr; + ReturnLogErrorOnFailure(SearchForId(FactoryDataId::kDacPrivateKeyId, NULL, 0, keySize, &keyAddr)); + MutableByteSpan dacPrivateKeySpan((uint8_t *) keyAddr, keySize); + + ReturnLogErrorOnFailure(LoadKeypairFromRaw(ByteSpan(dacPrivateKeySpan.data(), dacPrivateKeySpan.size()), + ByteSpan(dacPublicKey.Bytes(), dacPublicKey.Length()), keypair)); + + ReturnLogErrorOnFailure(keypair.ECDSA_sign_msg(digestToSign.data(), digestToSign.size(), signature)); + + return CopySpanToMutableSpan(ByteSpan{ signature.ConstBytes(), signature.Length() }, outSignBuffer); +} + +CHIP_ERROR FactoryDataProviderImpl::ReadAndCheckFactoryDataInFlash(void) +{ + status_t status; + uint32_t factoryDataAddress = (uint32_t) __FACTORY_DATA_START_OFFSET; + uint32_t factoryDataSize = (uint32_t) __FACTORY_DATA_SIZE; + uint32_t hashId; + + uint16_t i; + + /* Init mflash */ + status = mflash_drv_init(); + + if (status != kStatus_Success || factoryDataSize > sizeof(factoryDataRamBuffer)) + return CHIP_ERROR_INTERNAL; + + /* Load the factory data into RAM buffer */ + if (mflash_drv_read(factoryDataAddress, (uint32_t *) &factoryDataRamBuffer[0], factoryDataSize) != kStatus_Success) + { + return CHIP_ERROR_INTERNAL; + } + + memcpy(&mHeader, factoryDataRamBuffer, sizeof(mHeader)); + + if (mHeader.hashId != HASH_ID) + { + return CHIP_ERROR_NOT_FOUND; + } + + /* remove the header section */ + memmove(&factoryDataRamBuffer[0], &factoryDataRamBuffer[sizeof(mHeader)], mHeader.size); + + return CHIP_NO_ERROR; +} + +/* the factory data must be sencrypted by AES-256 */ +CHIP_ERROR FactoryDataProviderImpl::DecryptAndCheckFactoryData(void) +{ + status_t status; + bool encrypted = false; + uint16_t i = 0; + uint32_t factoryDataSize = mHeader.size; + uint8_t calculatedHash[SHA256_OUTPUT_SIZE]; + uint8_t currentBlock[BLOCK_SIZE_16_BYTES]; + CHIP_ERROR res; + uint8_t type; + uint16_t len; + + while (i < factoryDataSize) + { + type = factoryDataRamBuffer[i]; + len = factoryDataRamBuffer[i + 1] + (factoryDataRamBuffer[i + 2] << 8); + i += len; + if ((type > kMaxId) || (i > factoryDataSize)) + { + ChipLogProgress(DeviceLayer, "factory data is encrypted\n"); + encrypted = true; + break; + } + } + + if (encrypted) + { + mbedtls_aes_context aesCtx; + int status = 0; + do + { + mbedtls_aes_init(&aesCtx); + if (mbedtls_aes_setkey_dec(&aesCtx, pAesKey, 256U) != 0) + { + status = -1; + break; + } + for (i = 0; i < factoryDataSize / BLOCK_SIZE_16_BYTES; i++) + { + if (mbedtls_aes_crypt_ecb(&aesCtx, MBEDTLS_AES_DECRYPT, &factoryDataRamBuffer[i * 16], ¤tBlock[0]) != 0) + { + status = -2; + break; + } + memcpy(&factoryDataRamBuffer[i * 16], ¤tBlock[0], sizeof(currentBlock)); + } + mbedtls_aes_free(&aesCtx); + } while (false); + + if (status < 0) + { + ChipLogError(DeviceLayer, "factory data decryption Failure, status:%d", status); + return CHIP_ERROR_WRONG_ENCRYPTION_TYPE; + } + ChipLogProgress(DeviceLayer, "factory data decryption is successful!"); + } + else + { + ChipLogError(DeviceLayer, "factory data is in plain text!"); + } + + /* Calculate SHA256 value over the factory data and compare with stored value */ + res = Hash_SHA256(&factoryDataRamBuffer[0], mHeader.size, &calculatedHash[0]); + + if (res != CHIP_NO_ERROR) + return res; + + if (memcmp(&calculatedHash[0], &mHeader.hash[0], HASH_LEN) != 0) + { + return CHIP_ERROR_NOT_FOUND; + } + + ChipLogProgress(DeviceLayer, "factory data hash check is successful!"); + + ReturnErrorOnFailure(SearchForId(FactoryDataId::kVerifierId, NULL, 0, len)); + FACTORY_DATA_PROVIDER_PRINTF("[%d] len = %d", FactoryDataId::kVerifierId, len); + ReturnErrorOnFailure(SearchForId(FactoryDataId::kSaltId, NULL, 0, len)); + FACTORY_DATA_PROVIDER_PRINTF("[%d] len = %d", FactoryDataId::kSaltId, len); + ReturnErrorOnFailure(SearchForId(FactoryDataId::kIcId, NULL, 0, len)); + FACTORY_DATA_PROVIDER_PRINTF("[%d] len = %d", FactoryDataId::kIcId, len); + ReturnErrorOnFailure(SearchForId(FactoryDataId::kDacPrivateKeyId, NULL, 0, len)); + FACTORY_DATA_PROVIDER_PRINTF("[%d] len = %d", FactoryDataId::kDacPrivateKeyId, len); + ReturnErrorOnFailure(SearchForId(FactoryDataId::kDacCertificateId, NULL, 0, len)); + FACTORY_DATA_PROVIDER_PRINTF("[%d] len = %d", FactoryDataId::kDacCertificateId, len); + ReturnErrorOnFailure(SearchForId(FactoryDataId::kPaiCertificateId, NULL, 0, len)); + FACTORY_DATA_PROVIDER_PRINTF("[%d] len = %d", FactoryDataId::kPaiCertificateId, len); + ReturnErrorOnFailure(SearchForId(FactoryDataId::kDiscriminatorId, NULL, 0, len)); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR FactoryDataProviderImpl::Init(void) +{ + uint8_t type; + ReturnLogErrorOnFailure(ReadAndCheckFactoryDataInFlash()); + + els_enable(); + + ChipLogProgress(DeviceLayer, "init: protect whole factory data\n"); + + /* check if AES Key blob attached in the tail of factory data*/ + uint16_t size = MEM_ALIGN_4(sizeof(uint8_t) + sizeof(uint16_t) + kAesKeyBlobLength); + uint16_t len; + type = factoryDataRamBuffer[FACTORY_DATA_MAX_SIZE - size]; + len = factoryDataRamBuffer[FACTORY_DATA_MAX_SIZE - size + kLengthOffset] + + (factoryDataRamBuffer[FACTORY_DATA_MAX_SIZE - size + kLengthOffset + 1] << 8); + ChipLogProgress(DeviceLayer, "aes key blob type:%x, len:%d", type, len); + if ((type == TAG_ID_FOR_AES_KEY_BOLB) && (len == kAesKeyBlobLength)) + { + MutableByteSpan key(&factoryDataRamBuffer[FACTORY_DATA_MAX_SIZE - size + kValueOffset], len); + mcuxClEls_KeyIndex_t index; + + uint8_t * data = static_cast(chip::Platform::MemoryAlloc(mHeader.size)); + memset(data, 0, mHeader.size); + + /* will provision the wrapping key to edgelock and decrypt the factory data */ + ReturnLogErrorOnFailure(ELS_ImportWrappedKeyAndDecrypt(key, &factoryDataRamBuffer[0], mHeader.size, data)); + + memcpy(factoryDataRamBuffer, data, FACTORY_DATA_MAX_SIZE); + chip::Platform::MemoryFree(data); + } + else + { + /* This situation is usually in production mode, the AES key is passed through Uart and only runs once. + The AES Key is provisioined into Edge Lock, and the returned wrapped key is store in the end the factory data in TLV mode. + Here we take the precondition that we already got the AES Key, and check whether the decrypted factory data is right and + provision it into Edge Lock if right. */ + /* pAesKey should be pointed to a real key in advance on app layer, so should not be NULL. + Currently the fwk_factory_data_provider module supports only ecb mode. Therefore return an error if encrypt mode is not ecb + */ + if (pAesKey == NULL || encryptMode != encrypt_ecb) + { + return CHIP_ERROR_INVALID_ARGUMENT; + } + + ReturnLogErrorOnFailure(DecryptAndCheckFactoryData()); + ReturnLogErrorOnFailure(ELS_SaveAesKeyBlob()); + + ChipLogProgress(DeviceLayer, "System restarting"); + // Restart the system. + NVIC_SystemReset(); + while (1) + { + } + } + + return CHIP_NO_ERROR; +} + +CHIP_ERROR FactoryDataProviderImpl::ELS_SaveAesKeyBlob() +{ + size_t blobSize = kAesKeyBlobLength; + uint8_t blob[kAesKeyBlobLength] = { 0 }; + uint32_t factoryDataAddress = (uint32_t) __FACTORY_DATA_START_OFFSET; + uint32_t factoryDataSize = (uint32_t) __FACTORY_DATA_SIZE; + + VerifyOrReturnError(factoryDataRamBuffer != nullptr, CHIP_ERROR_INTERNAL); + + uint8_t type = TAG_ID_FOR_AES_KEY_BOLB; + ReturnErrorOnFailure(ELS_ExportBlob(blob, &blobSize)); + PLOG_DEBUG_BUFFER("els key blob", blob, blobSize); + ChipLogProgress(DeviceLayer, "SSS: extracted blob from factory data AES key"); + + /* Read all factory data */ + hal_flash_status_t status = + HAL_FlashRead(factoryDataAddress + MFLASH_BASE_ADDRESS, FACTORY_DATA_MAX_SIZE, &factoryDataRamBuffer[0]); + VerifyOrReturnError(status == kStatus_HAL_Flash_Success, CHIP_ERROR_INTERNAL); + ChipLogError(DeviceLayer, "SSS: cached factory data in RAM"); + + /* save the Aes Key Blob in the end of factory data region */ + uint16_t size = MEM_ALIGN_4(sizeof(uint8_t) + sizeof(uint16_t) + kAesKeyBlobLength); + memcpy(&factoryDataRamBuffer[factoryDataSize - size], &type, sizeof(uint8_t)); + memcpy(&factoryDataRamBuffer[factoryDataSize - size + kLengthOffset], &blobSize, sizeof(uint16_t)); + memcpy(&factoryDataRamBuffer[factoryDataSize - size + kValueOffset], blob, blobSize); + ChipLogError(DeviceLayer, "SSS: attach wrapped key in the end of factory data in tlv format"); + + /* Erase flash factory data sectors */ + status = HAL_FlashEraseSector(factoryDataAddress + MFLASH_BASE_ADDRESS, FACTORY_DATA_MAX_SIZE); + VerifyOrReturnError(status == kStatus_HAL_Flash_Success, CHIP_ERROR_INTERNAL); + /* Write new factory data into flash */ + status = HAL_FlashProgramUnaligned(factoryDataAddress + MFLASH_BASE_ADDRESS, FACTORY_DATA_MAX_SIZE, factoryDataRamBuffer); + VerifyOrReturnError(status == kStatus_HAL_Flash_Success, CHIP_ERROR_INTERNAL); + ChipLogError(DeviceLayer, "SSS: updated factory data"); + + return CHIP_NO_ERROR; +} + +CHIP_ERROR FactoryDataProviderImpl::ELS_ExportBlob(uint8_t * data, size_t * dataLen) +{ + status_t status = STATUS_SUCCESS; + mcuxClEls_KeyProp_t plain_key_properties = { + .word = { .value = MCUXCLELS_KEYPROPERTY_VALUE_SECURE | MCUXCLELS_KEYPROPERTY_VALUE_PRIVILEGED | + MCUXCLELS_KEYPROPERTY_VALUE_KEY_SIZE_256 | MCUXCLELS_KEYPROPERTY_VALUE_AES } + }; + + mcuxClEls_KeyIndex_t key_index = MCUXCLELS_KEY_SLOTS; + /* Import plain DAC key into S50 */ + status = import_plain_key_into_els(pAesKey, Crypto::kP256_PrivateKey_Length, plain_key_properties, &key_index); + STATUS_SUCCESS_OR_EXIT_MSG("derive_key failed: 0x%08x", status); + + /* ELS generate key blob. The blob created here is one that can be directly imported into ELS again. */ + status = export_key_from_els(key_index, data, dataLen); + STATUS_SUCCESS_OR_EXIT_MSG("export_key_from_els failed: 0x%08x", status); + + status = els_delete_key(key_index); + STATUS_SUCCESS_OR_EXIT_MSG("delete_key failed: 0x%08x", status); +exit: + return CHIP_NO_ERROR; +} + +CHIP_ERROR FactoryDataProviderImpl::SetAes256Key(const uint8_t * keyAes256) +{ + CHIP_ERROR error = CHIP_ERROR_INVALID_ARGUMENT; + if (keyAes256 != nullptr) + { + pAesKey = keyAes256; + error = CHIP_NO_ERROR; + } + + return error; +} + +CHIP_ERROR FactoryDataProviderImpl::SetEncryptionMode(EncryptionMode mode) +{ + CHIP_ERROR error = CHIP_ERROR_INVALID_ARGUMENT; + + /* + * Currently the fwk_factory_data_provider module supports only ecb mode. + * Therefore return an error if encrypt mode is not ecb + */ + if (mode == encrypt_ecb) + { + encryptMode = mode; + error = CHIP_NO_ERROR; + } + return error; +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nxp/rt/rw61x/FactoryDataProviderEncImpl.h b/src/platform/nxp/rt/rw61x/FactoryDataProviderEncImpl.h new file mode 100644 index 00000000000000..7a41eb6fbfd752 --- /dev/null +++ b/src/platform/nxp/rt/rw61x/FactoryDataProviderEncImpl.h @@ -0,0 +1,87 @@ +/* + * + * Copyright (c) 2024 Project CHIP Authors + * Copyright 2023 NXP + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +#define FACTORY_DATA_MAX_SIZE 4096 + +namespace chip { +namespace DeviceLayer { + +/** + * @brief This class provides Commissionable data and Device Attestation Credentials. + * + * This implementation allows to use the ELS hardware module to load the Matter factory + * dataset in RAM at the boot. + * + * + */ + +class FactoryDataProviderImpl : public FactoryDataProvider +{ +public: + static FactoryDataProviderImpl sInstance; + + CHIP_ERROR Init(void); + CHIP_ERROR SearchForId(uint8_t searchedType, uint8_t * pBuf, size_t bufLength, uint16_t & length, + uint32_t * contentAddr = NULL); + CHIP_ERROR LoadKeypairFromRaw(ByteSpan privateKey, ByteSpan publicKey, Crypto::P256Keypair & keypair); + CHIP_ERROR SignWithDacKey(const ByteSpan & digestToSign, MutableByteSpan & outSignBuffer); + + CHIP_ERROR SetAes256Key(const uint8_t * keyAes256); + CHIP_ERROR SetEncryptionMode(EncryptionMode mode); + +private: + struct Header + { + uint32_t hashId; + uint32_t size; + uint8_t hash[4]; + }; + uint8_t factoryDataRamBuffer[FACTORY_DATA_MAX_SIZE]; + Header mHeader; + + /* TLV offset */ + static constexpr uint32_t kLengthOffset = 1; + static constexpr uint32_t kValueOffset = 3; + + CHIP_ERROR ELS_ExportBlob(uint8_t * data, size_t * dataLen); + CHIP_ERROR ELS_SaveAesKeyBlob(); + + CHIP_ERROR ReadAndCheckFactoryDataInFlash(void); + CHIP_ERROR DecryptAndCheckFactoryData(void); + CHIP_ERROR ELS_ImportWrappedKeyAndDecrypt(MutableByteSpan & key, uint8_t * encrypt, uint16_t size, uint8_t * decrypt); + + const uint8_t * pAesKey = nullptr; + EncryptionMode encryptMode = encrypt_ecb; +}; + +inline FactoryDataProvider & FactoryDataPrvd() +{ + return FactoryDataProviderImpl::sInstance; +} + +inline FactoryDataProviderImpl & FactoryDataPrvdImpl() +{ + return FactoryDataProviderImpl::sInstance; +} + +} // namespace DeviceLayer +} // namespace chip diff --git a/src/platform/nxp/rt/rw61x/FactoryDataProviderImpl.cpp b/src/platform/nxp/rt/rw61x/FactoryDataProviderImpl.cpp index 299a018fabd092..73155af65eb48c 100644 --- a/src/platform/nxp/rt/rw61x/FactoryDataProviderImpl.cpp +++ b/src/platform/nxp/rt/rw61x/FactoryDataProviderImpl.cpp @@ -25,13 +25,11 @@ extern "C" { #include "ELSFactoryData.h" #include "mflash_drv.h" -#if CHIP_DEVICE_CONFIG_SECURE_DAC_PRIVATE_KEY #include "fsl_adapter_flash.h" -#endif -#ifndef FACTORY_DATA_PROVIDER_RUN_TESTS -#define FACTORY_DATA_PROVIDER_RUN_TESTS 0 -#endif +/* mbedtls */ +#include "mbedtls/aes.h" +#include "mbedtls/sha256.h" #if defined(__cplusplus) } @@ -63,6 +61,8 @@ namespace DeviceLayer { FactoryDataProviderImpl FactoryDataProviderImpl::sInstance; +static constexpr size_t kPrivateKeyBlobLength = Crypto::kP256_PrivateKey_Length + ELS_BLOB_METADATA_SIZE + ELS_WRAP_OVERHEAD; + CHIP_ERROR FactoryDataProviderImpl::SearchForId(uint8_t searchedType, uint8_t * pBuf, size_t bufLength, uint16_t & length, uint32_t * contentAddr) { @@ -123,16 +123,13 @@ CHIP_ERROR FactoryDataProviderImpl::SearchForId(uint8_t searchedType, uint8_t * CHIP_ERROR FactoryDataProviderImpl::SignWithDacKey(const ByteSpan & digestToSign, MutableByteSpan & outSignBuffer) { - uint8_t els_key_blob[MAX_ELS_KEY_SIZE + ELS_BLOB_METADATA_SIZE + ELS_WRAP_OVERHEAD]; - uint16_t keySize = 0; - uint32_t keyAddr; - status_t status = STATUS_SUCCESS; + uint8_t els_key_blob[kPrivateKeyBlobLength]; size_t els_key_blob_size = sizeof(els_key_blob); + uint16_t keySize = 0; + status_t status = STATUS_SUCCESS; uint8_t digest[kSHA256_Hash_Length]; - uint8_t public_key[64] = { 0 }; - size_t public_key_size = sizeof(public_key); - mcuxClEls_KeyIndex_t key_index = MCUXCLELS_KEY_SLOTS; + mcuxClEls_KeyIndex_t key_index = MCUXCLELS_KEY_SLOTS; mcuxClEls_KeyProp_t plain_key_properties = { .word = { .value = MCUXCLELS_KEYPROPERTY_VALUE_SECURE | MCUXCLELS_KEYPROPERTY_VALUE_PRIVILEGED | MCUXCLELS_KEYPROPERTY_VALUE_KEY_SIZE_256 | MCUXCLELS_KEYPROPERTY_VALUE_KGSRC } @@ -140,39 +137,15 @@ CHIP_ERROR FactoryDataProviderImpl::SignWithDacKey(const ByteSpan & digestToSign mcuxClEls_EccSignOption_t sign_options = { 0 }; mcuxClEls_EccByte_t ecc_signature[MCUXCLELS_ECC_SIGNATURE_SIZE]; - uint8_t psa_import_blob[256]; - size_t psa_import_blob_size = sizeof(psa_import_blob); + + uint8_t public_key[64] = { 0 }; + size_t public_key_size = sizeof(public_key); /* Search key ID FactoryDataId::kDacPrivateKeyId */ - ReturnErrorOnFailure(SearchForId(FactoryDataId::kDacPrivateKeyId, NULL, 0, keySize, &keyAddr)); - memcpy(els_key_blob, (uint8_t *) keyAddr, keySize); + ReturnErrorOnFailure(SearchForId(FactoryDataId::kDacPrivateKeyId, els_key_blob, els_key_blob_size, keySize)); PLOG_DEBUG_BUFFER("els_key_blob", els_key_blob, els_key_blob_size); - /* Calculate message HASH to sign */ - memset(&digest[0], 0, sizeof(digest)); - ReturnErrorOnFailure(Hash_SHA256(digestToSign.data(), digestToSign.size(), &digest[0])); - - PLOG_DEBUG_BUFFER("digestToSign", digestToSign.data(), digestToSign.size()); - - psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; - psa_set_key_algorithm(&attributes, PSA_ALG_ECDSA(PSA_ALG_SHA_256)); - psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_SIGN_HASH | PSA_KEY_USAGE_VERIFY_HASH); - psa_set_key_type(&attributes, PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1)); - psa_set_key_bits(&attributes, 256); - psa_set_key_lifetime( - &attributes, - PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(PSA_KEY_LIFETIME_PERSISTENT, PSA_KEY_LOCATION_S50_BLOB_STORAGE)); - psa_set_key_id(&attributes, 0x3E000021); - - /*To satisfy PSA APIs and to bind key attributes on PSA level to the key, a TLV structure is created - containing the els_key_blob and metadata. That TLV structure gets a CMAC. This structure is quasi - identical to what EdgeLock 2GO is creating. Note that the TLV structure is not used below but - required in case a blob shall be imported into TF-M for RW61x. */ - status = create_psa_import_blob(els_key_blob, els_key_blob_size, &attributes, psa_import_blob, &psa_import_blob_size); - STATUS_SUCCESS_OR_EXIT_MSG("export_key_from_els failed: 0x%08x", status); - PLOG_DEBUG_BUFFER("psa_import_blob", psa_import_blob, psa_import_blob_size); - /* Import blob DAC key into SE50 (reserved key slot) */ status = import_die_int_wrapped_key_into_els(els_key_blob, els_key_blob_size, plain_key_properties, &key_index); STATUS_SUCCESS_OR_EXIT_MSG("import_die_int_wrapped_key_into_els failed: 0x%08x", status); @@ -187,6 +160,12 @@ CHIP_ERROR FactoryDataProviderImpl::SignWithDacKey(const ByteSpan & digestToSign /* The key is usable for signing. */ PLOG_DEBUG_BUFFER("public_key", public_key, public_key_size); + /* Calculate message HASH to sign */ + memset(&digest[0], 0, sizeof(digest)); + ReturnErrorOnFailure(Hash_SHA256(digestToSign.data(), digestToSign.size(), &digest[0])); + + PLOG_DEBUG_BUFFER("digestToSign", digestToSign.data(), digestToSign.size()); + /* ECC sign message hash with the key index slot reserved during the blob importation */ ELS_sign_hash(digest, ecc_signature, &sign_options, key_index); @@ -195,26 +174,19 @@ CHIP_ERROR FactoryDataProviderImpl::SignWithDacKey(const ByteSpan & digestToSign /* Generate MutableByteSpan with ECC signature and ECC signature size */ return CopySpanToMutableSpan(ByteSpan{ ecc_signature, MCUXCLELS_ECC_SIGNATURE_SIZE }, outSignBuffer); + exit: els_delete_key(key_index); return CHIP_ERROR_INVALID_SIGNATURE; } -CHIP_ERROR FactoryDataProviderImpl::Init(void) +CHIP_ERROR FactoryDataProviderImpl::ReadAndCheckFactoryDataInFlash(void) { -#if FACTORY_DATA_PROVIDER_RUN_TESTS - unittest(); -#else - els_enable(); - - uint16_t len; status_t status; uint32_t factoryDataAddress = (uint32_t) __FACTORY_DATA_START_OFFSET; uint32_t factoryDataSize = (uint32_t) __FACTORY_DATA_SIZE; uint32_t hashId; - uint8_t currentBlock[BLOCK_SIZE_16_BYTES]; uint8_t calculatedHash[SHA256_OUTPUT_SIZE]; - uint16_t i; CHIP_ERROR res; /* Init mflash */ @@ -223,35 +195,21 @@ CHIP_ERROR FactoryDataProviderImpl::Init(void) if (status != kStatus_Success || factoryDataSize > sizeof(factoryDataRamBuffer)) return CHIP_ERROR_INTERNAL; - /* Read hash id saved in flash */ - if (mflash_drv_read(factoryDataAddress, (uint32_t *) &mHeader, sizeof(mHeader)) != kStatus_Success) + /* Load the factory data into RAM buffer */ + if (mflash_drv_read(factoryDataAddress, (uint32_t *) &factoryDataRamBuffer[0], factoryDataSize) != kStatus_Success) { return CHIP_ERROR_INTERNAL; } - + memcpy(&mHeader, factoryDataRamBuffer, sizeof(mHeader)); if (mHeader.hashId != HASH_ID) { return CHIP_ERROR_NOT_FOUND; } - - /* Update address to start after hash id to read size of factory data */ - factoryDataAddress += sizeof(mHeader); - - /* Load the buffer into RAM by reading each 16 bytes blocks */ - for (i = 0; i < (factoryDataSize / BLOCK_SIZE_16_BYTES); i++) - { - if (mflash_drv_read(factoryDataAddress + i * BLOCK_SIZE_16_BYTES, (uint32_t *) ¤tBlock[0], sizeof(currentBlock)) != - kStatus_Success) - { - return CHIP_ERROR_INTERNAL; - } - - /* Store the block unencrypted */ - memcpy(&factoryDataRamBuffer[i * BLOCK_SIZE_16_BYTES], ¤tBlock[0], sizeof(currentBlock)); - } + /* remove the header section */ + memmove(&factoryDataRamBuffer[0], &factoryDataRamBuffer[sizeof(mHeader)], mHeader.size); /* Calculate SHA256 value over the factory data and compare with stored value */ - res = Hash256(&factoryDataRamBuffer[0], mHeader.size, &calculatedHash[0]); + res = Hash_SHA256(&factoryDataRamBuffer[0], mHeader.size, &calculatedHash[0]); if (res != CHIP_NO_ERROR) return res; @@ -261,107 +219,63 @@ CHIP_ERROR FactoryDataProviderImpl::Init(void) return CHIP_ERROR_NOT_FOUND; } - ReturnErrorOnFailure(SearchForId(FactoryDataId::kVerifierId, NULL, 0, len)); - FACTORY_DATA_PROVIDER_PRINTF("[%d] len = %d", FactoryDataId::kVerifierId, len); - ReturnErrorOnFailure(SearchForId(FactoryDataId::kSaltId, NULL, 0, len)); - FACTORY_DATA_PROVIDER_PRINTF("[%d] len = %d", FactoryDataId::kSaltId, len); - ReturnErrorOnFailure(SearchForId(FactoryDataId::kIcId, NULL, 0, len)); - FACTORY_DATA_PROVIDER_PRINTF("[%d] len = %d", FactoryDataId::kIcId, len); - ReturnErrorOnFailure(SearchForId(FactoryDataId::kDacPrivateKeyId, NULL, 0, len)); - FACTORY_DATA_PROVIDER_PRINTF("[%d] len = %d", FactoryDataId::kDacPrivateKeyId, len); - ReturnErrorOnFailure(SearchForId(FactoryDataId::kDacCertificateId, NULL, 0, len)); - FACTORY_DATA_PROVIDER_PRINTF("[%d] len = %d", FactoryDataId::kDacCertificateId, len); - ReturnErrorOnFailure(SearchForId(FactoryDataId::kPaiCertificateId, NULL, 0, len)); - FACTORY_DATA_PROVIDER_PRINTF("[%d] len = %d", FactoryDataId::kPaiCertificateId, len); - ReturnErrorOnFailure(SearchForId(FactoryDataId::kDiscriminatorId, NULL, 0, len)); - -#if CHIP_DEVICE_CONFIG_SECURE_DAC_PRIVATE_KEY - ReturnErrorOnFailure(ELS_ConvertDacKey()); -#endif -#endif + ChipLogProgress(DeviceLayer, "factory data hash check is successful!"); return CHIP_NO_ERROR; } -CHIP_ERROR FactoryDataProviderImpl::Hash256(const uint8_t * input, size_t inputSize, uint8_t * output) -{ - CHIP_ERROR res; - res = Hash_SHA256(input, inputSize, output); - - return res; -} - -#if CHIP_DEVICE_CONFIG_SECURE_DAC_PRIVATE_KEY -static inline uint32_t els_get_key_size(mcuxClEls_KeyIndex_t keyIdx) +CHIP_ERROR FactoryDataProviderImpl::Init(void) { - mcuxClEls_KeyProp_t key_properties; - key_properties.word.value = ((const volatile uint32_t *) (&ELS->ELS_KS0))[keyIdx]; - return (key_properties.bits.ksize == MCUXCLELS_KEYPROPERTY_KEY_SIZE_256) ? (256U / 8U) : (128U / 8U); -} + uint16_t len; + uint8_t type; + uint16_t keySize = 0; -static status_t els_export_key(mcuxClEls_KeyIndex_t src_key_index, mcuxClEls_KeyIndex_t wrap_key_index, uint8_t * els_key_out_blob, - size_t * els_key_out_blob_size) + ReturnLogErrorOnFailure(ReadAndCheckFactoryDataInFlash()); -{ - uint32_t key_size = els_get_key_size(src_key_index); - uint32_t required_blob_size = ELS_BLOB_METADATA_SIZE + key_size + ELS_WRAP_OVERHEAD; - assert(required_blob_size <= *els_key_out_blob_size); + els_enable(); - *els_key_out_blob_size = required_blob_size; + ChipLogProgress(DeviceLayer, "init: only protect DAC private key\n"); - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, mcuxClEls_KeyExport_Async(wrap_key_index, src_key_index, els_key_out_blob)); - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_KeyExport_Async) != token) || (MCUXCLELS_STATUS_OK_WAIT != result)) + /* check whether the kDacPrivateKeyId data is converted or not*/ + ReturnErrorOnFailure(SearchForId(FactoryDataId::kDacPrivateKeyId, NULL, 0, keySize)); + if (keySize == kPrivateKeyBlobLength) { - PLOG_ERROR("mcuxClEls_KeyExport_Async failed: 0x%08lx", result); - return STATUS_ERROR_GENERIC; + /* the kDacPrivateKeyId data is converted already, do nothing */ + ChipLogProgress(DeviceLayer, "SSS: DAC private key already converted to blob"); + return CHIP_NO_ERROR; } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, mcuxClEls_WaitForOperation(MCUXCLELS_ERROR_FLAGS_CLEAR)); - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_WaitForOperation) != token) || (MCUXCLELS_STATUS_OK != result)) + else { - PLOG_ERROR("mcuxClEls_WaitForOperation failed: 0x%08lx", result); - return STATUS_ERROR_GENERIC; + /* provison the dac private key into Edge Lock and the returned wrapped key is stored the previous area of factory data, + update the hash and re-write the factory data in Flash */ + ChipLogProgress(DeviceLayer, "SSS: convert DAC private key to blob"); + ReturnLogErrorOnFailure(ELS_ConvertDacKey()); + ChipLogProgress(DeviceLayer, "System restarting"); + // Restart the system. + NVIC_SystemReset(); + while (1) + { + } } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - return STATUS_SUCCESS; -} -static status_t export_key_from_els(mcuxClEls_KeyIndex_t key_index, uint8_t * output, size_t * output_size) -{ - assert(output != NULL); - status_t status = STATUS_SUCCESS; - - mcuxClEls_KeyIndex_t key_wrap_out_index = MCUXCLELS_KEY_SLOTS; - PLOG_INFO("Deriving wrapping key for export on ELS..."); - status = els_derive_key(DIE_INT_MK_SK_INDEX, wrap_out_key_prop, ckdf_derivation_data_wrap_out, &key_wrap_out_index); - STATUS_SUCCESS_OR_EXIT_MSG("derive_key failed: 0x%08x", status); - - PLOG_INFO("Exporting/wrapping key..."); - status = els_export_key(key_index, key_wrap_out_index, output, output_size); - STATUS_SUCCESS_OR_EXIT_MSG("export_key failed: 0x%08x", status); - - status = els_delete_key(key_wrap_out_index); - STATUS_SUCCESS_OR_EXIT_MSG("delete_key failed: 0x%08x", status); - key_wrap_out_index = MCUXCLELS_KEY_SLOTS; -exit: - return status; + return CHIP_NO_ERROR; } CHIP_ERROR FactoryDataProviderImpl::ELS_ConvertDacKey() { - size_t blobSize = MAX_ELS_KEY_SIZE + ELS_BLOB_METADATA_SIZE + ELS_WRAP_OVERHEAD; - size_t newSize = sizeof(Header) + mHeader.size + (ELS_BLOB_METADATA_SIZE + ELS_WRAP_OVERHEAD); - uint8_t blob[Crypto::kP256_PrivateKey_Length + (ELS_BLOB_METADATA_SIZE + ELS_WRAP_OVERHEAD)] = { 0 }; + size_t blobSize = kPrivateKeyBlobLength; + size_t newSize = sizeof(Header) + mHeader.size + (ELS_BLOB_METADATA_SIZE + ELS_WRAP_OVERHEAD); + uint8_t blob[kPrivateKeyBlobLength] = { 0 }; uint32_t KeyAddr; uint32_t factoryDataAddress = (uint32_t) __FACTORY_DATA_START_OFFSET; uint32_t factoryDataSize = (uint32_t) __FACTORY_DATA_SIZE; - uint8_t * data = static_cast(chip::Platform::MemoryAlloc(newSize)); VerifyOrReturnError(factoryDataRamBuffer != nullptr, CHIP_ERROR_INTERNAL); + uint8_t * data = static_cast(chip::Platform::MemoryAlloc(newSize)); /* Import pain DAC key and generate the blob */ ReturnErrorOnFailure(ELS_ExportBlob(blob, &blobSize, KeyAddr)); - ChipLogError(DeviceLayer, "SSS: extracted blob from DAC private key"); + ChipLogProgress(DeviceLayer, "SSS: extracted blob from DAC private key"); + PLOG_DEBUG_BUFFER("blob", blob, blobSize); /* Read all factory data */ hal_flash_status_t status = @@ -373,7 +287,6 @@ CHIP_ERROR FactoryDataProviderImpl::ELS_ConvertDacKey() */ ReturnErrorOnFailure(ReplaceWithBlob(data, blob, blobSize, KeyAddr)); ChipLogError(DeviceLayer, "SSS: replaced DAC private key with secured blob"); - PLOG_DEBUG_BUFFER("ReplaceWithBlob", data, newSize); /* Erase flash factory data sectors */ status = HAL_FlashEraseSector(factoryDataAddress + MFLASH_BASE_ADDRESS, factoryDataSize); @@ -383,387 +296,21 @@ CHIP_ERROR FactoryDataProviderImpl::ELS_ConvertDacKey() VerifyOrReturnError(status == kStatus_HAL_Flash_Success, CHIP_ERROR_INTERNAL); ChipLogError(DeviceLayer, "SSS: updated factory data"); + chip::Platform::MemoryFree(data); return CHIP_NO_ERROR; } -static status_t els_generate_keypair(mcuxClEls_KeyIndex_t * dst_key_index, uint8_t * public_key, size_t * public_key_size) -{ - if (*public_key_size < 64) - { - PLOG_ERROR("insufficient space for public key"); - return STATUS_ERROR_GENERIC; - } - - mcuxClEls_EccKeyGenOption_t options = { 0 }; - options.bits.kgsrc = MCUXCLELS_ECC_OUTPUTKEY_RANDOM; - options.bits.kgtypedh = MCUXCLELS_ECC_OUTPUTKEY_KEYEXCHANGE; - - uint32_t keypair_required_keyslots = get_required_keyslots(keypair_prop); - *dst_key_index = (mcuxClEls_KeyIndex_t) els_get_free_keyslot(keypair_required_keyslots); - - if (!(*dst_key_index < MCUXCLELS_KEY_SLOTS)) - { - PLOG_ERROR("no free keyslot found"); - return STATUS_ERROR_GENERIC; - } - - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN( - result, token, - mcuxClEls_EccKeyGen_Async(options, (mcuxClEls_KeyIndex_t) 0U, *dst_key_index, keypair_prop, NULL, public_key)); - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_EccKeyGen_Async) != token) || (MCUXCLELS_STATUS_OK_WAIT != result)) - { - PLOG_ERROR("mcuxClEls_EccKeyGen_Async failed: 0x%08x", result); - return STATUS_ERROR_GENERIC; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, mcuxClEls_WaitForOperation(MCUXCLELS_ERROR_FLAGS_CLEAR)); - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_WaitForOperation) != token) || (MCUXCLELS_STATUS_OK != result)) - { - PLOG_ERROR("mcuxClEls_WaitForOperation failed: 0x%08x", result); - return STATUS_ERROR_GENERIC; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - - *public_key_size = 64; - return STATUS_SUCCESS; -} - -static status_t els_get_random(unsigned char * out, size_t out_size) -{ - /* Get random IV for sector metadata encryption. */ - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, mcuxClCss_Rng_DrbgRequest_Async(out, out_size)); - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClCss_Rng_DrbgRequest_Async) != token) || (MCUXCLELS_STATUS_OK_WAIT != result)) - { - PRINTF("mcuxClCss_Rng_DrbgRequest_Async failed: 0x%08lx\r\n", result); - return STATUS_ERROR_GENERIC; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, mcuxClCss_WaitForOperation(MCUXCLCSS_ERROR_FLAGS_CLEAR)); - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_WaitForOperation) != token) || (MCUXCLELS_STATUS_OK != result)) - { - PRINTF("Css_EccKeyGen_Async WaitForOperation failed: 0x%08lx\r\n", result); - return STATUS_ERROR_GENERIC; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - return STATUS_SUCCESS; -} - -static int get_random_mbedtls_callback(void * ctx, unsigned char * out, size_t out_size) -{ - status_t status = els_get_random(out, out_size); - if (status != STATUS_SUCCESS) - { - return MBEDTLS_ERR_ENTROPY_SOURCE_FAILED; - } - return 0; -} - -static status_t host_perform_key_agreement(const uint8_t * public_key, size_t public_key_size, uint8_t * shared_secret, - size_t * shared_secret_size) -{ - assert(public_key != NULL); - assert(public_key_size == 64); - assert(shared_secret != NULL); - assert(*shared_secret_size >= 32); - - status_t status = STATUS_SUCCESS; - - int ret = 0; - mbedtls_ecp_group grp; - mbedtls_ecp_point qB; - mbedtls_mpi dA, zA; - mbedtls_ecp_group_init(&grp); - mbedtls_ecp_point_init(&qB); - mbedtls_mpi_init(&dA); - mbedtls_mpi_init(&zA); - - unsigned char strbuf[128] = { 0 }; - size_t strlen = sizeof(strbuf); - - uint8_t public_key_compressed[65] = { 0 }; - public_key_compressed[0] = 0x04; - - *shared_secret_size = 32; - ret = mbedtls_ecp_group_load(&grp, MBEDTLS_ECP_DP_SECP256R1); - RET_MBEDTLS_SUCCESS_OR_EXIT_MSG("mbedtls_ecp_group_load failed: 0x%08x", ret); - - ret = mbedtls_mpi_read_binary(&dA, import_die_int_ecdh_sk, sizeof(import_die_int_ecdh_sk)); - RET_MBEDTLS_SUCCESS_OR_EXIT_MSG("mbedtls_mpi_read_binary failed: 0x%08x", ret); - - memcpy(&public_key_compressed[1], public_key, public_key_size); - - ret = mbedtls_ecp_point_read_binary(&grp, &qB, public_key_compressed, sizeof(public_key_compressed)); - RET_MBEDTLS_SUCCESS_OR_EXIT_MSG("mbedtls_ecp_point_read_binary failed: 0x%08x", ret); - - ret = mbedtls_ecdh_compute_shared(&grp, &zA, &qB, &dA, &get_random_mbedtls_callback, NULL); - RET_MBEDTLS_SUCCESS_OR_EXIT_MSG("mbedtls_ecdh_compute_shared failed: 0x%08x", ret); - - mbedtls_ecp_point_write_binary(&grp, &qB, MBEDTLS_ECP_PF_UNCOMPRESSED, &strlen, &strbuf[0], sizeof(strbuf)); - printf_buffer("public_key", strbuf, strlen); - - mbedtls_mpi_write_binary(&zA, shared_secret, *shared_secret_size); - PLOG_DEBUG_BUFFER("shared_secret", shared_secret, *shared_secret_size); -exit: - return status; -} - -static status_t host_derive_key(const uint8_t * input_key, size_t input_key_size, const uint8_t * derivation_data, - size_t derivation_data_size, uint32_t key_properties, uint8_t * output, size_t * output_size) -{ - status_t status = STATUS_SUCCESS; - - int ret = 0; - uint32_t counter = 1; - mbedtls_cipher_context_t ctx; - memset(&ctx, 0, sizeof(ctx)); - bool ctx_valid = false; - - assert(input_key != NULL); - assert(input_key_size == 32); - assert(derivation_data != NULL); - assert(derivation_data_size == 12); - assert(output != NULL); - assert(*output_size == 32); - - uint32_t lsbit = key_properties & 0x01; - uint32_t length_blocks = 1 + lsbit; - uint32_t length_bytes = length_blocks * AES_BLOCK_SIZE; - assert(*output_size >= length_bytes); - *output_size = length_bytes; - - // KDF in counter mode implementation as described in Section 5.1 - // of NIST SP 800-108, Recommendation for Key Derivation Using Pseudorandom Functions - // Derivation data[191:0](sic!) = software_derivation_data[95:0] || 64'h0 || requested_ - // properties[31:0 || length[31:0] || counter[31:0] - - uint8_t dd[32] = { 0 }; - memcpy(&dd[0], derivation_data, derivation_data_size); - memset(&dd[12], 0, 8); - write_uint32_msb_first(&dd[20], key_properties); - write_uint32_msb_first(&dd[24], length_bytes * 8); // expected in bits! - write_uint32_msb_first(&dd[28], counter); - - mbedtls_cipher_type_t mbedtls_cipher_type = MBEDTLS_CIPHER_AES_256_ECB; - const mbedtls_cipher_info_t * cipher_info = mbedtls_cipher_info_from_type(mbedtls_cipher_type); - - PLOG_DEBUG_BUFFER("input_key", input_key, input_key_size); - PLOG_DEBUG_BUFFER("dd", dd, sizeof(dd)); - - uint8_t * pos = output; - do - { - mbedtls_cipher_init(&ctx); - ctx_valid = true; - - ret = mbedtls_cipher_setup(&ctx, cipher_info); - RET_MBEDTLS_SUCCESS_OR_EXIT_MSG("mbedtls_cipher_setup failed: 0x%08x", ret); - - ret = mbedtls_cipher_cmac_starts(&ctx, input_key, input_key_size * 8); - RET_MBEDTLS_SUCCESS_OR_EXIT_MSG("mbedtls_cipher_cmac_starts failed: 0x%08x", ret); - - ret = mbedtls_cipher_cmac_update(&ctx, dd, sizeof(dd)); - RET_MBEDTLS_SUCCESS_OR_EXIT_MSG("mbedtls_cipher_cmac_update failed: 0x%08x", ret); - - ret = mbedtls_cipher_cmac_finish(&ctx, pos); - RET_MBEDTLS_SUCCESS_OR_EXIT_MSG("mbedtls_cipher_cmac_finish failed: 0x%08x", ret); - - mbedtls_cipher_free(&ctx); - ctx_valid = false; - - write_uint32_msb_first(&dd[28], ++counter); - pos += AES_BLOCK_SIZE; - } while (counter * AES_BLOCK_SIZE <= length_bytes); - - PLOG_DEBUG_BUFFER("output", output, length_bytes); - -exit: - if (ctx_valid) - { - mbedtls_cipher_free(&ctx); - ctx_valid = false; - } - - return status; -} - -static status_t host_wrap_key(const uint8_t * data, size_t data_size, const uint8_t * key, size_t key_size, uint8_t * output, - size_t * output_size) -{ - status_t status = STATUS_SUCCESS; - int ret = 0; - mbedtls_nist_kw_context ctx; - mbedtls_nist_kw_init(&ctx); - ret = mbedtls_nist_kw_setkey(&ctx, MBEDTLS_CIPHER_ID_AES, key, key_size * 8, true); - RET_MBEDTLS_SUCCESS_OR_EXIT_MSG("mbedtls_nist_kw_setkey failed: 0x%08x", ret); - ret = mbedtls_nist_kw_wrap(&ctx, MBEDTLS_KW_MODE_KW, data, data_size, output, output_size, *output_size); - RET_MBEDTLS_SUCCESS_OR_EXIT_MSG("mbedtls_nist_kw_wrap failed: 0x%08x", ret); - PLOG_DEBUG_BUFFER("wrapped buffer", output, *output_size); -exit: - mbedtls_nist_kw_free(&ctx); - return status; -} - -static status_t create_els_import_keyblob(const uint8_t * plain_key, size_t plain_key_size, mcuxClEls_KeyProp_t plain_key_prop, - const uint8_t * key_wrap_in, size_t key_wrap_in_size, uint8_t * blob, size_t * blob_size) -{ - assert(plain_key_size == 16 || plain_key_size == 32); - assert(key_wrap_in_size == 16); - - uint8_t buffer[ELS_BLOB_METADATA_SIZE + MAX_ELS_KEY_SIZE] = { 0 }; - size_t buffer_size = ELS_BLOB_METADATA_SIZE + plain_key_size; - - // Enforce the wrpok bit - the key needs to be re-wrappable! - plain_key_prop.bits.wrpok = MCUXCLELS_KEYPROPERTY_WRAP_TRUE; - - // This is what ELS documentation says. It does not work though?? - // memset(&buffer[0], 0xA6, 8); - // write_uint32_msb_first(&buffer[8], plain_key_prop.word.value); - // memset(&buffer[12], 0, 4); - // memcpy(&buffer[16], plain_key, plain_key_size); - - write_uint32_msb_first(&buffer[0], plain_key_prop.word.value); - memset(&buffer[4], 0, 4); - memcpy(&buffer[8], plain_key, plain_key_size); - PLOG_DEBUG_BUFFER("plain buffer before wrapping for import", buffer, buffer_size); - - status_t status = host_wrap_key(buffer, buffer_size, key_wrap_in, key_wrap_in_size, blob, blob_size); - return status; -} - -static status_t els_perform_key_agreement(mcuxClEls_KeyIndex_t keypair_index, mcuxClEls_KeyProp_t shared_secret_prop, - mcuxClEls_KeyIndex_t * dst_key_index, const uint8_t * public_key, size_t public_key_size) -{ - uint32_t shared_secret_required_keyslots = get_required_keyslots(shared_secret_prop); - *dst_key_index = els_get_free_keyslot(shared_secret_required_keyslots); - - if (!(*dst_key_index < MCUXCLELS_KEY_SLOTS)) - { - PLOG_ERROR("no free keyslot found"); - return STATUS_ERROR_GENERIC; - } - - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, - mcuxClEls_EccKeyExchange_Async(keypair_index, public_key, *dst_key_index, shared_secret_prop)); - - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_EccKeyExchange_Async) != token) || (MCUXCLELS_STATUS_OK_WAIT != result)) - { - PLOG_ERROR("mcuxClEls_EccKeyExchange_Async failed: 0x%08x", result); - return STATUS_ERROR_GENERIC; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - - MCUX_CSSL_FP_FUNCTION_CALL_BEGIN(result, token, mcuxClEls_WaitForOperation(MCUXCLELS_ERROR_FLAGS_CLEAR)); - if ((MCUX_CSSL_FP_FUNCTION_CALLED(mcuxClEls_WaitForOperation) != token) || (MCUXCLELS_STATUS_OK != result)) - { - PLOG_ERROR("mcuxClEls_WaitForOperation failed: 0x%08x", result); - return STATUS_ERROR_GENERIC; - } - MCUX_CSSL_FP_FUNCTION_CALL_END(); - - return STATUS_SUCCESS; -} - -static status_t import_plain_key_into_els(const uint8_t * plain_key, size_t plain_key_size, mcuxClEls_KeyProp_t key_properties, - mcuxClEls_KeyIndex_t * index_output) -{ - status_t status = STATUS_SUCCESS; - mcuxClEls_KeyIndex_t index_plain = MCUXCLELS_KEY_SLOTS; - mcuxClEls_KeyIndex_t index_shared_secret = MCUXCLELS_KEY_SLOTS; - mcuxClEls_KeyIndex_t index_unwrap = MCUXCLELS_KEY_SLOTS; - mcuxClEls_KeyIndex_t * potentially_used_key_indices[] = { &index_plain, &index_shared_secret, &index_unwrap }; - - uint8_t els_key_in_blob[ELS_BLOB_METADATA_SIZE + MAX_ELS_KEY_SIZE + ELS_WRAP_OVERHEAD]; - size_t els_key_in_blob_size = sizeof(els_key_in_blob); - - uint8_t shared_secret[32] = { 0 }; - size_t shared_secret_len = sizeof(shared_secret); - - uint8_t key_wrap_in[32]; - size_t key_wrap_in_size = sizeof(key_wrap_in); - - PLOG_INFO("Generating random ECC keypair..."); - uint8_t public_key[64] = { 0u }; - size_t public_key_size = sizeof(public_key); - status = els_generate_keypair(&index_plain, &public_key[0], &public_key_size); - STATUS_SUCCESS_OR_EXIT_MSG("generate_keypair failed: 0x%08x", status); - - PLOG_INFO("Calculating shared secret on host..."); - status = host_perform_key_agreement(public_key, public_key_size, &shared_secret[0], &shared_secret_len); - STATUS_SUCCESS_OR_EXIT_MSG("perform_key_agreement_host failed: 0x%08x", status); - - PLOG_INFO("Deriving wrapping key for import on host..."); - status = host_derive_key(shared_secret, shared_secret_len, ckdf_derivation_data_wrap_in, sizeof(ckdf_derivation_data_wrap_in), - wrap_in_key_prop.word.value, &key_wrap_in[0], &key_wrap_in_size); - STATUS_SUCCESS_OR_EXIT_MSG("ckdf_host failed: 0x%08x", status); - - PLOG_INFO("Creating ELS keyblob for import..."); - - status = create_els_import_keyblob(plain_key, plain_key_size, key_properties, key_wrap_in, key_wrap_in_size, - &els_key_in_blob[0], &els_key_in_blob_size); - STATUS_SUCCESS_OR_EXIT_MSG("create_els_import_keyblob failed: 0x%08x", status); - - PLOG_INFO("Calculating shared secret on ELS..."); - status = els_perform_key_agreement(index_plain, shared_secret_prop, &index_shared_secret, import_die_int_ecdh_pk, - sizeof(import_die_int_ecdh_pk)); - STATUS_SUCCESS_OR_EXIT_MSG("perform_key_agreement failed: 0x%08x", status); - - status = els_delete_key(index_plain); - STATUS_SUCCESS_OR_EXIT_MSG("delete_key failed: 0x%08x", status); - index_plain = MCUXCLELS_KEY_SLOTS; - - PLOG_INFO("Deriving wrapping key for import on ELS..."); - status = els_derive_key(index_shared_secret, wrap_in_key_prop, ckdf_derivation_data_wrap_in, &index_unwrap); - STATUS_SUCCESS_OR_EXIT_MSG("derive_key failed: 0x%08x", status); - - status = els_delete_key(index_shared_secret); - STATUS_SUCCESS_OR_EXIT_MSG("delete_key failed: 0x%08x", status); - index_shared_secret = MCUXCLELS_KEY_SLOTS; - - PLOG_INFO("Importing wrapped key..."); - status = els_import_key(els_key_in_blob, els_key_in_blob_size, key_properties, index_unwrap, index_output); - STATUS_SUCCESS_OR_EXIT_MSG("import_wrapped_key failed: 0x%08x", status); - - status = els_delete_key(index_unwrap); - STATUS_SUCCESS_OR_EXIT_MSG("delete_key failed: 0x%08x", status); - index_unwrap = MCUXCLELS_KEY_SLOTS; - -exit: - for (size_t i = 0; i < ARRAY_SIZE(potentially_used_key_indices); i++) - { - mcuxClEls_KeyIndex_t key_index = *(potentially_used_key_indices[i]); - if (key_index < MCUXCLELS_KEY_SLOTS) - { - (void) els_delete_key(key_index); - } - } - return status; -} - CHIP_ERROR FactoryDataProviderImpl::ELS_ExportBlob(uint8_t * data, size_t * dataLen, uint32_t & addr) { + status_t status = STATUS_SUCCESS; uint8_t keyBuf[Crypto::kP256_PrivateKey_Length]; - MutableByteSpan dacPrivateKeySpan(keyBuf); uint16_t keySize = 0; - - status_t status = STATUS_SUCCESS; - psa_key_attributes_t attributes = PSA_KEY_ATTRIBUTES_INIT; - psa_set_key_algorithm(&attributes, PSA_ALG_ECDSA(PSA_ALG_SHA_256)); - psa_set_key_usage_flags(&attributes, PSA_KEY_USAGE_SIGN_HASH | PSA_KEY_USAGE_VERIFY_HASH); - psa_set_key_type(&attributes, PSA_KEY_TYPE_ECC_KEY_PAIR(PSA_ECC_FAMILY_SECP_R1)); - psa_set_key_bits(&attributes, 256); - psa_set_key_lifetime( - &attributes, - PSA_KEY_LIFETIME_FROM_PERSISTENCE_AND_LOCATION(PSA_KEY_LIFETIME_PERSISTENT, PSA_KEY_LOCATION_S50_BLOB_STORAGE)); - psa_set_key_id(&attributes, 0x3E000021); + MutableByteSpan keySpan(keyBuf); /* Search key ID FactoryDataId::kDacPrivateKeyId */ - ReturnErrorOnFailure( - SearchForId(FactoryDataId::kDacPrivateKeyId, dacPrivateKeySpan.data(), dacPrivateKeySpan.size(), keySize, &addr)); - dacPrivateKeySpan.reduce_size(keySize); - PLOG_DEBUG_BUFFER("Private DAC key plain", dacPrivateKeySpan.data(), dacPrivateKeySpan.size()); - + ReturnErrorOnFailure(SearchForId(FactoryDataId::kDacPrivateKeyId, keySpan.data(), keySpan.size(), keySize, &addr)); + keySpan.reduce_size(keySize); + PLOG_DEBUG_BUFFER("Private DAC key plain", keySpan.data(), keySpan.size()); mcuxClEls_KeyProp_t plain_key_properties = { .word = { .value = MCUXCLELS_KEYPROPERTY_VALUE_SECURE | MCUXCLELS_KEYPROPERTY_VALUE_PRIVILEGED | MCUXCLELS_KEYPROPERTY_VALUE_KEY_SIZE_256 | MCUXCLELS_KEYPROPERTY_VALUE_KGSRC } @@ -771,7 +318,7 @@ CHIP_ERROR FactoryDataProviderImpl::ELS_ExportBlob(uint8_t * data, size_t * data mcuxClEls_KeyIndex_t key_index = MCUXCLELS_KEY_SLOTS; /* Import plain DAC key into S50 */ - status = import_plain_key_into_els(dacPrivateKeySpan.data(), dacPrivateKeySpan.size(), plain_key_properties, &key_index); + status = import_plain_key_into_els(keySpan.data(), keySpan.size(), plain_key_properties, &key_index); STATUS_SUCCESS_OR_EXIT_MSG("derive_key failed: 0x%08x", status); /* ELS generate key blob. The blob created here is one that can be directly imported into ELS again. */ @@ -807,94 +354,5 @@ CHIP_ERROR FactoryDataProviderImpl::ReplaceWithBlob(uint8_t * data, uint8_t * bl return CHIP_NO_ERROR; } -#endif // CHIP_DEVICE_CONFIG_SECURE_DAC_PRIVATE_KEY - -CHIP_ERROR FactoryDataProviderImpl::unittest(void) -{ -#if FACTORY_DATA_PROVIDER_RUN_TESTS - CHIP_ERROR res; - - uint8_t ecc_message[295] = { - 0x15, 0x30, 0x01, 0xec, 0x30, 0x81, 0xe9, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x02, 0xa0, 0x81, - 0xdb, 0x30, 0x81, 0xd8, 0x02, 0x01, 0x03, 0x31, 0x0d, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, - 0x02, 0x01, 0x30, 0x45, 0x06, 0x09, 0x2a, 0x86, 0x48, 0x86, 0xf7, 0x0d, 0x01, 0x07, 0x01, 0xa0, 0x38, 0x04, 0x36, 0x15, - 0x24, 0x00, 0x01, 0x25, 0x01, 0x37, 0x10, 0x36, 0x02, 0x05, 0x26, 0xa2, 0x18, 0x25, 0x03, 0x01, 0x03, 0x2c, 0x04, 0x13, - 0x5a, 0x49, 0x47, 0x32, 0x30, 0x31, 0x34, 0x32, 0x5a, 0x42, 0x33, 0x33, 0x30, 0x30, 0x30, 0x33, 0x2d, 0x32, 0x34, 0x24, - 0x05, 0x00, 0x24, 0x06, 0x00, 0x25, 0x07, 0x76, 0x98, 0x24, 0x08, 0x01, 0x18, 0x31, 0x7d, 0x30, 0x7b, 0x02, 0x01, 0x03, - 0x80, 0x14, 0x62, 0xfa, 0x82, 0x33, 0x59, 0xac, 0xfa, 0xa9, 0x96, 0x3e, 0x1c, 0xfa, 0x14, 0x0a, 0xdd, 0xf5, 0x04, 0xf3, - 0x71, 0x60, 0x30, 0x0b, 0x06, 0x09, 0x60, 0x86, 0x48, 0x01, 0x65, 0x03, 0x04, 0x02, 0x01, 0x30, 0x0a, 0x06, 0x08, 0x2a, - 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x04, 0x47, 0x30, 0x45, 0x02, 0x21, 0x00, 0xc3, 0xbf, 0xd1, 0xcb, 0xed, 0x21, - 0x1e, 0x54, 0x76, 0x81, 0xa6, 0xfa, 0x08, 0x8f, 0x26, 0xce, 0x14, 0x8c, 0x72, 0xae, 0x1b, 0x6f, 0x61, 0x18, 0x0f, 0x6f, - 0x01, 0xc2, 0x75, 0xad, 0x6e, 0x5e, 0x02, 0x20, 0x31, 0x11, 0x00, 0x88, 0xcc, 0xc9, 0x98, 0x55, 0x0e, 0xf1, 0xd2, 0x42, - 0x07, 0x7a, 0xaa, 0x41, 0x0c, 0xd2, 0xd3, 0xd4, 0x76, 0xab, 0xd5, 0xaf, 0x32, 0x2c, 0x45, 0x75, 0xfa, 0xcc, 0x51, 0x5b, - 0x30, 0x02, 0x20, 0x73, 0x09, 0xbb, 0x01, 0xa5, 0xae, 0x2f, 0xfc, 0x0b, 0x7f, 0xee, 0xcb, 0xa0, 0xc4, 0x94, 0xf1, 0xd3, - 0x61, 0xce, 0x4a, 0x83, 0x21, 0x5e, 0x84, 0x07, 0xcf, 0x42, 0xc5, 0xee, 0xea, 0x1a, 0x2e, 0x24, 0x03, 0x00, 0x18, 0x90, - 0x75, 0x48, 0x87, 0x85, 0x5f, 0x73, 0xb0, 0xcb, 0x3e, 0x38, 0xa7, 0xbd, 0xad, 0x22, 0xf4 - }; - - const uint8_t kDevelopmentDAC_Cert_FFF1_8002[492] = { - 0x30, 0x82, 0x01, 0xe8, 0x30, 0x82, 0x01, 0x8e, 0xa0, 0x03, 0x02, 0x01, 0x02, 0x02, 0x08, 0x52, 0x72, 0x4d, 0x21, 0xe2, - 0xc1, 0x74, 0xaf, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x30, 0x3d, 0x31, 0x25, 0x30, - 0x23, 0x06, 0x03, 0x55, 0x04, 0x03, 0x0c, 0x1c, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x44, 0x65, 0x76, 0x20, 0x50, - 0x41, 0x49, 0x20, 0x30, 0x78, 0x46, 0x46, 0x46, 0x31, 0x20, 0x6e, 0x6f, 0x20, 0x50, 0x49, 0x44, 0x31, 0x14, 0x30, 0x12, - 0x06, 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x30, 0x20, - 0x17, 0x0d, 0x32, 0x32, 0x30, 0x32, 0x30, 0x35, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x5a, 0x18, 0x0f, 0x39, 0x39, 0x39, - 0x39, 0x31, 0x32, 0x33, 0x31, 0x32, 0x33, 0x35, 0x39, 0x35, 0x39, 0x5a, 0x30, 0x53, 0x31, 0x25, 0x30, 0x23, 0x06, 0x03, - 0x55, 0x04, 0x03, 0x0c, 0x1c, 0x4d, 0x61, 0x74, 0x74, 0x65, 0x72, 0x20, 0x44, 0x65, 0x76, 0x20, 0x44, 0x41, 0x43, 0x20, - 0x30, 0x78, 0x46, 0x46, 0x46, 0x31, 0x2f, 0x30, 0x78, 0x38, 0x30, 0x30, 0x32, 0x31, 0x14, 0x30, 0x12, 0x06, 0x0a, 0x2b, - 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x01, 0x0c, 0x04, 0x46, 0x46, 0x46, 0x31, 0x31, 0x14, 0x30, 0x12, 0x06, - 0x0a, 0x2b, 0x06, 0x01, 0x04, 0x01, 0x82, 0xa2, 0x7c, 0x02, 0x02, 0x0c, 0x04, 0x38, 0x30, 0x30, 0x32, 0x30, 0x59, 0x30, - 0x13, 0x06, 0x07, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x02, 0x01, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x03, 0x01, 0x07, - 0x03, 0x42, 0x00, 0x04, 0xda, 0x93, 0xf1, 0x67, 0x36, 0x25, 0x67, 0x50, 0xd9, 0x03, 0xb0, 0x34, 0xba, 0x45, 0x88, 0xab, - 0xaf, 0x58, 0x95, 0x4f, 0x77, 0xaa, 0x9f, 0xd9, 0x98, 0x9d, 0xfd, 0x40, 0x0d, 0x7a, 0xb3, 0xfd, 0xc9, 0x75, 0x3b, 0x3b, - 0x92, 0x1b, 0x29, 0x4c, 0x95, 0x0f, 0xd9, 0xd2, 0x80, 0xd1, 0x4c, 0x43, 0x86, 0x2f, 0x16, 0xdc, 0x85, 0x4b, 0x00, 0xed, - 0x39, 0xe7, 0x50, 0xba, 0xbf, 0x1d, 0xc4, 0xca, 0xa3, 0x60, 0x30, 0x5e, 0x30, 0x0c, 0x06, 0x03, 0x55, 0x1d, 0x13, 0x01, - 0x01, 0xff, 0x04, 0x02, 0x30, 0x00, 0x30, 0x0e, 0x06, 0x03, 0x55, 0x1d, 0x0f, 0x01, 0x01, 0xff, 0x04, 0x04, 0x03, 0x02, - 0x07, 0x80, 0x30, 0x1d, 0x06, 0x03, 0x55, 0x1d, 0x0e, 0x04, 0x16, 0x04, 0x14, 0xef, 0x06, 0x56, 0x11, 0x9c, 0x1c, 0x91, - 0xa7, 0x9a, 0x94, 0xe6, 0xdc, 0xf3, 0x79, 0x79, 0xdb, 0xd0, 0x7f, 0xf8, 0xa3, 0x30, 0x1f, 0x06, 0x03, 0x55, 0x1d, 0x23, - 0x04, 0x18, 0x30, 0x16, 0x80, 0x14, 0x63, 0x54, 0x0e, 0x47, 0xf6, 0x4b, 0x1c, 0x38, 0xd1, 0x38, 0x84, 0xa4, 0x62, 0xd1, - 0x6c, 0x19, 0x5d, 0x8f, 0xfb, 0x3c, 0x30, 0x0a, 0x06, 0x08, 0x2a, 0x86, 0x48, 0xce, 0x3d, 0x04, 0x03, 0x02, 0x03, 0x48, - 0x00, 0x30, 0x45, 0x02, 0x20, 0x46, 0x86, 0x81, 0x07, 0x33, 0xbf, 0x0d, 0xc8, 0xff, 0x4c, 0xb5, 0x14, 0x5a, 0x6b, 0xfa, - 0x1a, 0xec, 0xff, 0xa8, 0xb6, 0xda, 0xb6, 0xc3, 0x51, 0xaa, 0xee, 0xcd, 0xaf, 0xb8, 0xbe, 0x95, 0x7d, 0x02, 0x21, 0x00, - 0xe8, 0xc2, 0x8d, 0x6b, 0xfc, 0xc8, 0x7a, 0x7d, 0x54, 0x2e, 0xad, 0x6e, 0xda, 0xca, 0x14, 0x8d, 0x5f, 0xa5, 0x06, 0x1e, - 0x51, 0x7c, 0xbe, 0x4f, 0x24, 0xa7, 0x20, 0xe1, 0xc0, 0x59, 0xde, 0x1a, - }; - const uint8_t kDevelopmentDAC_PublicKey_FFF1_8002[65] = { - 0x04, 0xda, 0x93, 0xf1, 0x67, 0x36, 0x25, 0x67, 0x50, 0xd9, 0x03, 0xb0, 0x34, 0xba, 0x45, 0x88, 0xab, - 0xaf, 0x58, 0x95, 0x4f, 0x77, 0xaa, 0x9f, 0xd9, 0x98, 0x9d, 0xfd, 0x40, 0x0d, 0x7a, 0xb3, 0xfd, 0xc9, - 0x75, 0x3b, 0x3b, 0x92, 0x1b, 0x29, 0x4c, 0x95, 0x0f, 0xd9, 0xd2, 0x80, 0xd1, 0x4c, 0x43, 0x86, 0x2f, - 0x16, 0xdc, 0x85, 0x4b, 0x00, 0xed, 0x39, 0xe7, 0x50, 0xba, 0xbf, 0x1d, 0xc4, 0xca, - }; - - /* Sign using the example attestation private key */ - P256ECDSASignature da_signature; - MutableByteSpan out_sig_span(da_signature.Bytes(), da_signature.Capacity()); - CHIP_ERROR err = SignWithDacKey(ByteSpan{ ecc_message, sizeof(ecc_message) }, out_sig_span); - assert(err == CHIP_NO_ERROR); - - assert(out_sig_span.size() == kP256_ECDSA_Signature_Length_Raw); - da_signature.SetLength(out_sig_span.size()); - - /* Get DAC from the provider */ - uint8_t dac_cert_buf[kMaxDERCertLength]; - MutableByteSpan dac_cert_span(dac_cert_buf); - - memcpy(dac_cert_span.data(), kDevelopmentDAC_Cert_FFF1_8002, 492); - - /* Extract public key from DAC, prior to signature verification */ - P256PublicKey dac_public_key; - err = ExtractPubkeyFromX509Cert(dac_cert_span, dac_public_key); - assert(err == CHIP_NO_ERROR); - assert(dac_public_key.Length() == 65); - assert(0 == memcmp(dac_public_key.ConstBytes(), kDevelopmentDAC_PublicKey_FFF1_8002, 65)); - - /* Verify round trip signature */ - err = dac_public_key.ECDSA_validate_msg_signature(&ecc_message[0], sizeof(ecc_message), da_signature); - assert(err == CHIP_NO_ERROR); - PRINTF("ECDSA signature validated with SUCCESS \n"); -#endif - return CHIP_NO_ERROR; -} - } // namespace DeviceLayer } // namespace chip diff --git a/src/platform/nxp/rt/rw61x/FactoryDataProviderImpl.h b/src/platform/nxp/rt/rw61x/FactoryDataProviderImpl.h index 43a759fa8ee15c..4fc4785328aaf4 100644 --- a/src/platform/nxp/rt/rw61x/FactoryDataProviderImpl.h +++ b/src/platform/nxp/rt/rw61x/FactoryDataProviderImpl.h @@ -57,12 +57,12 @@ class FactoryDataProviderImpl : public FactoryDataProvider /* TLV offset */ static constexpr uint32_t kLengthOffset = 1; static constexpr uint32_t kValueOffset = 3; - CHIP_ERROR Hash256(const uint8_t * input, size_t inputSize, uint8_t * output); - CHIP_ERROR unittest(void); CHIP_ERROR ReplaceWithBlob(uint8_t * data, uint8_t * blob, size_t blobLen, uint32_t offset); CHIP_ERROR ELS_ExportBlob(uint8_t * data, size_t * dataLen, uint32_t & offset); CHIP_ERROR ELS_ConvertDacKey(); + + CHIP_ERROR ReadAndCheckFactoryDataInFlash(void); }; inline FactoryDataProvider & FactoryDataPrvd() diff --git a/src/platform/nxp/rt/rw61x/PlatformManagerImpl.cpp b/src/platform/nxp/rt/rw61x/PlatformManagerImpl.cpp index 085a10ea5f5fa3..c17e7df36c616c 100644 --- a/src/platform/nxp/rt/rw61x/PlatformManagerImpl.cpp +++ b/src/platform/nxp/rt/rw61x/PlatformManagerImpl.cpp @@ -112,7 +112,6 @@ void PlatformManagerImpl::HardwareInit(void) CHIP_ERROR PlatformManagerImpl::ServiceInit(void) { status_t status; - hal_rng_status_t rngStatus; CHIP_ERROR chipRes = CHIP_NO_ERROR; status = CRYPTO_InitHardware(); @@ -196,9 +195,6 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) err = ServiceInit(); SuccessOrExit(err); -#ifdef SPINEL_INTERFACE_RPMSG - otPlatRadioInitSpinelInterface(); -#endif /* SPINEL_INTERFACE_RPMSG */ PLATFORM_InitOt(); /* * Initialize the RCP here: the WiFi initialization requires to enable/disable @@ -211,7 +207,7 @@ CHIP_ERROR PlatformManagerImpl::_InitChipStack(void) #endif #if CHIP_DEVICE_CONFIG_ENABLE_WPA - osError = os_setup_idle_function(chip::DeviceLayer::PlatformManagerImpl::IdleHook); + osError = OSA_SetupIdleFunction(chip::DeviceLayer::PlatformManagerImpl::IdleHook); if (osError != WM_SUCCESS) { ChipLogError(DeviceLayer, "Failed to setup idle function"); diff --git a/src/platform/nxp/rt/rw61x/args.gni b/src/platform/nxp/rt/rw61x/args.gni index 0c2d183aca8646..5561196ea3a323 100644 --- a/src/platform/nxp/rt/rw61x/args.gni +++ b/src/platform/nxp/rt/rw61x/args.gni @@ -42,12 +42,6 @@ declare_args() { # if rw610_mbedtls_port_els_pkc is set to false software mbedtls is used instead rw610_mbedtls_port_els_pkc = true - - # Enable DAC private key secure usage, chip_with_factory_data must be set to 1 - chip_enable_secure_dac_private_key_storage = 0 - - # Generate DAC private key blob for factory data, chip_enable_secure_dac_private_key_storage must be set to 1 - chip_convert_dac_private_key = 0 } # TODO : Enable the OTA Requestor by default. @@ -60,6 +54,10 @@ declare_args() { no_mcuboot = true } +# By default nxp_nvm_component is set to "littlefs" in nxp_sdk.gni, +# here we override it to set it to "nvs" for RW61x platform +nxp_nvm_component = "nvs" + mbedtls_target = "${nxp_sdk_build_root}:nxp_mbedtls" openthread_external_mbedtls = mbedtls_target diff --git a/src/platform/nxp/zephyr/ConnectivityManagerImpl.cpp b/src/platform/nxp/zephyr/ConnectivityManagerImpl.cpp index f927df2ac17480..4d183558c18953 100644 --- a/src/platform/nxp/zephyr/ConnectivityManagerImpl.cpp +++ b/src/platform/nxp/zephyr/ConnectivityManagerImpl.cpp @@ -17,11 +17,16 @@ #include +#include +#include +#include #include +#include #include -#include -#include +#ifndef CONFIG_ARCH_POSIX +#include +#endif #include @@ -34,15 +39,64 @@ #endif #if CHIP_DEVICE_CONFIG_ENABLE_THREAD +#include #include #endif -using namespace ::chip; +using namespace ::chip::Inet; using namespace ::chip::DeviceLayer::Internal; namespace chip { namespace DeviceLayer { +namespace { +CHIP_ERROR JoinLeaveMulticastGroup(net_if * iface, const Inet::IPAddress & address, + UDPEndPointImplSockets::MulticastOperation operation) +{ +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD + if (net_if_l2(iface) == &NET_L2_GET_NAME(OPENTHREAD)) + { + const otIp6Address otAddress = ToOpenThreadIP6Address(address); + const auto handler = operation == UDPEndPointImplSockets::MulticastOperation::kJoin ? otIp6SubscribeMulticastAddress + : otIp6UnsubscribeMulticastAddress; + otError error; + + ThreadStackMgr().LockThreadStack(); + error = handler(openthread_get_default_instance(), &otAddress); + ThreadStackMgr().UnlockThreadStack(); + + return MapOpenThreadError(error); + } +#endif + +#if CHIP_DEVICE_CONFIG_ENABLE_WIFI + // The following code should also be valid for other interface types, such as Ethernet, + // but they are not officially supported, so for now enable it for Wi-Fi only. + const in6_addr in6Addr = InetUtils::ToZephyrAddr(address); + + if (operation == UDPEndPointImplSockets::MulticastOperation::kJoin) + { + net_if_mcast_addr * maddr = net_if_ipv6_maddr_add(iface, &in6Addr); + + if (maddr && !net_if_ipv6_maddr_is_joined(maddr)) + { + net_if_ipv6_maddr_join(iface, maddr); + } + } + else if (operation == UDPEndPointImplSockets::MulticastOperation::kLeave) + { + VerifyOrReturnError(net_if_ipv6_maddr_rm(iface, &in6Addr), CHIP_ERROR_INVALID_ADDRESS); + } + else + { + return CHIP_ERROR_INCORRECT_STATE; + } +#endif + + return CHIP_NO_ERROR; +} +} // namespace + ConnectivityManagerImpl ConnectivityManagerImpl::sInstance; CHIP_ERROR ConnectivityManagerImpl::_Init() @@ -53,6 +107,28 @@ CHIP_ERROR ConnectivityManagerImpl::_Init() #if CHIP_DEVICE_CONFIG_ENABLE_WIFI ReturnErrorOnFailure(InitWiFi()); #endif + +#if CHIP_DEVICE_CONFIG_ENABLE_THREAD || CHIP_DEVICE_CONFIG_ENABLE_WIFI + UDPEndPointImplSockets::SetMulticastGroupHandler( + [](InterfaceId interfaceId, const IPAddress & address, UDPEndPointImplSockets::MulticastOperation operation) { + if (interfaceId.IsPresent()) + { + net_if * iface = InetUtils::GetInterface(interfaceId); + VerifyOrReturnError(iface != nullptr, INET_ERROR_UNKNOWN_INTERFACE); + + return JoinLeaveMulticastGroup(iface, address, operation); + } + + // If the interface is not specified, join or leave the multicast group on all interfaces. + for (int i = 1; net_if * iface = net_if_get_by_index(i); i++) + { + ReturnErrorOnFailure(JoinLeaveMulticastGroup(iface, address, operation)); + } + + return CHIP_NO_ERROR; + }); +#endif // CHIP_DEVICE_CONFIG_ENABLE_THREAD || CHIP_DEVICE_CONFIG_ENABLE_WIFI + return CHIP_NO_ERROR; } diff --git a/src/platform/silabs/BLEManagerImpl.h b/src/platform/silabs/BLEManagerImpl.h index 86d1b05a887869..4ff6d9d85413bf 100644 --- a/src/platform/silabs/BLEManagerImpl.h +++ b/src/platform/silabs/BLEManagerImpl.h @@ -196,7 +196,7 @@ class BLEManagerImpl final : public BLEManager, private BleLayer, private BlePla void CancelBleAdvTimeoutTimer(void); CHIPoBLEConState * GetConnectionState(uint8_t conId, bool allocate = false); static void DriveBLEState(intptr_t arg); - static void BleAdvTimeoutHandler(TimerHandle_t xTimer); + static void BleAdvTimeoutHandler(void * arg); uint8_t GetTimerHandle(uint8_t connectionHandle, bool allocate); #if (SLI_SI91X_ENABLE_BLE || RSI_BLE_ENABLE) diff --git a/src/platform/silabs/CHIPDevicePlatformConfig.h b/src/platform/silabs/CHIPDevicePlatformConfig.h index 091940bff31291..010d72ebb887eb 100644 --- a/src/platform/silabs/CHIPDevicePlatformConfig.h +++ b/src/platform/silabs/CHIPDevicePlatformConfig.h @@ -130,7 +130,11 @@ // ========== Platform-specific Configuration Overrides ========= #ifndef CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE +#if SLI_SI91X_MCU_INTERFACE +#define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE (7 * 1024) +#else #define CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE (6 * 1024) +#endif #endif // CHIP_DEVICE_CONFIG_CHIP_TASK_STACK_SIZE #ifndef CHIP_DEVICE_CONFIG_THREAD_TASK_STACK_SIZE diff --git a/src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp b/src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp index 574bde208a427c..b5a9c1eb56a3f8 100644 --- a/src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp +++ b/src/platform/silabs/ConnectivityManagerImpl_WIFI.cpp @@ -359,18 +359,7 @@ void ConnectivityManagerImpl::OnStationConnected() { wfx_setup_ip6_link_local(SL_WFX_STA_INTERFACE); NetworkCommissioning::SlWiFiDriver::GetInstance().OnConnectWiFiNetwork(); - // Setting the rs911x in the power save mode -#if (CHIP_CONFIG_ENABLE_ICD_SERVER && RS911X_WIFI) -#if SLI_SI917 - sl_status_t err = wfx_power_save(RSI_SLEEP_MODE_2, ASSOCIATED_POWER_SAVE); -#else - sl_status_t err = wfx_power_save(); -#endif /* SLI_SI917 */ - if (err != SL_STATUS_OK) - { - ChipLogError(DeviceLayer, "Power save config for Wifi failed"); - } -#endif /* CHIP_CONFIG_ENABLE_ICD_SERVER && RS911X_WIFI */ + UpdateInternetConnectivityState(); // Alert other components of the new state. ChipDeviceEvent event; diff --git a/src/platform/silabs/efr32/BLEManagerImpl.cpp b/src/platform/silabs/efr32/BLEManagerImpl.cpp index 2fcceefa37b90a..e29e34e31af16e 100644 --- a/src/platform/silabs/efr32/BLEManagerImpl.cpp +++ b/src/platform/silabs/efr32/BLEManagerImpl.cpp @@ -101,7 +101,7 @@ namespace { #define BLE_CONFIG_MIN_CE_LENGTH (0) // Leave to min value #define BLE_CONFIG_MAX_CE_LENGTH (0xFFFF) // Leave to max value -TimerHandle_t sbleAdvTimeoutTimer; // FreeRTOS sw timer. +osTimerId_t sbleAdvTimeoutTimer; // SW timer const uint8_t UUID_CHIPoBLEService[] = { 0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0xF6, 0xFF, 0x00, 0x00 }; @@ -122,13 +122,8 @@ CHIP_ERROR BLEManagerImpl::_Init() memset(mIndConfId, kUnusedIndex, sizeof(mIndConfId)); mServiceMode = ConnectivityManager::kCHIPoBLEServiceMode_Enabled; - // Create FreeRTOS sw timer for BLE timeouts and interval change. - sbleAdvTimeoutTimer = xTimerCreate("BleAdvTimer", // Just a text name, not used by the RTOS kernel - pdMS_TO_TICKS(1), // == default timer period - false, // no timer reload (==one-shot) - (void *) this, // init timer id = ble obj context - BleAdvTimeoutHandler // timer callback handler - ); + // SW timer for BLE timeouts and interval change. + sbleAdvTimeoutTimer = osTimerNew(BleAdvTimeoutHandler, osTimerOnce, NULL, NULL); mFlags.ClearAll().Set(Flags::kAdvertisingEnabled, CHIP_DEVICE_CONFIG_CHIPOBLE_ENABLE_ADVERTISING_AUTOSTART); mFlags.Set(Flags::kFastAdvertisingEnabled, true); @@ -991,7 +986,7 @@ uint8_t BLEManagerImpl::GetTimerHandle(uint8_t connectionHandle, bool allocate) return freeIndex; } -void BLEManagerImpl::BleAdvTimeoutHandler(TimerHandle_t xTimer) +void BLEManagerImpl::BleAdvTimeoutHandler(void * arg) { if (BLEMgrImpl().mFlags.Has(Flags::kFastAdvertisingEnabled)) { @@ -1016,7 +1011,7 @@ void BLEManagerImpl::BleAdvTimeoutHandler(TimerHandle_t xTimer) void BLEManagerImpl::CancelBleAdvTimeoutTimer(void) { - if (xTimerStop(sbleAdvTimeoutTimer, pdMS_TO_TICKS(0)) == pdFAIL) + if (osTimerStop(sbleAdvTimeoutTimer) != osOK) { ChipLogError(DeviceLayer, "Failed to stop BledAdv timeout timer"); } @@ -1024,15 +1019,7 @@ void BLEManagerImpl::CancelBleAdvTimeoutTimer(void) void BLEManagerImpl::StartBleAdvTimeoutTimer(uint32_t aTimeoutInMs) { - if (xTimerIsTimerActive(sbleAdvTimeoutTimer)) - { - CancelBleAdvTimeoutTimer(); - } - - // timer is not active, change its period to required value (== restart). - // FreeRTOS- Block for a maximum of 100 ticks if the change period command - // cannot immediately be sent to the timer command queue. - if (xTimerChangePeriod(sbleAdvTimeoutTimer, pdMS_TO_TICKS(aTimeoutInMs), pdMS_TO_TICKS(100)) != pdPASS) + if (osTimerStart(sbleAdvTimeoutTimer, pdMS_TO_TICKS(aTimeoutInMs)) != osOK) { ChipLogError(DeviceLayer, "Failed to start BledAdv timeout timer"); } diff --git a/src/platform/silabs/efr32/BUILD.gn b/src/platform/silabs/efr32/BUILD.gn index a71a0cd8b335e6..177cfc01fa33fe 100644 --- a/src/platform/silabs/efr32/BUILD.gn +++ b/src/platform/silabs/efr32/BUILD.gn @@ -166,8 +166,7 @@ static_library("efr32") { if (use_wf200 || use_rs9116 || use_SiWx917) { sources += [ - "wifi/dhcp_client.cpp", - "wifi/dhcp_client.h", + "${silabs_platform_dir}/wifi/dhcp_client.cpp", "wifi/ethernetif.cpp", "wifi/ethernetif.h", "wifi/lwip_netif.cpp", diff --git a/src/platform/silabs/efr32/wifi/dhcp_client.cpp b/src/platform/silabs/efr32/wifi/dhcp_client.cpp deleted file mode 100644 index c2a46d61dd6805..00000000000000 --- a/src/platform/silabs/efr32/wifi/dhcp_client.cpp +++ /dev/null @@ -1,150 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if LWIP_IPV4 && LWIP_DHCP - -#include -#include -#include - -#include "em_bus.h" -#include "em_cmu.h" -#include "em_gpio.h" -#include "em_ldma.h" -#include "em_usart.h" - -#include "dhcp_client.h" -#include "lwip/dhcp.h" -#include "wfx_host_events.h" -#include "wifi_config.h" - -#include "FreeRTOS.h" -#include "event_groups.h" - -#include - -#define MAX_DHCP_TRIES 4 -#define NETIF_IPV4_ADDRESS(X, Y) (((X) >> (8 * Y)) & 0xFF) - -/* Station IP address */ -uint8_t sta_ip_addr0 = STA_IP_ADDR0_DEFAULT; -uint8_t sta_ip_addr1 = STA_IP_ADDR1_DEFAULT; -uint8_t sta_ip_addr2 = STA_IP_ADDR2_DEFAULT; -uint8_t sta_ip_addr3 = STA_IP_ADDR3_DEFAULT; -uint8_t sta_netmask_addr0 = STA_NETMASK_ADDR0_DEFAULT; -uint8_t sta_netmask_addr1 = STA_NETMASK_ADDR1_DEFAULT; -uint8_t sta_netmask_addr2 = STA_NETMASK_ADDR2_DEFAULT; -uint8_t sta_netmask_addr3 = STA_NETMASK_ADDR3_DEFAULT; -uint8_t sta_gw_addr0 = STA_GW_ADDR0_DEFAULT; -uint8_t sta_gw_addr1 = STA_GW_ADDR1_DEFAULT; -uint8_t sta_gw_addr2 = STA_GW_ADDR2_DEFAULT; -uint8_t sta_gw_addr3 = STA_GW_ADDR3_DEFAULT; - -/// Current DHCP state machine state. -static volatile uint8_t dhcp_state = DHCP_OFF; - -/***************************************************************************** - * @fn void dhcpclient_set_link_state(int link_up) - * @brief - * Notify DHCP client task about the wifi status - * @param link_up link status - * @return None - ******************************************************************************/ -void dhcpclient_set_link_state(int link_up) -{ - if (link_up) - { - dhcp_state = DHCP_START; - ChipLogProgress(DeviceLayer, "DHCP: Starting"); - } - else - { - /* Update DHCP state machine */ - dhcp_state = DHCP_LINK_DOWN; - } -} - -/********************************************************************************** - * @fn uint8_t dhcpclient_poll(void *arg) - * @brief - * Don't need a task here. We get polled every 250ms - * @return None - ************************************************************************************/ -uint8_t dhcpclient_poll(void * arg) -{ - struct netif * netif = (struct netif *) arg; - ip_addr_t ipaddr; - ip_addr_t netmask; - ip_addr_t gw; - struct dhcp * dhcp; - - switch (dhcp_state) - { - case DHCP_START: - ChipLogProgress(DeviceLayer, "DHCP: Wait addr"); - ip_addr_set_zero_ip4(&netif->ip_addr); - ip_addr_set_zero_ip4(&netif->netmask); - ip_addr_set_zero_ip4(&netif->gw); - dhcp_start(netif); - dhcp_state = DHCP_WAIT_ADDRESS; - break; - - case DHCP_WAIT_ADDRESS: - if (dhcp_supplied_address(netif)) - { - dhcp_state = DHCP_ADDRESS_ASSIGNED; - - uint64_t addr = netif->ip_addr.u_addr.ip4.addr; - ChipLogProgress(DeviceLayer, "DHCP IP: %d.%d.%d.%d", NETIF_IPV4_ADDRESS(addr, 0), NETIF_IPV4_ADDRESS(addr, 1), - NETIF_IPV4_ADDRESS(addr, 2), NETIF_IPV4_ADDRESS(addr, 3)); - } - else - { - dhcp = (struct dhcp *) netif_get_client_data(netif, LWIP_NETIF_CLIENT_DATA_INDEX_DHCP); - - /* DHCP timeout */ - if (dhcp->tries > MAX_DHCP_TRIES) - { - dhcp_state = DHCP_TIMEOUT; - - ChipLogProgress(DeviceLayer, "*ERR*DHCP: Failed"); - /* Stop DHCP */ - dhcp_stop(netif); - - /* TODO - I am not sure that this is best */ - /* Static address used */ - IP_ADDR4(&ipaddr, sta_ip_addr0, sta_ip_addr1, sta_ip_addr2, sta_ip_addr3); - IP_ADDR4(&netmask, sta_netmask_addr0, sta_netmask_addr1, sta_netmask_addr2, sta_netmask_addr3); - IP_ADDR4(&gw, sta_gw_addr0, sta_gw_addr1, sta_gw_addr2, sta_gw_addr3); - netif_set_addr(netif, ip_2_ip4(&ipaddr), ip_2_ip4(&netmask), ip_2_ip4(&gw)); - } - } - break; - - case DHCP_LINK_DOWN: - /* Stop DHCP */ - ChipLogProgress(DeviceLayer, "*ERR*DHCP Link down"); - dhcp_stop(netif); - dhcp_state = DHCP_OFF; - break; - default: - break; - } - return dhcp_state; -} - -#endif /* LWIP_IPV4 && LWIP_DHCP */ diff --git a/src/platform/silabs/efr32/wifi/dhcp_client.h b/src/platform/silabs/efr32/wifi/dhcp_client.h deleted file mode 100644 index 4ee9d2f5d0d68d..00000000000000 --- a/src/platform/silabs/efr32/wifi/dhcp_client.h +++ /dev/null @@ -1,45 +0,0 @@ -/* - * - * Copyright (c) 2022 Project CHIP Authors - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#if LWIP_IPV4 && LWIP_DHCP - -#pragma once -#ifdef __cplusplus -extern "C" { -#endif - -// DHCP client states -#define DHCP_OFF ((uint8_t) 0) -#define DHCP_START ((uint8_t) 1) -#define DHCP_WAIT_ADDRESS ((uint8_t) 2) -#define DHCP_ADDRESS_ASSIGNED ((uint8_t) 3) -#define DHCP_TIMEOUT ((uint8_t) 4) -#define DHCP_LINK_DOWN ((uint8_t) 5) - -/***************************************************************************** - * @fn void dhcpclient_set_link_state(int link_up) - * @brief - * Notify DHCP client task about the wifi status - * @param link_up link status - ******************************************************************************/ -void dhcpclient_set_link_state(int link_up); -uint8_t dhcpclient_poll(void * arg); -#ifdef __cplusplus -} -#endif - -#endif /* LWIP_IPV4 && LWIP_DHCP */ diff --git a/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp b/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp index 0bddafd96506f9..053b30cc8619f4 100644 --- a/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp +++ b/src/platform/silabs/platformAbstraction/WiseMcuSpam.cpp @@ -46,6 +46,10 @@ void soc_pll_config(void); #include "SEGGER_SYSVIEW.h" #endif +#if SILABS_LOG_OUT_UART || ENABLE_CHIP_SHELL +#include "uart.h" +#endif + namespace chip { namespace DeviceLayer { namespace Silabs { @@ -75,6 +79,10 @@ CHIP_ERROR SilabsPlatform::Init(void) silabsInitLog(); #endif +#if SILABS_LOG_OUT_UART || ENABLE_CHIP_SHELL + uartConsoleInit(); +#endif + #ifdef SL_CATALOG_SYSTEMVIEW_TRACE_PRESENT SEGGER_SYSVIEW_Conf(); #endif diff --git a/src/platform/silabs/rs911x/BLEManagerImpl.cpp b/src/platform/silabs/rs911x/BLEManagerImpl.cpp index 17047186eaf7fd..6fea061de76ab8 100644 --- a/src/platform/silabs/rs911x/BLEManagerImpl.cpp +++ b/src/platform/silabs/rs911x/BLEManagerImpl.cpp @@ -62,8 +62,8 @@ extern "C" { #include #endif -#define BLE_MIN_CONNECTION_INTERVAL_MS 45 -#define BLE_MAX_CONNECTION_INTERVAL_MS 45 +#define BLE_MIN_CONNECTION_INTERVAL_MS 24 +#define BLE_MAX_CONNECTION_INTERVAL_MS 40 #define BLE_SLAVE_LATENCY_MS 0 #define BLE_TIMEOUT_MS 400 #define BLE_DEFAULT_TIMER_PERIOD_MS (1) @@ -71,13 +71,22 @@ extern "C" { extern sl_wfx_msg_t event_msg; -StaticTask_t rsiBLETaskStruct; - osSemaphoreId_t sl_ble_event_sem; osSemaphoreId_t sl_rs_ble_init_sem; -/* wfxRsi Task will use as its stack */ -StackType_t wfxBLETaskStack[WFX_RSI_TASK_SZ] = { 0 }; +osTimerId_t sbleAdvTimeoutTimer; + +static osThreadId_t sBleThread; +constexpr uint32_t kBleTaskSize = 2048; +static uint8_t bleStack[kBleTaskSize]; +static osThread_t sBleTaskControlBlock; +constexpr osThreadAttr_t kBleTaskAttr = { .name = "rsi_ble", + .attr_bits = osThreadDetached, + .cb_mem = &sBleTaskControlBlock, + .cb_size = osThreadCbSize, + .stack_mem = bleStack, + .stack_size = kBleTaskSize, + .priority = osPriorityHigh }; using namespace ::chip; using namespace ::chip::Ble; @@ -110,7 +119,7 @@ void sl_ble_init() chip::DeviceLayer::Internal::BLEMgrImpl().HandleBootEvent(); } -void sl_ble_event_handling_task(void) +void sl_ble_event_handling_task(void * args) { int32_t event_id; @@ -236,8 +245,6 @@ namespace { #define BLE_CONFIG_MIN_CE_LENGTH (0) // Leave to min value #define BLE_CONFIG_MAX_CE_LENGTH (0xFFFF) // Leave to max value -TimerHandle_t sbleAdvTimeoutTimer; // FreeRTOS sw timer. - const uint8_t UUID_CHIPoBLEService[] = { 0xFB, 0x34, 0x9B, 0x5F, 0x80, 0x00, 0x00, 0x80, 0x00, 0x10, 0x00, 0x00, 0xF6, 0xFF, 0x00, 0x00 }; const uint8_t ShortUUID_CHIPoBLEService[] = { 0xF6, 0xFF }; @@ -253,13 +260,9 @@ CHIP_ERROR BLEManagerImpl::_Init() sl_rs_ble_init_sem = osSemaphoreNew(1, 0, NULL); sl_ble_event_sem = osSemaphoreNew(1, 0, NULL); - wfx_rsi.ble_task = xTaskCreateStatic((TaskFunction_t) sl_ble_event_handling_task, "rsi_ble", WFX_RSI_TASK_SZ, NULL, - BLE_DRIVER_TASK_PRIORITY, wfxBLETaskStack, &rsiBLETaskStruct); + sBleThread = osThreadNew(sl_ble_event_handling_task, NULL, &kBleTaskAttr); - if (wfx_rsi.ble_task == NULL) - { - ChipLogError(DeviceLayer, "%s: error: failed to create ble task.", __func__); - } + VerifyOrReturnError(sBleThread != nullptr, CHIP_ERROR_INCORRECT_STATE); // Initialize the CHIP BleLayer. err = BleLayer::Init(this, this, &DeviceLayer::SystemLayer()); @@ -269,13 +272,8 @@ CHIP_ERROR BLEManagerImpl::_Init() memset(mIndConfId, kUnusedIndex, sizeof(mIndConfId)); mServiceMode = ConnectivityManager::kCHIPoBLEServiceMode_Enabled; - // Create FreeRTOS sw timer for BLE timeouts and interval change. - sbleAdvTimeoutTimer = xTimerCreate("BleAdvTimer", // Just a text name, not used by the RTOS kernel - pdMS_TO_TICKS(BLE_DEFAULT_TIMER_PERIOD_MS), // == default timer period - false, // no timer reload (==one-shot) - (void *) this, // init timer id = ble obj context - BleAdvTimeoutHandler // timer callback handler - ); + // SW timer for BLE timeouts and interval change. + sbleAdvTimeoutTimer = osTimerNew(BleAdvTimeoutHandler, osTimerOnce, NULL, NULL); mFlags.ClearAll().Set(Flags::kAdvertisingEnabled, CHIP_DEVICE_CONFIG_CHIPOBLE_ENABLE_ADVERTISING_AUTOSTART); mFlags.Set(Flags::kFastAdvertisingEnabled, true); @@ -1070,7 +1068,7 @@ uint8_t BLEManagerImpl::GetTimerHandle(uint8_t connectionHandle, bool allocate) return freeIndex; } -void BLEManagerImpl::BleAdvTimeoutHandler(TimerHandle_t xTimer) +void BLEManagerImpl::BleAdvTimeoutHandler(void * arg) { if (BLEMgrImpl().mFlags.Has(Flags::kFastAdvertisingEnabled)) { @@ -1081,7 +1079,7 @@ void BLEManagerImpl::BleAdvTimeoutHandler(TimerHandle_t xTimer) void BLEManagerImpl::CancelBleAdvTimeoutTimer(void) { - if (xTimerStop(sbleAdvTimeoutTimer, pdMS_TO_TICKS(0)) == pdFAIL) + if (osTimerStop(sbleAdvTimeoutTimer) != osOK) { ChipLogError(DeviceLayer, "Failed to stop BledAdv timeout timer"); } @@ -1089,15 +1087,7 @@ void BLEManagerImpl::CancelBleAdvTimeoutTimer(void) void BLEManagerImpl::StartBleAdvTimeoutTimer(uint32_t aTimeoutInMs) { - if (xTimerIsTimerActive(sbleAdvTimeoutTimer)) - { - CancelBleAdvTimeoutTimer(); - } - - // timer is not active, change its period to required value (== restart). - // FreeRTOS- Block for a maximum of 100 ticks if the change period command - // cannot immediately be sent to the timer command queue. - if (xTimerChangePeriod(sbleAdvTimeoutTimer, pdMS_TO_TICKS(aTimeoutInMs), pdMS_TO_TICKS(100)) != pdPASS) + if (osTimerStart(sbleAdvTimeoutTimer, pdMS_TO_TICKS(aTimeoutInMs)) != osOK) { ChipLogError(DeviceLayer, "Failed to start BledAdv timeout timer"); } diff --git a/src/platform/silabs/SiWx917/wifi/dhcp_client.cpp b/src/platform/silabs/wifi/dhcp_client.cpp similarity index 94% rename from src/platform/silabs/SiWx917/wifi/dhcp_client.cpp rename to src/platform/silabs/wifi/dhcp_client.cpp index 2ffc45d491ac66..c8b47a9f2b3735 100644 --- a/src/platform/silabs/SiWx917/wifi/dhcp_client.cpp +++ b/src/platform/silabs/wifi/dhcp_client.cpp @@ -101,10 +101,6 @@ uint8_t dhcpclient_poll(void * arg) if (dhcp_supplied_address(netif)) { dhcp_state = DHCP_ADDRESS_ASSIGNED; - - uint64_t addr = netif->ip_addr.u_addr.ip4.addr; - ChipLogProgress(DeviceLayer, "DHCP IP: %d.%d.%d.%d", NETIF_IPV4_ADDRESS(addr, 0), NETIF_IPV4_ADDRESS(addr, 1), - NETIF_IPV4_ADDRESS(addr, 2), NETIF_IPV4_ADDRESS(addr, 3)); } else { diff --git a/src/platform/silabs/SiWx917/wifi/dhcp_client.h b/src/platform/silabs/wifi/dhcp_client.h similarity index 100% rename from src/platform/silabs/SiWx917/wifi/dhcp_client.h rename to src/platform/silabs/wifi/dhcp_client.h diff --git a/src/platform/telink/OTAImageProcessorImpl.cpp b/src/platform/telink/OTAImageProcessorImpl.cpp index b5649820dace72..b1ce54748e268e 100644 --- a/src/platform/telink/OTAImageProcessorImpl.cpp +++ b/src/platform/telink/OTAImageProcessorImpl.cpp @@ -29,6 +29,22 @@ static struct stream_flash_ctx stream; namespace chip { +namespace { + +void PostOTAStateChangeEvent(DeviceLayer::OtaState newState) +{ + DeviceLayer::ChipDeviceEvent otaChange; + otaChange.Type = DeviceLayer::DeviceEventType::kOtaStateChanged; + otaChange.OtaStateChanged.newState = newState; + CHIP_ERROR error = DeviceLayer::PlatformMgr().PostEvent(&otaChange); + + if (error != CHIP_NO_ERROR) + { + ChipLogError(SoftwareUpdate, "Error while posting OtaChange event %" CHIP_ERROR_FORMAT, error.Format()); + } +} +} // namespace + namespace DeviceLayer { CHIP_ERROR OTAImageProcessorImpl::PrepareDownload() @@ -60,6 +76,7 @@ CHIP_ERROR OTAImageProcessorImpl::PrepareDownloadImpl() ChipLogError(SoftwareUpdate, "stream_flash_init failed (err %d)", err); } + PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadInProgress); return System::MapErrorZephyr(err); } @@ -72,13 +89,14 @@ CHIP_ERROR OTAImageProcessorImpl::Finalize() ChipLogError(SoftwareUpdate, "stream_flash_buffered_write failed (err %d)", err); } + PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadComplete); return System::MapErrorZephyr(err); } CHIP_ERROR OTAImageProcessorImpl::Abort() { ChipLogError(SoftwareUpdate, "Image upgrade aborted"); - + PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadAborted); return CHIP_NO_ERROR; } @@ -87,6 +105,7 @@ CHIP_ERROR OTAImageProcessorImpl::Apply() // Schedule update of image int err = boot_request_upgrade(BOOT_UPGRADE_PERMANENT); + PostOTAStateChangeEvent(DeviceLayer::kOtaApplyInProgress); #ifdef CONFIG_CHIP_OTA_REQUESTOR_REBOOT_ON_APPLY if (!err) { @@ -101,6 +120,7 @@ CHIP_ERROR OTAImageProcessorImpl::Apply() } else { + PostOTAStateChangeEvent(DeviceLayer::kOtaApplyFailed); return System::MapErrorZephyr(err); } #else @@ -131,6 +151,7 @@ CHIP_ERROR OTAImageProcessorImpl::ProcessBlock(ByteSpan & aBlock) else { mDownloader->EndDownload(error); + PostOTAStateChangeEvent(DeviceLayer::kOtaDownloadFailed); } }); } @@ -149,6 +170,7 @@ bool OTAImageProcessorImpl::IsFirstImageRun() CHIP_ERROR OTAImageProcessorImpl::ConfirmCurrentImage() { + PostOTAStateChangeEvent(DeviceLayer::kOtaApplyComplete); return System::MapErrorZephyr(boot_write_img_confirmed()); } diff --git a/src/platform/telink/tlsr9258a_2m_flash.overlay b/src/platform/telink/tlsr9258a_2m_flash.overlay deleted file mode 120000 index 3b425c1198b983..00000000000000 --- a/src/platform/telink/tlsr9258a_2m_flash.overlay +++ /dev/null @@ -1 +0,0 @@ -tlsr9518adk80d_2m_flash.overlay \ No newline at end of file diff --git a/src/platform/telink/tlsr9258a_2m_flash.overlay b/src/platform/telink/tlsr9258a_2m_flash.overlay new file mode 100644 index 00000000000000..a87ebba57e874b --- /dev/null +++ b/src/platform/telink/tlsr9258a_2m_flash.overlay @@ -0,0 +1,36 @@ +&flash { + reg = <0x20000000 0x200000>; + + partitions { + /delete-node/ partition@0; + /delete-node/ partition@20000; + /delete-node/ partition@88000; + /delete-node/ partition@f0000; + /delete-node/ partition@f4000; + /delete-node/ partition@fe000; + boot_partition: partition@0 { + label = "mcuboot"; + reg = <0x00000000 0x13000>; + }; + slot0_partition: partition@13000 { + label = "image-0"; + reg = <0x13000 0xef000>; + }; + factory_partition: partition@102000 { + label = "factory-data"; + reg = <0x102000 0x1000>; + }; + storage_partition: partition@103000 { + label = "storage"; + reg = <0x103000 0xc000>; + }; + slot1_partition: partition@10f000 { + label = "image-1"; + reg = <0x10f000 0xef000>; + }; + vendor_partition: partition@1fe000 { + label = "vendor-data"; + reg = <0x1fe000 0x2000>; + }; + }; +}; diff --git a/src/platform/webos/CHIPWebOSStorageIni.cpp b/src/platform/webos/CHIPWebOSStorageIni.cpp index 96a3002f1afeea..cec712da8f2495 100644 --- a/src/platform/webos/CHIPWebOSStorageIni.cpp +++ b/src/platform/webos/CHIPWebOSStorageIni.cpp @@ -30,6 +30,7 @@ #include #include #include +#include #include #include #include @@ -70,38 +71,23 @@ CHIP_ERROR ChipLinuxStorageIni::AddConfig(const std::string & configFile) // 3. Using rename() to overwrite the existing file CHIP_ERROR ChipLinuxStorageIni::CommitConfig(const std::string & configFile) { - CHIP_ERROR retval = CHIP_NO_ERROR; - std::string tmpPath = configFile + "-XXXXXX"; - - int fd = mkstemp(&tmpPath[0]); - if (fd != -1) - { - std::ofstream ofs; - - ChipLogProgress(DeviceLayer, "writing settings to file (%s)", tmpPath.c_str()); - - ofs.open(tmpPath, std::ofstream::out | std::ofstream::trunc); - mConfigStore.generate(ofs); - - close(fd); - - if (rename(tmpPath.c_str(), configFile.c_str()) == 0) - { - ChipLogProgress(DeviceLayer, "renamed tmp file to file (%s)", configFile.c_str()); - } - else - { - ChipLogError(DeviceLayer, "failed to rename (%s), %s (%d)", tmpPath.c_str(), strerror(errno), errno); - retval = CHIP_ERROR_WRITE_FAILED; - } - } - else - { - ChipLogError(DeviceLayer, "failed to open file (%s) for writing", tmpPath.c_str()); - retval = CHIP_ERROR_OPEN_FAILED; - } - - return retval; + TemporaryFileStream tmpFile(configFile + "-XXXXXX"); + VerifyOrReturnError( + tmpFile.IsOpen(), CHIP_ERROR_OPEN_FAILED, + ChipLogError(DeviceLayer, "Failed to create temp file %s: %s", tmpFile.GetFileName().c_str(), strerror(errno))); + + mConfigStore.generate(tmpFile); + VerifyOrReturnError( + tmpFile.DataSync(), CHIP_ERROR_WRITE_FAILED, + ChipLogError(DeviceLayer, "Failed to sync temp file %s: %s", tmpFile.GetFileName().c_str(), strerror(errno))); + + int rv = rename(tmpFile.GetFileName().c_str(), configFile.c_str()); + VerifyOrReturnError(rv == 0, CHIP_ERROR_WRITE_FAILED, + ChipLogError(DeviceLayer, "Failed to rename %s to %s: %s", tmpFile.GetFileName().c_str(), + configFile.c_str(), strerror(errno))); + + ChipLogDetail(DeviceLayer, "Wrote settings to %s", configFile.c_str()); + return CHIP_NO_ERROR; } CHIP_ERROR ChipLinuxStorageIni::GetUInt16Value(const char * key, uint16_t & val) diff --git a/src/protocols/bdx/BdxTransferDiagnosticLog.cpp b/src/protocols/bdx/BdxTransferDiagnosticLog.cpp index 51e56fba9ac254..4804a01c578c26 100644 --- a/src/protocols/bdx/BdxTransferDiagnosticLog.cpp +++ b/src/protocols/bdx/BdxTransferDiagnosticLog.cpp @@ -18,6 +18,8 @@ #include "BdxTransferDiagnosticLog.h" +#include + namespace chip { namespace bdx { @@ -201,5 +203,23 @@ void BdxTransferDiagnosticLog::OnExchangeClosing(Messaging::ExchangeContext * ec LogErrorOnFailure(OnTransferSessionEnd(CHIP_ERROR_INTERNAL)); } +bool BdxTransferDiagnosticLog::IsForFabric(FabricIndex fabricIndex) const +{ + if (mExchangeCtx == nullptr || !mExchangeCtx->HasSessionHandle()) + { + return false; + } + + auto session = mExchangeCtx->GetSessionHandle(); + return session->GetFabricIndex() == fabricIndex; +} + +void BdxTransferDiagnosticLog::AbortTransfer() +{ + // No need to mTransfer.AbortTransfer() here, since that just tries to async + // send a StatusReport to the other side, but we are going away here. + Reset(); +} + } // namespace bdx } // namespace chip diff --git a/src/protocols/bdx/BdxTransferDiagnosticLog.h b/src/protocols/bdx/BdxTransferDiagnosticLog.h index bc7a8773cd2dff..0f62aff7f837e5 100644 --- a/src/protocols/bdx/BdxTransferDiagnosticLog.h +++ b/src/protocols/bdx/BdxTransferDiagnosticLog.h @@ -18,14 +18,17 @@ #pragma once -#include +#include #include +#include #include #include namespace chip { namespace bdx { +class BdxTransferDiagnosticLogPoolDelegate; + class BdxTransferDiagnosticLog : public Responder { public: @@ -45,6 +48,13 @@ class BdxTransferDiagnosticLog : public Responder void OnExchangeClosing(Messaging::ExchangeContext * ec) override; + /** + * Lifetime management, to allow us to abort transfers when a fabric + * identity is being shut down. + */ + bool IsForFabric(FabricIndex fabricIndex) const; + void AbortTransfer(); + protected: /** * Called when a BDX message is received over the exchange context diff --git a/src/protocols/bdx/BdxTransferDiagnosticLogPool.h b/src/protocols/bdx/BdxTransferDiagnosticLogPool.h index a2d7d3f5d11105..70f8fdfaceb55a 100644 --- a/src/protocols/bdx/BdxTransferDiagnosticLogPool.h +++ b/src/protocols/bdx/BdxTransferDiagnosticLogPool.h @@ -18,15 +18,15 @@ #pragma once +#include #include +#include #include #include namespace chip { namespace bdx { -class BdxTransferDiagnosticLog; - class BdxTransferDiagnosticLogPoolDelegate { public: @@ -50,6 +50,17 @@ class BdxTransferDiagnosticLogPool : public BdxTransferDiagnosticLogPoolDelegate void Release(BdxTransferDiagnosticLog * transfer) override { mTransferPool.ReleaseObject(transfer); } + void AbortTransfersForFabric(FabricIndex fabricIndex) + { + mTransferPool.ForEachActiveObject([fabricIndex](BdxTransferDiagnosticLog * transfer) { + if (transfer->IsForFabric(fabricIndex)) + { + transfer->AbortTransfer(); + } + return Loop::Continue; + }); + } + private: ObjectPool mTransferPool; }; diff --git a/src/protocols/bdx/BdxTransferServer.h b/src/protocols/bdx/BdxTransferServer.h index 0fac0e88b672de..0bc3cf10e124e9 100644 --- a/src/protocols/bdx/BdxTransferServer.h +++ b/src/protocols/bdx/BdxTransferServer.h @@ -20,6 +20,7 @@ #include +#include #include #include #include @@ -42,6 +43,8 @@ class BDXTransferServer : public Messaging::UnsolicitedMessageHandler void SetDelegate(BDXTransferServerDelegate * delegate) { mDelegate = delegate; } + void AbortTransfersForFabric(FabricIndex fabricIndex) { mPoolDelegate.AbortTransfersForFabric(fabricIndex); } + protected: CHIP_ERROR OnUnsolicitedMessageReceived(const PayloadHeader & payloadHeader, Messaging::ExchangeDelegate *& newDelegate) override; diff --git a/src/protocols/bdx/BdxTransferSession.cpp b/src/protocols/bdx/BdxTransferSession.cpp index 99588f0770a72e..0a513d7ea77460 100644 --- a/src/protocols/bdx/BdxTransferSession.cpp +++ b/src/protocols/bdx/BdxTransferSession.cpp @@ -134,6 +134,11 @@ void TransferSession::PollOutput(OutputEvent & event, System::Clock::Timestamp c mPendingOutput = OutputEventType::kNone; } +void TransferSession::GetNextAction(OutputEvent & event) +{ + PollOutput(event, System::SystemClock().GetMonotonicTimestamp()); +} + CHIP_ERROR TransferSession::StartTransfer(TransferRole role, const TransferInitData & initData, System::Clock::Timeout timeout) { VerifyOrReturnError(mState == TransferState::kUnitialized, CHIP_ERROR_INCORRECT_STATE); diff --git a/src/protocols/bdx/BdxTransferSession.h b/src/protocols/bdx/BdxTransferSession.h index ccd241e7fe508c..4a50e70fbb6c84 100644 --- a/src/protocols/bdx/BdxTransferSession.h +++ b/src/protocols/bdx/BdxTransferSession.h @@ -165,6 +165,25 @@ class DLL_EXPORT TransferSession */ void PollOutput(OutputEvent & event, System::Clock::Timestamp curTime); + /** + * @brief + * Gets the pending output event from the transfer session in the event param passed in by the caller. + * The output event may contain some data for the caller to act upon. If there is no pending output event, + * the caller will get an event of type OutputEventType::kNone. + * + * It is possible that consecutive calls to this method may emit different outputs depending on the state of the + * TransferSession object. The caller is generally expected to keep calling this method until it gets an event of type + * OutputEventType::kNone. + * + * If the output event type is kMsgToSend, the caller is expected to send the message immediately on the + * relevant exchange. In this case the BDX session timeout timer will start when GetNextAction is called. + * + * See OutputEventType for all possible output event types. + * + * @param event Reference to an OutputEvent struct that will be filled out with any pending output event data + */ + void GetNextAction(OutputEvent & event); + /** * @brief * Initializes the TransferSession object and prepares a TransferInit message (emitted via PollOutput()). diff --git a/src/protocols/interaction_model/StatusCodeList.h b/src/protocols/interaction_model/StatusCodeList.h index 5538478d76ce52..da059ac4596180 100644 --- a/src/protocols/interaction_model/StatusCodeList.h +++ b/src/protocols/interaction_model/StatusCodeList.h @@ -61,6 +61,7 @@ CHIP_IM_STATUS_CODE(Reserved98 , Reserved98 , 0x98) CHIP_IM_STATUS_CODE(Reserved99 , Reserved99 , 0x99) CHIP_IM_STATUS_CODE(Reserved9a , Reserved9a , 0x9a) CHIP_IM_STATUS_CODE(Busy , BUSY , 0x9c) +CHIP_IM_STATUS_CODE(AccessRestricted , ACCESS_RESTRICTED , 0x9d) CHIP_IM_STATUS_CODE(Deprecatedc0 , Deprecatedc0 , 0xc0) CHIP_IM_STATUS_CODE(Deprecatedc1 , Deprecatedc1 , 0xc1) CHIP_IM_STATUS_CODE(Deprecatedc2 , Deprecatedc2 , 0xc2) diff --git a/src/python_testing/TC_ACL_2_11.py b/src/python_testing/TC_ACL_2_11.py new file mode 100644 index 00000000000000..f5ebed221b272b --- /dev/null +++ b/src/python_testing/TC_ACL_2_11.py @@ -0,0 +1,234 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments +# for details about the block below. +# +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 +# test-runner-run/run1/app: ${NETWORK_MANAGEMENT_APP} +# test-runner-run/run1/factoryreset: True +# test-runner-run/run1/quiet: True +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --commissioning-arl-entries "[{\"endpoint\": 1,\"cluster\": 1105,\"restrictions\": [{\"type\": 0,\"id\": 0}]}]" --arl-entries "[{\"endpoint\": 1,\"cluster\": 1105,\"restrictions\": [{\"type\": 0,\"id\": 0}]}]" +# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# === END CI TEST ARGUMENTS === + +import logging +import queue + +import chip.clusters as Clusters +from basic_composition_support import arls_populated +from chip.clusters.Attribute import EventReadResult, SubscriptionTransaction, ValueDecodeFailure +from chip.clusters.ClusterObjects import ALL_ACCEPTED_COMMANDS, ALL_ATTRIBUTES, ALL_CLUSTERS, ClusterEvent +from chip.clusters.Objects import AccessControl +from chip.clusters.Types import NullValue +from chip.interaction_model import InteractionModelError, Status +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts + + +class EventChangeCallback: + def __init__(self, expected_event: ClusterEvent, output: queue.Queue): + self._output = output + self._expected_cluster_id = expected_event.cluster_id + self._expected_event_id = expected_event.event_id + + def __call__(self, res: EventReadResult, transaction: SubscriptionTransaction): + if res.Status == Status.Success and res.Header.ClusterId == self._expected_cluster_id and res.Header.EventId == self._expected_event_id: + logging.info( + f'Got subscription report for event {self._expected_event_id} on cluster {self._expected_cluster_id}: {res.Data}') + self._output.put(res) + + +def WaitForEventReport(q: queue.Queue, expected_event: ClusterEvent): + try: + res = q.get(block=True, timeout=10) + except queue.Empty: + asserts.fail("Failed to receive a report for the event {}".format(expected_event)) + + asserts.assert_equal(res.Header.ClusterId, expected_event.cluster_id, "Expected cluster ID not found in event report") + asserts.assert_equal(res.Header.EventId, expected_event.event_id, "Expected event ID not found in event report") + + +class TC_ACL_2_11(MatterBaseTest): + + global_attributes = [ + Clusters.Descriptor.Attributes.GeneratedCommandList.attribute_id, + Clusters.Descriptor.Attributes.AcceptedCommandList.attribute_id, + Clusters.Descriptor.Attributes.AttributeList.attribute_id, + Clusters.Descriptor.Attributes.FeatureMap.attribute_id, + Clusters.Descriptor.Attributes.ClusterRevision.attribute_id, + Clusters.Descriptor.Attributes.EventList.attribute_id + ] + + def pics_TC_ACL_2_11(self) -> list[str]: + return ['ACL.S.F01'] + + def desc_TC_ACL_2_11(self) -> str: + return "[TC-ACL-2.11] Verification of Managed Device feature" + + def steps_TC_ACL_2_11(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commissioning (already done) and precondition checks", is_commissioning=True), + TestStep(2, "TH1 reads DUT Endpoint 0 AccessControl cluster CommissioningARL attribute"), + TestStep(3, "TH1 reads DUT Endpoint 0 AccessControl cluster ARL attribute"), + TestStep(4, "For each entry in ARL, iterate over each restriction and attempt access the restriction's ID on the Endpoint and Cluster in the ARL entry.", + "If the restriction is Type AttributeAccessForbidden, read the restriction's attribute ID and verify the response is ACCESS_RESTRICTED." + "If the restriction is Type AttributeWriteForbidden, write restriction's the attribute ID and verify the response is ACCESS_RESTRICTED." + "If the restriction is Type CommandForbidden, invoke the restriction's command ID and verify the response is ACCESS_RESTRICTED."), + TestStep(5, "Ensure protected attributes are accessible"), + TestStep(6, "TH1 sends DUT Endpoint 0 AccessControl cluster command ReviewFabricRestrictions"), + TestStep(7, "Wait for up to 1 hour. Follow instructions provided by device maker to remove all access restrictions", + "AccessRestrictionReviewUpdate event is received"), + TestStep(8, "TH1 reads DUT Endpoint 0 AccessControl cluster ARL attribute", "ARL is empty") + ] + return steps + + @async_test_body + async def test_TC_ACL_2_11(self): + dev_ctrl = self.default_controller + dut_node_id = self.dut_node_id + self.step(1) + + wildcard_read = (await dev_ctrl.Read(self.dut_node_id, [()])) + arl_data = arls_populated(wildcard_read.tlvAttributes) + asserts.assert_true( + arl_data.have_arl, "ARL attribute must contain at least one restriction to run this test. Please follow manufacturer-specific steps to add access restrictions and re-run this test") + asserts.assert_true( + arl_data.have_carl, "CommissioningARL attribute must contain at least one restriction to run this test. Please follow manufacturer-specific steps to add access restrictions and re-run this test") + + self.step(2) + await self.read_single_attribute_check_success( + endpoint=0, + cluster=Clusters.AccessControl, + attribute=Clusters.AccessControl.Attributes.CommissioningARL + ) + self.step(3) + arl = await self.read_single_attribute_check_success( + endpoint=0, + cluster=Clusters.AccessControl, + attribute=Clusters.AccessControl.Attributes.Arl + ) + self.step(4) + + care_struct = None + + for arl_entry in arl: + E1 = arl_entry.endpoint + C1 = arl_entry.cluster + R1 = arl_entry.restrictions + + care_struct = Clusters.AccessControl.Structs.AccessRestrictionEntryStruct(E1, C1, R1) + + cluster = ALL_CLUSTERS[C1] + for restriction in R1: + restriction_type = restriction.type + ID1 = restriction.id + + if restriction_type == AccessControl.Enums.AccessRestrictionTypeEnum.kAttributeAccessForbidden: + # if ID1 is null, it means it is a wildcard. We need to read all attributes on the cluster + if ID1 is NullValue: + for attr_id, attribute in ALL_ATTRIBUTES[C1].items(): + if attr_id not in self.global_attributes: + await self.read_single_attribute_expect_error(cluster=cluster, attribute=attribute, error=Status.AccessRestricted, endpoint=E1) + else: + attribute = ALL_ATTRIBUTES[C1][ID1] + await self.read_single_attribute_expect_error(cluster=cluster, attribute=attribute, error=Status.AccessRestricted, endpoint=E1) + elif restriction_type == AccessControl.Enums.AccessRestrictionTypeEnum.kAttributeWriteForbidden: + if ID1 is NullValue: + for attr_id, attribute in ALL_ATTRIBUTES[C1].items(): + if attr_id not in self.global_attributes: + status = await self.write_single_attribute(attribute_value=attribute(), endpoint_id=E1, expect_success=False) + if status is not Status.UnsupportedWrite: + asserts.assert_equal(status, Status.AccessRestricted, + f"Failed to verify ACCESS_RESTRICTED when writing to Attribute {attr_id} Cluster {C1} Endpoint {E1}") + else: + attribute = ALL_ATTRIBUTES[C1][ID1] + status = await self.write_single_attribute(attribute_value=attribute(), endpoint_id=E1, expect_success=False) + asserts.assert_equal(status, Status.AccessRestricted, + f"Failed to verify ACCESS_RESTRICTED when writing to Attribute {ID1} Cluster {C1} Endpoint {E1}") + elif restriction_type == AccessControl.Enums.AccessRestrictionTypeEnum.kCommandForbidden: + if ID1 is NullValue: + for cmd_id, command in ALL_ACCEPTED_COMMANDS[C1].items(): + try: + await self.send_single_cmd(cmd=command(), endpoint=E1, timedRequestTimeoutMs=1000) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.AccessRestricted, + f"Failed to verify ACCESS_RESTRICTED when sending command {cmd_id} to Cluster {C1} Endpoint {E1}") + else: + command = ALL_ACCEPTED_COMMANDS[C1][ID1] + try: + await self.send_single_cmd(cmd=command(), endpoint=E1, timedRequestTimeoutMs=1000) + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.AccessRestricted, + f"Failed to verify ACCESS_RESTRICTED when sending command {ID1} to Cluster {C1} Endpoint {E1}") + + # Belongs to step 6, but needs to be subscribed before executing step 5: begin + arru_queue = queue.Queue() + arru_cb = EventChangeCallback(Clusters.AccessControl.Events.FabricRestrictionReviewUpdate, arru_queue) + + urgent = 1 + subscription_arru = await dev_ctrl.ReadEvent(dut_node_id, events=[(0, Clusters.AccessControl.Events.FabricRestrictionReviewUpdate, urgent)], reportInterval=(0, 30), keepSubscriptions=True, autoResubscribe=False) + subscription_arru.SetEventUpdateCallback(callback=arru_cb) + # end + + self.step(5) + root_node_endpoint = 0 + root_part_list = await dev_ctrl.ReadAttribute(dut_node_id, [(root_node_endpoint, Clusters.Descriptor.Attributes.PartsList)]) + set_of_endpoints = set(root_part_list[root_node_endpoint] + [Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList]) + for endpoint in set_of_endpoints: + ret = await dev_ctrl.ReadAttribute(dut_node_id, [(endpoint, Clusters.Descriptor.Attributes.ServerList)]) + server_list = ret[endpoint][Clusters.Descriptor][Clusters.Descriptor.Attributes.ServerList] + for server in server_list: + cluster = Clusters.ClusterObjects.ALL_CLUSTERS[server] + data = await dev_ctrl.ReadAttribute(dut_node_id, [(endpoint, cluster.Attributes.GeneratedCommandList), + (endpoint, cluster.Attributes.AcceptedCommandList), + (endpoint, cluster.Attributes.AttributeList), + (endpoint, cluster.Attributes.FeatureMap), + (endpoint, cluster.Attributes.ClusterRevision)]) + for endpoint, clusters in data.items(): + for cluster, attributes in clusters.items(): + for attribute, value in attributes.items(): + asserts.assert_false(isinstance(value, ValueDecodeFailure) and + isinstance(value.Reason, InteractionModelError) and + value.Reason.status == Status.AccessRestricted, + "AccessRestricted is not allowed on Global attributes") + + self.step(6) + response = await self.send_single_cmd(cmd=Clusters.AccessControl.Commands.ReviewFabricRestrictions([care_struct]), endpoint=0) + asserts.assert_true(isinstance(response, Clusters.AccessControl.Commands.ReviewFabricRestrictionsResponse), + "Result is not of type ReviewFabricRestrictionsResponse") + + self.step(7) + logging.info("Please follow instructions provided by the product maker to remove all ARL entries") + WaitForEventReport(arru_queue, Clusters.AccessControl.Events.FabricRestrictionReviewUpdate) + + self.step(8) + cluster = Clusters.AccessControl + attribute = Clusters.AccessControl.Attributes.Arl + arl = await self.read_single_attribute_check_success( + node_id=self.dut_node_id, + endpoint=0, + cluster=cluster, + attribute=attribute + ) + asserts.assert_equal(arl, [], "Unexpected Arl; Not empty") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_BOOLCFG_3_1.py b/src/python_testing/TC_BOOLCFG_3_1.py index 8e42140b35424c..7446afd4b49715 100644 --- a/src/python_testing/TC_BOOLCFG_3_1.py +++ b/src/python_testing/TC_BOOLCFG_3_1.py @@ -45,7 +45,7 @@ def steps_TC_BOOLCFG_3_1(self) -> list[TestStep]: steps = [ TestStep(1, "Commissioning, already done", is_commissioning=True), TestStep("2a", "Read FeatureMap attribute"), - TestStep("2b", "Verify SENS feature is supported"), + TestStep("2b", "Verify SENSLVL feature is supported"), TestStep("2c", "Read AttributeList attribute"), TestStep(3, "Read SupportedSensitivityLevels attribute"), TestStep(4, "Read DefaultSensitivityLevel attribute, if supported"), diff --git a/src/python_testing/TC_BRBINFO_4_1.py b/src/python_testing/TC_BRBINFO_4_1.py index ea230150c27fdb..df922748999dd0 100644 --- a/src/python_testing/TC_BRBINFO_4_1.py +++ b/src/python_testing/TC_BRBINFO_4_1.py @@ -30,6 +30,7 @@ import chip.clusters as Clusters from chip import ChipDeviceCtrl +from chip.interaction_model import InteractionModelError, Status from matter_testing_support import MatterBaseTest, SimpleEventCallback, TestStep, async_test_body, default_matter_test_main from mobly import asserts @@ -46,10 +47,11 @@ class TC_BRBINFO_4_1(MatterBaseTest): async def _read_attribute_expect_success(self, endpoint, cluster, attribute, node_id): return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute, node_id=node_id) - # Override default timeout to support a 60 min wait + # This test has some manual steps and also multiple sleeps >= 30 seconds. Test typically runs under 3 mins, + # so 6 minutes is more than enough. @property def default_timeout(self) -> int: - return 63*60 + return 6*60 def desc_TC_BRBINFO_4_1(self) -> str: """Returns a description of this test""" @@ -57,14 +59,25 @@ def desc_TC_BRBINFO_4_1(self) -> str: def steps_TC_BRBINFO_4_1(self) -> list[TestStep]: steps = [ - TestStep("0", "DUT commissioned", is_commissioning=True), - TestStep("0a", "Preconditions"), - TestStep("1a", "TH reads from the ICD the A_IDLE_MODE_DURATION, A_ACTIVE_MODE_DURATION, and ACTIVE_MODE_THRESHOLD attributes"), - TestStep("1b", "Simple KeepActive command w/ subscription. ActiveChanged event received by TH contains PromisedActiveDuration"), - TestStep("2", "Sends 3x KeepActive commands w/ subscription. ActiveChanged event received ONCE and contains PromisedActiveDuration"), - TestStep("3", "TH waits for check-in from TH_ICD to confirm no additional ActiveChanged events are recieved"), - TestStep("4", "KeepActive not returned after 60 minutes of offline ICD"), - ] + TestStep("0", "DUT commissioned and preconditions", is_commissioning=True), + TestStep("1", "TH reads from the ICD the A_IDLE_MODE_DURATION, A_ACTIVE_MODE_DURATION, and ACTIVE_MODE_THRESHOLD attributes"), + TestStep("2", "Setting up subscribe to ActiveChange event"), + TestStep("3", "Check TimeoutMs too low fails"), + TestStep("4", "Check TimeoutMs too high fails"), + TestStep("5", "Check KeepActive successful with valid command parameters lowest possible TimeoutMs"), + TestStep("6", "Validate previous command results in ActiveChanged event shortly after ICD device checks-in"), + TestStep("7", "Check KeepActive successful with valid command parameters highest possible TimeoutMs"), + TestStep("8", "Validate previous command results in ActiveChanged event shortly after ICD device checks-in"), + TestStep("9", "Send multiple KeepActive commands during window where ICD device will not check in"), + TestStep("10", "Validate previous command results in single ActiveChanged event shortly after ICD device checks-in"), + TestStep("11", "Validate we received no additional ActiveChanged event after subsequent ICD check in"), + TestStep("12", "Send KeepActive command with shortest TimeoutMs value while TH_ICD is prevented from sending check-ins"), + TestStep("13", "TH allows TH_ICD to resume sending check-ins after timeout should have expired"), + TestStep("14", "Wait for TH_ICD to check into TH twice, then confirm we have had no new ActiveChanged events reported from DUT"), + TestStep("15", "Send KeepActive command with shortest TimeoutMs value while TH_ICD is prevented from sending check-ins"), + TestStep("16", "Wait 15 seconds then send second KeepActive command with double the TimeoutMs value of the previous step"), + TestStep("17", "TH allows TH_ICD to resume sending check-ins after timeout from step 15 expired but before second timeout from step 16 still valid"), + TestStep("18", "Wait for TH_ICD to check into TH, then confirm we have received new event from DUT")] return steps def _ask_for_vendor_commissioniong_ux_operation(self, discriminator, setupPinCode, setupManualCode, setupQRCode): @@ -77,9 +90,9 @@ def _ask_for_vendor_commissioniong_ux_operation(self, discriminator, setupPinCod f"If using FabricSync Admin test app, you may type:\n" f">>> pairing onnetwork 111 {setupPinCode} --icd-registration true") - async def _send_keep_active_command(self, duration, endpoint_id) -> int: + async def _send_keep_active_command(self, stay_active_duration_ms, timeout_ms, endpoint_id) -> int: logging.info("Sending keep active command") - keep_active = await self.default_controller.SendCommand(nodeid=self.dut_node_id, endpoint=endpoint_id, payload=Clusters.Objects.BridgedDeviceBasicInformation.Commands.KeepActive(stayActiveDuration=duration)) + keep_active = await self.default_controller.SendCommand(nodeid=self.dut_node_id, endpoint=endpoint_id, payload=Clusters.Objects.BridgedDeviceBasicInformation.Commands.KeepActive(stayActiveDuration=stay_active_duration_ms, timeoutMs=timeout_ms)) return keep_active async def _wait_for_active_changed_event(self, timeout_s) -> int: @@ -117,14 +130,16 @@ async def setup_class(self): asserts.fail('This test requires a TH_ICD_SERVER app. Specify app path with --string-arg th_icd_server_app_path:') self.kvs = f'kvs_{str(uuid.uuid4())}' - self.port = 5543 discriminator = 3850 passcode = 20202021 - app_args = f'--secured-device-port {self.port} --discriminator {discriminator} --passcode {passcode} --KVS {self.kvs} ' - cmd = f'{app} {app_args}' + cmd = [app] + cmd.extend(['--secured-device-port', str(5543)]) + cmd.extend(['--discriminator', str(discriminator)]) + cmd.extend(['--passcode', str(passcode)]) + cmd.extend(['--KVS', self.kvs]) logging.info("Starting ICD Server App") - self.app_process = subprocess.Popen(cmd, bufsize=0, shell=True) + self.app_process = subprocess.Popen(cmd) logging.info("ICD started") time.sleep(3) @@ -189,10 +204,6 @@ async def test_TC_BRBINFO_4_1(self): logging.info(f"Dynamic endpoint is {dynamic_endpoint_id}") self.step("0") - - # Preconditions - self.step("0a") - logging.info("Ensuring DUT is commissioned to TH") # Confirms commissioning of DUT on TH as it reads its fature map @@ -205,15 +216,7 @@ async def test_TC_BRBINFO_4_1(self): logging.info("Ensuring ICD is commissioned to TH") - # Confirms commissioning of ICD on TH as it reads its feature map - await self._read_attribute_expect_success( - _ROOT_ENDPOINT_ID, - basic_info_cluster, - basic_info_attributes.FeatureMap, - self.icd_nodeid - ) - - self.step("1a") + self.step("1") idle_mode_duration_s = await self._read_attribute_expect_success( _ROOT_ENDPOINT_ID, @@ -231,9 +234,7 @@ async def test_TC_BRBINFO_4_1(self): ) logging.info(f"ActiveModeDurationMs: {active_mode_duration_ms}") - self.step("1b") - - # Subscription to ActiveChanged + self.step("2") event = brb_info_cluster.Events.ActiveChanged self.q = queue.Queue() urgent = 1 @@ -241,66 +242,107 @@ async def test_TC_BRBINFO_4_1(self): subscription = await self.default_controller.ReadEvent(nodeid=self.dut_node_id, events=[(dynamic_endpoint_id, event, urgent)], reportInterval=[1, 3]) subscription.SetEventUpdateCallback(callback=cb) + self.step("3") stay_active_duration_ms = 1000 - logging.info(f"Sending KeepActiveCommand({stay_active_duration_ms}ms)") - await self._send_keep_active_command(stay_active_duration_ms, dynamic_endpoint_id) - - logging.info("Waiting for ActiveChanged from DUT...") - timeout_s = idle_mode_duration_s + max(active_mode_duration_ms, stay_active_duration_ms)/1000 - promised_active_duration_ms = await self._wait_for_active_changed_event(timeout_s) + keep_active_timeout_ms = 29999 + try: + await self._send_keep_active_command(stay_active_duration_ms, keep_active_timeout_ms, dynamic_endpoint_id) + asserts.fail("KeepActive with invalid TimeoutMs was expected to fail") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.ConstraintError, + "DUT sent back an unexpected error, we were expecting ConstraintError") + self.step("4") + keep_active_timeout_ms = 3600001 + try: + await self._send_keep_active_command(stay_active_duration_ms, keep_active_timeout_ms, dynamic_endpoint_id) + asserts.fail("KeepActive with invalid TimeoutMs was expected to fail") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.ConstraintError, + "DUT sent back an unexpected error, we were expecting ConstraintError") + + self.step("5") + keep_active_timeout_ms = 30000 + await self._send_keep_active_command(stay_active_duration_ms, keep_active_timeout_ms, dynamic_endpoint_id) + + self.step("6") + wait_for_icd_checkin_timeout_s = idle_mode_duration_s + max(active_mode_duration_ms, stay_active_duration_ms)/1000 + wait_for_dut_event_subscription_s = 5 + # This will throw exception if timeout is exceeded. + await self.default_controller.WaitForActive(self.icd_nodeid, timeoutSeconds=wait_for_icd_checkin_timeout_s, stayActiveDurationMs=5000) + promised_active_duration_ms = await self._wait_for_active_changed_event(timeout_s=wait_for_dut_event_subscription_s) asserts.assert_greater_equal(promised_active_duration_ms, stay_active_duration_ms, "PromisedActiveDuration < StayActiveDuration") + asserts.assert_equal(self.q.qsize(), 0, "Unexpected event received from DUT") - self.step("2") + self.step("7") + keep_active_timeout_ms = 3600000 + await self._send_keep_active_command(stay_active_duration_ms, keep_active_timeout_ms, dynamic_endpoint_id) + + self.step("8") + # This will throw exception if timeout is exceeded. + await self.default_controller.WaitForActive(self.icd_nodeid, timeoutSeconds=wait_for_icd_checkin_timeout_s, stayActiveDurationMs=5000) + promised_active_duration_ms = await self._wait_for_active_changed_event(timeout_s=wait_for_dut_event_subscription_s) + asserts.assert_greater_equal(promised_active_duration_ms, stay_active_duration_ms, + "PromisedActiveDuration < StayActiveDuration") + asserts.assert_equal(self.q.qsize(), 0, "Unexpected event received from DUT") - # Prevent icd app from sending any check-in messages. + self.step("9") self.pause_th_icd_server(check_state=True) # sends 3x keep active commands stay_active_duration_ms = 2000 + keep_active_timeout_ms = 60000 logging.info(f"Sending first KeepActiveCommand({stay_active_duration_ms})") - await self._send_keep_active_command(stay_active_duration_ms, dynamic_endpoint_id) + await self._send_keep_active_command(stay_active_duration_ms, keep_active_timeout_ms, dynamic_endpoint_id) logging.info(f"Sending second KeepActiveCommand({stay_active_duration_ms})") - await self._send_keep_active_command(stay_active_duration_ms, dynamic_endpoint_id) + await self._send_keep_active_command(stay_active_duration_ms, keep_active_timeout_ms, dynamic_endpoint_id) logging.info(f"Sending third KeepActiveCommand({stay_active_duration_ms})") - await self._send_keep_active_command(stay_active_duration_ms, dynamic_endpoint_id) - self.resume_th_icd_server(check_state=True) + await self._send_keep_active_command(stay_active_duration_ms, keep_active_timeout_ms, dynamic_endpoint_id) - logging.info("Waiting for ActiveChanged from DUT...") - promised_active_duration_ms = await self._wait_for_active_changed_event((idle_mode_duration_s + max(active_mode_duration_ms, stay_active_duration_ms))/1000) + self.step("10") + self.resume_th_icd_server(check_state=True) + await self.default_controller.WaitForActive(self.icd_nodeid, timeoutSeconds=wait_for_icd_checkin_timeout_s, stayActiveDurationMs=5000) + promised_active_duration_ms = await self._wait_for_active_changed_event(timeout_s=wait_for_dut_event_subscription_s) asserts.assert_equal(self.q.qsize(), 0, "More than one event received from DUT") - self.step("3") - await self.default_controller.WaitForActive(self.icd_nodeid, stayActiveDurationMs=5000) + self.step("11") + await self.default_controller.WaitForActive(self.icd_nodeid, timeoutSeconds=wait_for_icd_checkin_timeout_s, stayActiveDurationMs=5000) asserts.assert_equal(self.q.qsize(), 0, "More than one event received from DUT") - self.step("4") + self.step("12") + self.pause_th_icd_server(check_state=True) + stay_active_duration_ms = 2000 + keep_active_timeout_ms = 30000 + await self._send_keep_active_command(stay_active_duration_ms, keep_active_timeout_ms, dynamic_endpoint_id) + + self.step("13") + time.sleep(30) + self.resume_th_icd_server(check_state=True) - logging.info("TH waiting for checkin from TH_ICD...") - await self.default_controller.WaitForActive(self.icd_nodeid, stayActiveDurationMs=10000) - stay_active_duration_ms = 10000 - logging.info(f"Sending KeepActiveCommand({stay_active_duration_ms})") - await self._send_keep_active_command(stay_active_duration_ms, dynamic_endpoint_id) + self.step("14") + await self.default_controller.WaitForActive(self.icd_nodeid, timeoutSeconds=wait_for_icd_checkin_timeout_s, stayActiveDurationMs=5000) + await self.default_controller.WaitForActive(self.icd_nodeid, timeoutSeconds=wait_for_icd_checkin_timeout_s, stayActiveDurationMs=5000) + asserts.assert_equal(self.q.qsize(), 0, "Unexpected event received from DUT") + self.step("15") self.pause_th_icd_server(check_state=True) - # If we are seeing assertion below fail test assumption is likely incorrect. - # Test assumes after TH waits for check-in from TH_ICD it has enough time to - # call the KeepActive command and pause the app to prevent it from checking in - # after DUT recieved the KeepActive command. Should this assumption be incorrect - # we could look into using existing ICDTestEventTriggerEvent, or adding test - # event trigger that will help suppress check-ins from the TH_ICD_SERVER. - asserts.assert_equal(self.q.qsize(), 0, "") - - if not self.is_ci: - logging.info("Waiting for 60 minutes") - time.sleep(60*60) + stay_active_duration_ms = 2000 + keep_active_timeout_ms = 30000 + await self._send_keep_active_command(stay_active_duration_ms, keep_active_timeout_ms, dynamic_endpoint_id) + + self.step("16") + time.sleep(15) + stay_active_duration_ms = 2000 + keep_active_timeout_ms = 60000 + await self._send_keep_active_command(stay_active_duration_ms, keep_active_timeout_ms, dynamic_endpoint_id) + self.step("17") + time.sleep(15) self.resume_th_icd_server(check_state=True) - logging.info("TH waiting for first checkin from TH_ICD...") - await self.default_controller.WaitForActive(self.icd_nodeid, stayActiveDurationMs=10000) - logging.info("TH waiting for second checkin from TH_ICD...") - await self.default_controller.WaitForActive(self.icd_nodeid, stayActiveDurationMs=10000) + self.step("18") + await self.default_controller.WaitForActive(self.icd_nodeid, timeoutSeconds=wait_for_icd_checkin_timeout_s, stayActiveDurationMs=5000) + promised_active_duration_ms = await self._wait_for_active_changed_event(timeout_s=wait_for_dut_event_subscription_s) asserts.assert_equal(self.q.qsize(), 0, "More than one event received from DUT") diff --git a/src/python_testing/TC_CCTRL_2_1.py b/src/python_testing/TC_CCTRL_2_1.py index 7822d101b16e02..a8aedb49ab3f2c 100644 --- a/src/python_testing/TC_CCTRL_2_1.py +++ b/src/python_testing/TC_CCTRL_2_1.py @@ -16,7 +16,7 @@ # import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, default_matter_test_main, has_cluster, per_endpoint_test +from matter_testing_support import MatterBaseTest, TestStep, default_matter_test_main, has_cluster, run_if_endpoint_matches from mobly import asserts @@ -27,7 +27,7 @@ def steps_TC_CCTRL_2_1(self) -> list[TestStep]: TestStep(2, "Validate SupportedDeviceCategories is set accordingly based on MCORE.FS")] return steps - @per_endpoint_test(has_cluster(Clusters.CommissionerControl)) + @run_if_endpoint_matches(has_cluster(Clusters.CommissionerControl)) async def test_TC_CCTRL_2_1(self): self.step(1) is_fabric_sync_pics_enabled = self.check_pics("MCORE.FS") diff --git a/src/python_testing/TC_CCTRL_2_2.py b/src/python_testing/TC_CCTRL_2_2.py index 4d11692d14ba24..8e7a8f1fde6ac3 100644 --- a/src/python_testing/TC_CCTRL_2_2.py +++ b/src/python_testing/TC_CCTRL_2_2.py @@ -22,7 +22,6 @@ # This test requires a TH_SERVER application. Please specify with --string-arg th_server_app_path: -import ipaddress import logging import os import random @@ -35,7 +34,7 @@ from chip import ChipDeviceCtrl from chip.interaction_model import InteractionModelError, Status from matter_testing_support import (MatterBaseTest, TestStep, async_test_body, default_matter_test_main, has_cluster, - per_endpoint_test) + run_if_endpoint_matches) from mobly import asserts @@ -53,11 +52,14 @@ async def setup_class(self): self.port = 5543 discriminator = random.randint(0, 4095) passcode = 20202021 - app_args = f'--secured-device-port {self.port} --discriminator {discriminator} --passcode {passcode} --KVS {self.kvs}' - cmd = f'{app} {app_args}' + cmd = [app] + cmd.extend(['--secured-device-port', str(5543)]) + cmd.extend(['--discriminator', str(discriminator)]) + cmd.extend(['--passcode', str(passcode)]) + cmd.extend(['--KVS', self.kvs]) # TODO: Determine if we want these logs cooked or pushed to somewhere else logging.info("Starting TH_SERVER") - self.app_process = subprocess.Popen(cmd, bufsize=0, shell=True) + self.app_process = subprocess.Popen(cmd) logging.info("TH_SERVER started") time.sleep(3) @@ -117,7 +119,13 @@ def steps_TC_CCTRL_2_2(self) -> list[TestStep]: return steps - @per_endpoint_test(has_cluster(Clusters.CommissionerControl)) + # This test has some manual steps and also multiple sleeps for up to 30 seconds. Test typically runs + # under 2 mins, so 4 minutes is more than enough. + @property + def default_timeout(self) -> int: + return 4*60 + + @run_if_endpoint_matches(has_cluster(Clusters.CommissionerControl)) async def test_TC_CCTRL_2_2(self): self.is_ci = self.check_pics('PICS_SDK_CI_ONLY') @@ -133,9 +141,7 @@ async def test_TC_CCTRL_2_2(self): events = await self.default_controller.ReadEvent(nodeid=self.dut_node_id, events=event_path) self.step(5) - ipaddr = ipaddress.IPv6Address('::1') - cmd = Clusters.CommissionerControl.Commands.CommissionNode( - requestId=1, responseTimeoutSeconds=30, ipAddress=ipaddr.packed, port=self.port) + cmd = Clusters.CommissionerControl.Commands.CommissionNode(requestId=1, responseTimeoutSeconds=30) try: await self.send_single_cmd(cmd) asserts.fail("Unexpected success on CommissionNode") diff --git a/src/python_testing/TC_CCTRL_2_3.py b/src/python_testing/TC_CCTRL_2_3.py new file mode 100644 index 00000000000000..224f283f46d27b --- /dev/null +++ b/src/python_testing/TC_CCTRL_2_3.py @@ -0,0 +1,185 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments +# for details about the block below. +# +# TODO: Skip CI for now, we don't have any way to run this. Needs setup. See test_TC_CCTRL.py + +# This test requires a TH_SERVER application. Please specify with --string-arg th_server_app_path: + +import logging +import os +import random +import signal +import subprocess +import time +import uuid + +import chip.clusters as Clusters +from chip import ChipDeviceCtrl +from chip.interaction_model import InteractionModelError, Status +from matter_testing_support import (MatterBaseTest, TestStep, async_test_body, default_matter_test_main, has_cluster, + per_endpoint_test) +from mobly import asserts + + +class TC_CCTRL_2_3(MatterBaseTest): + + @async_test_body + async def setup_class(self): + super().setup_class() + self.app_process = None + app = self.user_params.get("th_server_app_path", None) + if not app: + asserts.fail('This test requires a TH_SERVER app. Specify app path with --string-arg th_server_app_path:') + + self.kvs = f'kvs_{str(uuid.uuid4())}' + self.port = 5543 + discriminator = random.randint(0, 4095) + passcode = 20202021 + cmd = [app] + cmd.extend(['--secured-device-port', str(5543)]) + cmd.extend(['--discriminator', str(discriminator)]) + cmd.extend(['--passcode', str(passcode)]) + cmd.extend(['--KVS', self.kvs]) + # TODO: Determine if we want these logs cooked or pushed to somewhere else + logging.info("Starting TH_SERVER") + self.app_process = subprocess.Popen(cmd) + logging.info("TH_SERVER started") + time.sleep(3) + + logging.info("Commissioning from separate fabric") + + # Create a second controller on a new fabric to communicate to the server + new_certificate_authority = self.certificate_authority_manager.NewCertificateAuthority() + new_fabric_admin = new_certificate_authority.NewFabricAdmin(vendorId=0xFFF1, fabricId=2) + paa_path = str(self.matter_test_config.paa_trust_store_path) + self.TH_server_controller = new_fabric_admin.NewController(nodeId=112233, paaTrustStorePath=paa_path) + self.server_nodeid = 1111 + await self.TH_server_controller.CommissionOnNetwork(nodeId=self.server_nodeid, setupPinCode=passcode, filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, filter=discriminator) + logging.info("Commissioning TH_SERVER complete") + + def teardown_class(self): + # In case the th_server_app_path does not exist, then we failed the test + # and there is nothing to remove + if self.app_process is not None: + logging.warning("Stopping app with SIGTERM") + self.app_process.send_signal(signal.SIGTERM.value) + self.app_process.wait() + + if os.path.exists(self.kvs): + os.remove(self.kvs) + + super().teardown_class() + + def steps_TC_CCTRL_2_3(self) -> list[TestStep]: + steps = [TestStep(1, "Get number of fabrics from TH_SERVER", is_commissioning=True), + TestStep(2, "Reading Attribute VendorId from TH_SERVER"), + TestStep(3, "Reading Attribute ProductId from TH_SERVER"), + TestStep(4, "Send RequestCommissioningApproval command to DUT with CASE session with correct VendorId and ProductId"), + TestStep(5, "(Manual Step) Approve Commissioning Approval Request on DUT using method indicated by the manufacturer"), + TestStep(6, "Reading Event CommissioningRequestResult from DUT, confirm one new event"), + TestStep(7, "Send another RequestCommissioningApproval command to DUT with CASE session with same RequestId as the previous one"), + TestStep(8, "Send CommissionNode command to DUT with CASE session, with valid parameters"), + TestStep(9, "Send another CommissionNode command to DUT with CASE session, with with same RequestId as the previous one"), + TestStep(10, "Send OpenCommissioningWindow command on Administrator Commissioning Cluster sent to TH_SERVER"), + TestStep(11, "Wait for DUT to successfully commission TH_SERVER, 30 seconds"), + TestStep(12, "Get number of fabrics from TH_SERVER, verify DUT successfully commissioned TH_SERVER")] + + return steps + + # This test has some manual steps and one sleep for up to 30 seconds. Test typically + # runs under 1 mins, so 3 minutes is more than enough. + @property + def default_timeout(self) -> int: + return 3*60 + + @per_endpoint_test(has_cluster(Clusters.CommissionerControl)) + async def test_TC_CCTRL_2_3(self): + self.is_ci = self.check_pics('PICS_SDK_CI_ONLY') + + self.step(1) + th_server_fabrics = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.Fabrics, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0, fabric_filtered=False) + + self.step(2) + th_server_vid = await self.read_single_attribute_check_success(cluster=Clusters.BasicInformation, attribute=Clusters.BasicInformation.Attributes.VendorID, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0) + + self.step(3) + th_server_pid = await self.read_single_attribute_check_success(cluster=Clusters.BasicInformation, attribute=Clusters.BasicInformation.Attributes.ProductID, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0) + + self.step(4) + good_request_id = 0x1234567812345678 + cmd = Clusters.CommissionerControl.Commands.RequestCommissioningApproval( + requestId=good_request_id, vendorId=th_server_vid, productId=th_server_pid, label="Test Ecosystem") + await self.send_single_cmd(cmd=cmd) + + self.step(5) + if not self.is_ci: + self.wait_for_user_input("Approve Commissioning approval request using manufacturer specified mechanism") + + self.step(6) + event_path = [(self.matter_test_config.endpoint, Clusters.CommissionerControl.Events.CommissioningRequestResult, 1)] + events = await self.default_controller.ReadEvent(nodeid=self.dut_node_id, events=event_path) + asserts.assert_equal(len(events), 1, "Unexpected event list len") + asserts.assert_equal(events[0].Data.statusCode, 0, "Unexpected status code") + asserts.assert_equal(events[0].Data.clientNodeId, + self.matter_test_config.controller_node_id, "Unexpected client node id") + asserts.assert_equal(events[0].Data.requestId, good_request_id, "Unexpected request ID") + + self.step(7) + cmd = Clusters.CommissionerControl.Commands.RequestCommissioningApproval( + requestId=good_request_id, vendorId=th_server_vid, productId=th_server_pid) + try: + await self.send_single_cmd(cmd=cmd) + asserts.fail("Unexpected success on CommissionNode") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Failure, "Incorrect error returned") + + self.step(8) + cmd = Clusters.CommissionerControl.Commands.CommissionNode(requestId=good_request_id, responseTimeoutSeconds=30) + resp = await self.send_single_cmd(cmd) + asserts.assert_equal(type(resp), Clusters.CommissionerControl.Commands.ReverseOpenCommissioningWindow, + "Incorrect response type") + + self.step(9) + cmd = Clusters.CommissionerControl.Commands.CommissionNode(requestId=good_request_id, responseTimeoutSeconds=30) + try: + await self.send_single_cmd(cmd=cmd) + asserts.fail("Unexpected success on CommissionNode") + except InteractionModelError as e: + asserts.assert_equal(e.status, Status.Failure, "Incorrect error returned") + + self.step(10) + # min commissioning timeout is 3*60 seconds, so use that even though the command said 30. + cmd = Clusters.AdministratorCommissioning.Commands.OpenCommissioningWindow(commissioningTimeout=3*60, + PAKEPasscodeVerifier=resp.PAKEPasscodeVerifier, + discriminator=resp.discriminator, + iterations=resp.iterations, salt=resp.salt) + await self.send_single_cmd(cmd, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0, timedRequestTimeoutMs=5000) + + self.step(11) + time.sleep(30) + + self.step(12) + th_server_fabrics_new = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.Fabrics, dev_ctrl=self.TH_server_controller, node_id=self.server_nodeid, endpoint=0, fabric_filtered=False) + asserts.assert_equal(len(th_server_fabrics) + 1, len(th_server_fabrics_new), + "Unexpected number of fabrics on TH_SERVER") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_CC_2_2.py b/src/python_testing/TC_CC_2_2.py index 86080efd358456..c575ae81f5c2d3 100644 --- a/src/python_testing/TC_CC_2_2.py +++ b/src/python_testing/TC_CC_2_2.py @@ -24,7 +24,7 @@ # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True # test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === import logging @@ -33,9 +33,9 @@ import chip.clusters as Clusters from chip.clusters import ClusterObjects as ClusterObjects from matter_testing_support import (ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, default_matter_test_main, - has_cluster, per_endpoint_test) + has_cluster, run_if_endpoint_matches) from mobly import asserts -from test_plan_support import commission_if_required, if_feature_supported, read_attribute, verify_success +from test_plan_support import commission_if_required, read_attribute, verify_success class TC_CC_2_3(MatterBaseTest): @@ -48,14 +48,14 @@ def default_timeout(self) -> int: def steps_TC_CC_2_2(self): THcommand = "Test Harness sends the" - def store_values(attr: str) -> str: - return f"TH stores the reported values of _{attr}_ in all incoming reports for _{attr}_ attribute, that contains data in _reportedCurrentHueValuesList_, over a period of 20 seconds." + def store_values(reportList: str, attr: str) -> str: + return f"TH stores the reported values of _{attr}_ in all incoming reports for _{attr}_ attribute, that contains data in _{reportList}_, over a period of 20 seconds." - def verify_entry_count(attr: str) -> str: - return f'TH verifies that _reportedCurrentHueValuesList_ does not contain more than 10 entries for _{attr}_' + def verify_entry_count(reportList: str, attr: str) -> str: + return f'TH verifies that _{reportList}_ does not contain more than 12 entries for _{attr}_' - def entry_count_verification() -> str: - return '_reportedCurrentHueValuesList_ has 10 or less entries in the list' + def entry_count_verification(reportList: str) -> str: + return f'_{reportList}_ has 12 or less entries in the list' return [TestStep(1, commission_if_required(), is_commissioning=True), TestStep(2, read_attribute('FeatureMap')), @@ -63,51 +63,69 @@ def entry_count_verification() -> str: TestStep(4, read_attribute('ServerList', 'Descriptor')), TestStep( 5, f"If OnOff cluster is present in _ServerList_, {THcommand} On command on OnOff cluster", verify_success()), - TestStep( - 6, f'{if_feature_supported("HS")}, {THcommand} MoveHue with _MoveMode_ field set to Down, _Rate_ field set to 255 and remaining fields set to 0', verify_success()), - TestStep(7, f'{if_feature_supported("HS")}, {THcommand} MoveSaturation with _MoveMode_ field set to Down, _Rate_ field set to 255 and remaining fields set to 0', verify_success()), - TestStep(8, 'Set up a subscription wildcard subscription for the Color Control Cluster, with MinIntervalFloor set to 0, MaxIntervalCeiling set to 30 and KeepSubscriptions set to false', + TestStep(6, 'Set up a subscription wildcard subscription for the Color Control Cluster, with MinIntervalFloor set to 0, MaxIntervalCeiling set to 30 and KeepSubscriptions set to false', 'Subscription successfully established'), - TestStep(9, 'If the HS feature is not supported, skip step 10 to 15'), - TestStep(10, f'{THcommand} MoveToHue with _Hue_ field set to 254, _TransitionTime_ field set to 100, _Direction_ field set to Shortest and remaining fields set to 0', verify_success()), - TestStep(11, store_values('CurrentHue')), - TestStep(12, verify_entry_count('CurrentHue'), entry_count_verification()), + TestStep(7, 'If the CT feature is not supported, skip step 8 to 12'), + TestStep( + 8, f'{THcommand} MoveColorTemperature with _MoveMode_ field set to Down, _Rate_ field set to 65535 and remaining fields set to 0', verify_success()), + TestStep( + 9, 'TH reads from the DUT the ColorTempPhysicalMaxMireds and stores the returned value as colorTempPhysicalMaxMireds', verify_success()), + TestStep(10, f'{THcommand} MoveToColorTemperature with ColorTemperatureMireds field set to the value of colorTempPhysicalMaxMireds, TransitionTime field set to 100, remaining fields set to 0', verify_success()), + TestStep(11, store_values('reportedColorTemperatureMiredsValuesList', 'ColorTemperatureMireds')), + TestStep(12, verify_entry_count('reportedColorTemperatureMiredsValuesList', 'ColorTemperatureMireds'), + entry_count_verification('reportedColorTemperatureMiredsValuesList')), + TestStep(13, 'If the HS feature is not supported, skip step 14 to 21'), + TestStep( + 14, f'{THcommand} MoveHue with _MoveMode_ field set to Down, _Rate_ field set to 255 and remaining fields set to 0', verify_success()), + TestStep( + 15, f'{THcommand} MoveSaturation with _MoveMode_ field set to Down, _Rate_ field set to 255 and remaining fields set to 0', verify_success()), + TestStep(16, f'{THcommand} MoveToHue with _Hue_ field set to 254, _TransitionTime_ field set to 100, _Direction_ field set to Shortest and remaining fields set to 0', verify_success()), + TestStep(17, store_values('reportedCurrentHueValuesList', 'CurrentHue')), + TestStep(18, verify_entry_count('reportedCurrentHueValuesList', 'CurrentHue'), + entry_count_verification('reportedCurrentHueValuesList')), + TestStep( + 19, f"{THcommand} MoveToSaturation with _Saturation_ field set to 254, _TransitionTime_ field set to 100 and remaining fields set to 0"), + TestStep(20, store_values('reportedCurrentSaturationValuesList', 'CurrentSaturation')), + TestStep(21, verify_entry_count('reportedCurrentSaturationValuesList', + 'CurrentSaturation'), entry_count_verification('reportedCurrentSaturationValuesList')), + TestStep(22, 'If XY feature is not supported, skip steps 23-28'), + TestStep( + 23, f"{THcommand} MoveToColor with _ColorX_ field set to 32768, _ColorY_ set to 19660, _TransitionTime_ field set to 0 and remaining fields set to 0"), TestStep( - 13, f"{THcommand} MoveToSaturation with _Saturation_ field set to 254, _TransitionTime_ field set to 100 and remaining fields set to 0"), - TestStep(14, store_values('CurrentSaturation')), - TestStep(15, verify_entry_count('CurrentSaturation'), entry_count_verification()), - TestStep(16, 'If XY feature is not supported, skip steps 17-21'), + 24, f"{THcommand} MoveToColor with _ColorX_ field set to 13107, _ColorY_ set to 13107, _TransitionTime_ field set to 100 and remaining fields set to 0"), + TestStep(25, store_values('reportedCurrentXValuesList', 'CurrentX')), + TestStep(26, store_values('reportedCurrentYValuesList', 'CurrentY')), + TestStep(27, verify_entry_count('reportedCurrentXValuesList', 'CurrentX'), + entry_count_verification('reportedCurrentXValuesList')), + TestStep(28, verify_entry_count('reportedCurrentYValuesList', 'CurrentY'), + entry_count_verification('reportedCurrentYValuesList')), + TestStep(29, "If the EHUE feature is not supported, skip steps 30 to 32"), + TestStep(30, f"{THcommand} EnhancedMoveToHue with _EnhancedHue_ field set to 0, _TransitionTime_ field set to 100, _Direction_ field set to Shortest and remaining fields set to 0", verify_success()), + TestStep(31, store_values('reportedEnhancedCurrentHueValuesList', 'EnhancedCurrentHue')), + TestStep(32, verify_entry_count('reportedEnhancedCurrentHueValuesList', + 'EnhancedCurrentHue'), entry_count_verification('reportedEnhancedCurrentHueValuesList')), TestStep( - "17a", f"{THcommand} MoveToColor with _ColorX_ field set to 32768, _ColorY_ set to 19660, _TransitionTime_ field set to 0 and remaining fields set to 0"), + 33, 'If the RemainingTime attribute is not supported or the CT feature is not supported, skip the remaining steps and end test case'), TestStep( - "17b", f"{THcommand} MoveToColor with _ColorX_ field set to 13107, _ColorY_ set to 13107, _TransitionTime_ field set to 100 and remaining fields set to 0"), - TestStep(18, store_values('CurrentX')), - TestStep(19, store_values('CurrentY')), - TestStep(20, verify_entry_count('CurrentX'), entry_count_verification()), - TestStep(21, verify_entry_count('CurrentY'), entry_count_verification()), - TestStep(22, "If the EHUE feature is not supported, skip steps 23 to 25"), - TestStep(23, f"{THcommand} EnhancedMoveToHue with _EnhancedHue_ field set to 0, _TransitionTime_ field set to 100, _Direction_ field set to Shortest and remaining fields set to 0", verify_success()), - TestStep(24, store_values('EnhancedCurrentHue')), - TestStep(25, verify_entry_count('EnhancedCurrentHue'), entry_count_verification()), - TestStep(26, "If the RemainingTime attribute is not supported, skip the remaining steps and end test case"), - TestStep(27, store_values('RemainingTime')), + 34, f'{THcommand} MoveColorTemperature with MoveMode field set to Down, Rate field set to 65535 and remaining fields set to 0', verify_success()), + TestStep(35, 'TH stores the reported values of RemainingTime in all incoming reports for RemainingTime attribute, for steps 36 to 39 that contains data in reportedRemainingTimeValuesList.'), TestStep( - 29, f"If the XY feature is supported and the HS feature is not supported, {THcommand} MoveToColor with _ColorX_ field set to 32768, _ColorY_ set to 19660, _TransitionTime_ field set to 100 and remaining fields set to 0", verify_success()), - TestStep(30, "Wait for 5 seconds"), + 36, f'{THcommand} MoveToColorTemperature with ColorTemperatureMireds field set to the value of colorTempPhysicalMaxMireds / 2, TransitionTime field set to 100, remaining fields set to 0', verify_success()), + TestStep(37, "Wait for 5 seconds"), TestStep( - 32, f"If the XY feature is supported and the HS feature is not supported, {THcommand} MoveToColor with _ColorX_ field set to 13107, _ColorY_ set to 13107, _TransitionTime_ field set to 150 and remaining fields set to 0", verify_success()), - TestStep(33, "Wait for 20 seconds"), - TestStep(34, "TH verifies _reportedRemainingTimeValuesList_ contains three entries", + 38, f'{THcommand} MoveToColorTemperature with ColorTemperatureMireds field set to the value of colorTempPhysicalMaxMireds, TransitionTime field set to 150, remaining fields set to 0', verify_success()), + TestStep(39, "Wait for 20 seconds"), + TestStep(40, "TH verifies _reportedRemainingTimeValuesList_ contains three entries", "_reportedRemainingTimeValuesList_ has 3 entries in the list"), - TestStep(35, "TH verifies the first entry in _reportedRemainingTimeValuesList_ is 100", - "The first entry in _reportedRemainingTimeValuesList_ is equal to 100"), - TestStep(36, "TH verifies the second entry in _reportedRemainingTimeValuesList_ is approximately 150", - "The second entry in _reportedRemainingTimeValuesList_ is approximately equal to 150"), - TestStep(37, "TH verifies the third entry in _reportedRemainingTimeValuesList_ is 0", + TestStep(41, "TH verifies the first entry in _reportedRemainingTimeValuesList_ is 100", + "The first entry in reportedRemainingTimeValuesList is in the range of 95 to 100"), + TestStep(42, "TH verifies the second entry in _reportedRemainingTimeValuesList_ is approximately 150", + "The second entry in reportedRemainingTimeValuesList is in the range of 145 to 150"), + TestStep(43, "TH verifies the third entry in _reportedRemainingTimeValuesList_ is 0", "The third entry in _reportedRemainingTimeValuesList_ is equal to 0") ] - @per_endpoint_test(has_cluster(Clusters.ColorControl)) + @run_if_endpoint_matches(has_cluster(Clusters.ColorControl)) async def test_TC_CC_2_2(self): gather_time = 20 @@ -118,6 +136,7 @@ async def test_TC_CC_2_2(self): self.step(2) feature_map = await self.read_single_attribute_check_success(cluster=cc, attribute=cc.Attributes.FeatureMap) + supports_ct = (feature_map & cc.Bitmaps.Feature.kColorTemperature) != 0 supports_hs = (feature_map & cc.Bitmaps.Feature.kHueAndSaturation) != 0 supports_xy = (feature_map & cc.Bitmaps.Feature.kXy) != 0 supports_ehue = (feature_map & cc.Bitmaps.Feature.kEnhancedHue) != 0 @@ -136,20 +155,6 @@ async def test_TC_CC_2_2(self): self.mark_current_step_skipped() self.step(6) - if supports_hs: - cmd = cc.Commands.MoveHue(moveMode=cc.Enums.MoveModeEnum.kDown, rate=225) - await self.send_single_cmd(cmd) - else: - self.mark_current_step_skipped() - - self.step(7) - if supports_hs: - cmd = cc.Commands.MoveSaturation(moveMode=cc.Enums.MoveModeEnum.kDown, rate=225) - await self.send_single_cmd(cmd) - else: - self.mark_current_step_skipped() - - self.step(8) sub_handler = ClusterAttributeChangeAccumulator(cc) await sub_handler.start(self.default_controller, self.dut_node_id, self.matter_test_config.endpoint) @@ -163,124 +168,162 @@ def check_report_counts(attr: ClusterObjects.ClusterAttributeDescriptor): asserts.assert_less_equal(count, 12, "More than 12 reports received") asserts.assert_less_equal(count, gather_time, f"More than {gather_time} reports received") - self.step(9) - if not supports_hs: + self.step(7) + if not supports_ct: + self.skip_step(8) + self.skip_step(9) self.skip_step(10) self.skip_step(11) self.skip_step(12) - self.skip_step(13) - self.skip_step(14) - self.skip_step(15) else: + self.step(8) + cmd = cc.Commands.MoveColorTemperature(moveMode=cc.Enums.MoveModeEnum.kDown, rate=65535) + await self.send_single_cmd(cmd) + + self.step(9) + colorTempPhysicalMaxMireds = await self.read_single_attribute_check_success(cluster=cc, attribute=cc.Attributes.ColorTempPhysicalMaxMireds) + self.step(10) - cmd = cc.Commands.MoveToHue(hue=254, transitionTime=100, direction=cc.Enums.DirectionEnum.kShortest) + cmd = cc.Commands.MoveToColorTemperature(colorTemperatureMireds=colorTempPhysicalMaxMireds, transitionTime=100) await self.send_single_cmd(cmd) self.step(11) accumulate_reports() self.step(12) + check_report_counts(cc.Attributes.ColorTemperatureMireds) + + self.step(13) + if not supports_hs: + self.skip_step(14) + self.skip_step(15) + self.skip_step(16) + self.skip_step(17) + self.skip_step(18) + self.skip_step(19) + self.skip_step(20) + self.skip_step(21) + else: + self.step(14) + cmd = cc.Commands.MoveHue(moveMode=cc.Enums.MoveModeEnum.kDown, rate=225) + await self.send_single_cmd(cmd) + + self.step(15) + cmd = cc.Commands.MoveSaturation(moveMode=cc.Enums.MoveModeEnum.kDown, rate=225) + await self.send_single_cmd(cmd) + + self.step(16) + cmd = cc.Commands.MoveToHue(hue=254, transitionTime=100, direction=cc.Enums.DirectionEnum.kShortest) + await self.send_single_cmd(cmd) + + self.step(17) + accumulate_reports() + + self.step(18) check_report_counts(cc.Attributes.CurrentHue) - self.step(13) + self.step(19) cmd = cc.Commands.MoveToSaturation(saturation=254, transitionTime=100) await self.send_single_cmd(cmd) - self.step(14) + self.step(20) accumulate_reports() - self.step(15) + self.step(21) check_report_counts(cc.Attributes.CurrentSaturation) - self.step(16) + self.step(22) if not supports_xy: - self.skip_step(17) - self.skip_step(18) - self.skip_step(19) - self.skip_step(20) - self.skip_step(21) + self.skip_step(23) + self.skip_step(24) + self.skip_step(25) + self.skip_step(26) + self.skip_step(27) + self.skip_step(28) else: - self.step("17a") + self.step(23) cmd = cc.Commands.MoveToColor(colorX=32768, colorY=19660, transitionTime=0) await self.send_single_cmd(cmd) - self.step("17b") - cmd = cc.Commands.MoveToColor(colorX=13107, colorY=13107, transitionTime=0) + self.step(24) + cmd = cc.Commands.MoveToColor(colorX=13107, colorY=13107, transitionTime=100) await self.send_single_cmd(cmd) - self.step(18) + self.step(25) accumulate_reports() - self.step(19) + self.step(26) # reports for x and y are both accumulated in a dict - done above - self.step(20) + self.step(27) check_report_counts(cc.Attributes.CurrentX) - self.step(21) + self.step(28) check_report_counts(cc.Attributes.CurrentY) - self.step(22) + self.step(29) if not supports_ehue: - self.skip_step(23) - self.skip_step(24) - self.skip_step(25) + self.skip_step(30) + self.skip_step(31) + self.skip_step(32) else: - self.step(23) + self.step(30) cmd = cc.Commands.EnhancedMoveToHue(enhancedHue=0, transitionTime=100, direction=cc.Enums.DirectionEnum.kShortest) await self.send_single_cmd(cmd) - self.step(24) + self.step(31) accumulate_reports() - self.step(25) + self.step(32) check_report_counts(cc.Attributes.EnhancedCurrentHue) - self.step(26) - if cc.Attributes.RemainingTime.attribute_id not in attribute_list: - self.skip_all_remaining_steps(27) + self.step(33) + if cc.Attributes.RemainingTime.attribute_id not in attribute_list or not supports_ct: + self.skip_all_remaining_steps(34) return - self.step(27) + self.step(34) + cmd = cc.Commands.MoveColorTemperature(moveMode=cc.Enums.MoveModeEnum.kDown, rate=65535) + await self.send_single_cmd(cmd) + + self.step(35) accumulate_reports() - self.step(29) - # TODO: If this is mandatory, we should just omit this - if supports_xy: - cmd = cc.Commands.MoveToColor(colorX=32768, colorY=19660, transitionTime=100) - await self.send_single_cmd(cmd) - else: - self.mark_current_step_skipped() + self.step(36) + cmd = cc.Commands.MoveToColorTemperature(colorTemperatureMireds=colorTempPhysicalMaxMireds/2, transitionTime=100) + await self.send_single_cmd(cmd) - self.step(30) + self.step(37) logging.info("Test will now wait for 5 seconds") time.sleep(5) - self.step(32) - if supports_xy: - cmd = cc.Commands.MoveToColor(colorX=13107, colorY=13107, transitionTime=150) - await self.send_single_cmd(cmd) - else: - self.mark_current_step_skipped() + self.step(38) + cmd = cc.Commands.MoveToColorTemperature(colorTemperatureMireds=colorTempPhysicalMaxMireds, transitionTime=150) + await self.send_single_cmd(cmd) - self.step(33) + self.step(39) logging.info("Test will now wait for 20 seconds") time.sleep(20) - self.step(34) + self.step(40) logging.info(f'received reports: {sub_handler.attribute_reports[cc.Attributes.RemainingTime]}') count = sub_handler.attribute_report_counts[cc.Attributes.RemainingTime] asserts.assert_equal(count, 3, "Unexpected number of reports received") - self.step(35) - asserts.assert_equal(sub_handler.attribute_reports[cc.Attributes.RemainingTime][0].value, 100, "Unexpected first report") + self.step(41) + asserts.assert_less_equal( + sub_handler.attribute_reports[cc.Attributes.RemainingTime][0].value, 100, "Unexpected first report") + asserts.assert_almost_equal( + sub_handler.attribute_reports[cc.Attributes.RemainingTime][0].value, 100, delta=10, msg="Unexpected first report") - self.step(36) + self.step(42) + asserts.assert_less_equal( + sub_handler.attribute_reports[cc.Attributes.RemainingTime][1].value, 150, "Unexpected second report") asserts.assert_almost_equal( sub_handler.attribute_reports[cc.Attributes.RemainingTime][1].value, 150, delta=10, msg="Unexpected second report") - self.step(37) + self.step(43) asserts.assert_equal(sub_handler.attribute_reports[cc.Attributes.RemainingTime][-1].value, 0, "Unexpected last report") diff --git a/src/python_testing/TC_DEMTestBase.py b/src/python_testing/TC_DEMTestBase.py index db53c36f8cd1c9..da51ba252820cc 100644 --- a/src/python_testing/TC_DEMTestBase.py +++ b/src/python_testing/TC_DEMTestBase.py @@ -38,6 +38,26 @@ async def check_dem_attribute(self, attribute, expected_value, endpoint: int = N asserts.assert_equal(value, expected_value, f"Unexpected '{attribute}' value - expected {expected_value}, was {value}") + async def validate_feature_map(self, must_have_features, must_not_have_features): + feature_map = await self.read_dem_attribute_expect_success(attribute="FeatureMap") + for must_have_feature in must_have_features: + asserts.assert_true(feature_map & must_have_feature, + f"{must_have_feature.name} must be set but is not. feature_map 0x{feature_map:x}") + + for must_not_have_feature in must_not_have_features: + asserts.assert_false(feature_map & must_not_have_feature, + f"{must_not_have_feature.name} is not allowed to be set. feature_map 0x{feature_map:x}") + + async def validate_pfr_or_sfr_in_feature_map(self): + feature_map = await self.read_dem_attribute_expect_success(attribute="FeatureMap") + + illegal_combination = Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPowerForecastReporting | Clusters.DeviceEnergyManagement.Bitmaps.Feature.kStateForecastReporting + asserts.assert_not_equal(feature_map & illegal_combination, illegal_combination, + f"Cannot have kPowerForecastReporting and kStateForecastReporting both set. feature_map 0x{feature_map:x}") + + asserts.assert_not_equal(feature_map & illegal_combination, 0, + f"Must have one of kPowerForecastReporting and kStateForecastReporting set. feature_map 0x{feature_map:x}") + async def send_power_adjustment_command(self, power: int, duration: int, cause: Clusters.Objects.DeviceEnergyManagement.Enums.CauseEnum, endpoint: int = None, timedRequestTimeoutMs: int = 3000, diff --git a/src/python_testing/TC_DEM_2_1.py b/src/python_testing/TC_DEM_2_1.py new file mode 100644 index 00000000000000..cbbf7e3783edeb --- /dev/null +++ b/src/python_testing/TC_DEM_2_1.py @@ -0,0 +1,190 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# pylint: disable=invalid-name + +# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments +# for details about the block below. +# +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 +# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} +# test-runner-run/run1/factoryreset: True +# test-runner-run/run1/quiet: True +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x7e +# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# === END CI TEST ARGUMENTS === + +"""Define Matter test case TC_DEM_2_1.""" + + +import logging + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mobly import asserts +from TC_DEMTestBase import DEMTestBase + +logger = logging.getLogger(__name__) + + +class TC_DEM_2_1(MatterBaseTest, DEMTestBase): + """Implementation of test case TC_DEM_2_1.""" + + def desc_TC_DEM_2_1(self) -> str: + """Return a description of this test.""" + return "4.1.2. [TC-DEM-2.1] Attributes with DUT as Server" + + def pics_TC_DEM_2_1(self): + """Return the PICS definitions associated with this test.""" + pics = [ + "DEM.S", + ] + return pics + + def steps_TC_DEM_2_1(self) -> list[TestStep]: + """Execute the test steps.""" + steps = [ + TestStep("1", "Commissioning, already done", + is_commissioning=True), + TestStep("2", "TH reads from the DUT FeatureMap attribute.", + "Store the value as FeatureMap."), + TestStep("3", "TH reads from the DUT ESAType attribute.", + "Verify that the DUT response contains an a ESATypeEnum (enum8) value to match the DUT type."), + TestStep("4", "TH reads from the DUT the ESACanGenerate attribute.", + "Verify that the DUT response contains a boolean value to match the DUT capability."), + TestStep("5", "TH reads from the DUT ESAState attribute.", + "Verify that the DUT response contains an a ESAStateEnum (enum8) value to match the DUT state (Online or Offline)."), + TestStep("6", "TH reads from the DUT the AbsMinPower attribute.", + "Verify that the DUT response contains a power-mW value to match the DUT capability, and is negative if and only if the ESACanGenerate read in step 4 is TRUE."), + TestStep("7", "TH reads from the DUT the AbsMaxPower attribute.", + "Verify that the DUT response contains a power-mW value to match the DUT capability, and greater than or equal to the AbsMinPower read in step 6."), + TestStep("8", "TH reads from the DUT the PowerAdjustmentCapability attribute.", + "Verify that the DUT response contains either a null value or a PowerAdjustCapabilityStruct value which contains a list of PowerAdjustStruct values and a valid Cause PowerAdjustReasonEnum (enum8) value."), + TestStep("9", "If PFR or SFR feature is supported on the cluster, TH reads from the DUT the Forecast attribute.", + "Verify that the DUT response contains either a null value or a valid ForecastStruct value."), + TestStep("10", "If PA, STA, PAU, FA or CON feature is supported on the cluster, TH reads from the DUT the OptOutState attribute.", + "Verify that the DUT response contains an OptOutStateEnum (enum8) value."), + ] + + return steps + + @async_test_body + async def test_TC_DEM_2_1(self): + # pylint: disable=too-many-locals, too-many-statements + """Run the test steps.""" + + # Allow some user input steps to be skipped if running under CI + self.is_ci = self.check_pics("PICS_SDK_CI_ONLY") + + self.step("1") + # Commission DUT - already done + + # Get the feature map for later + self.step("2") + feature_map = await self.read_dem_attribute_expect_success(attribute="FeatureMap") + logger.info(f"FeatureMap: {feature_map}") + + self.step("3") + esa_type = await self.read_dem_attribute_expect_success(attribute="ESAType") + asserts.assert_is_instance(esa_type, Clusters.DeviceEnergyManagement.Enums.ESATypeEnum, "Invalid type for ESAType") + + if not self.is_ci: + user_response = self.wait_for_user_input(prompt_msg=f"Detected ESAType is {esa_type.name}:{esa_type} - is this correct? Enter 'y' or 'n'", + prompt_msg_placeholder="y", + default_value="y") + asserts.assert_equal(user_response.lower(), "y") + + self.step("4") + esa_can_generate = await self.read_dem_attribute_expect_success(attribute="ESACanGenerate") + asserts.assert_is_instance(esa_can_generate, bool) + + if not self.is_ci: + user_response = self.wait_for_user_input(prompt_msg=f"Detected ESACanGenerate is: {esa_can_generate} - is this correct? Enter 'y' or 'n'", + prompt_msg_placeholder="y", + default_value="y") + asserts.assert_equal(user_response.lower(), "y") + + self.step("5") + esa_state = await self.read_dem_attribute_expect_success(attribute="ESAState") + logger.info(f"ESAState is {esa_state}") + asserts.assert_is_instance(esa_state, Clusters.DeviceEnergyManagement.Enums.ESAStateEnum) + + self.step("6") + abs_min_power = await self.read_dem_attribute_expect_success(attribute="AbsMinPower") + asserts.assert_is_instance(abs_min_power, int) + + if not self.is_ci: + user_response = self.wait_for_user_input(prompt_msg=f"AbsMinPower is {abs_min_power/1000000.0} W - is this correct? Enter 'y' or 'n'", + prompt_msg_placeholder="y", + default_value="y") + asserts.assert_equal(user_response.lower(), "y") + + if not esa_can_generate: + # ESA's that can't generate must have positive values + asserts.assert_greater_equal(abs_min_power, 0) + + self.step("7") + abs_max_power = await self.read_dem_attribute_expect_success(attribute="AbsMaxPower") + asserts.assert_is_instance(abs_max_power, int) + asserts.assert_greater_equal(abs_max_power, abs_min_power) + + if not self.is_ci: + user_response = self.wait_for_user_input(prompt_msg=f"AbsMaxPower is {abs_max_power/1000000.0} W - is this correct? Enter 'y' or 'n'", + prompt_msg_placeholder="y", + default_value="y") + asserts.assert_equal(user_response.lower(), "y") + + self.step("8") + if Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPowerAdjustment & feature_map: + power_adjustment_capability = await self.read_dem_attribute_expect_success(attribute="PowerAdjustmentCapability") + logger.info(f"PowerAdjustmentCapability is {power_adjustment_capability}") + + if power_adjustment_capability is not NullValue: + asserts.assert_is_instance(power_adjustment_capability, + Clusters.DeviceEnergyManagement.Structs.PowerAdjustCapabilityStruct) + + power_adjustment_list = power_adjustment_capability.powerAdjustCapability + if power_adjustment_list is not NullValue: + asserts.assert_is_instance(power_adjustment_list, list) + for entry in power_adjustment_list: + asserts.assert_is_instance(entry, Clusters.DeviceEnergyManagement.Structs.PowerAdjustStruct) + + power_adjustment_cause = power_adjustment_capability.cause + asserts.assert_is_instance(power_adjustment_cause, Clusters.DeviceEnergyManagement.Enums.PowerAdjustReasonEnum) + + self.step("9") + if Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPowerForecastReporting & feature_map or \ + Clusters.DeviceEnergyManagement.Bitmaps.Feature.kStateForecastReporting & feature_map: + forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") + logger.info(f"Forecast is {forecast}") + + if forecast is not NullValue: + asserts.assert_is_instance(forecast, + Clusters.DeviceEnergyManagement.Structs.ForecastStruct) + + self.step("10") + if Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPowerAdjustment & feature_map or \ + Clusters.DeviceEnergyManagement.Bitmaps.Feature.kStartTimeAdjustment & feature_map or \ + Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPausable & feature_map or \ + Clusters.DeviceEnergyManagement.Bitmaps.Feature.kForecastAdjustment & feature_map or \ + Clusters.DeviceEnergyManagement.Bitmaps.Feature.kConstraintBasedAdjustment & feature_map: + opt_out_state = await self.read_dem_attribute_expect_success(attribute="OptOutState") + logger.info(f"OptOutState is {opt_out_state.name}:{opt_out_state}") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_DEM_2_10.py b/src/python_testing/TC_DEM_2_10.py new file mode 100644 index 00000000000000..eb983a16e07401 --- /dev/null +++ b/src/python_testing/TC_DEM_2_10.py @@ -0,0 +1,296 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# pylint: disable=invalid-name + +# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments +# for details about the block below. +# +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 +# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} +# test-runner-run/run1/factoryreset: True +# test-runner-run/run1/quiet: True +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x7b +# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# === END CI TEST ARGUMENTS === + +"""Define Matter test case TC_DEM_2_10.""" + + +import logging +import sys +import time + +import chip.clusters as Clusters +from chip.interaction_model import Status +from matter_testing_support import (ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, async_test_body, + default_matter_test_main) +from mobly import asserts +from TC_DEMTestBase import DEMTestBase + +logger = logging.getLogger(__name__) + + +class TC_DEM_2_10(MatterBaseTest, DEMTestBase): + """Implementation of test case TC_DEM_2_10.""" + + def desc_TC_DEM_2_10(self) -> str: + """Return a description of this test.""" + return "4.1.3. [TC-DEM-2.10] This test case verifies attributes of the Device Energy Mangement cluster server having the Q quality." + + def pics_TC_DEM_2_10(self): + """Return the PICS definitions associated with this test.""" + pics = [ + "DEM.S" + ] + return pics + + def steps_TC_DEM_2_10(self) -> list[TestStep]: + """Execute the test steps.""" + steps = [ + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("2", "TH reads from the DUT the FeatureMap", + "Verify that the DUT response contains the FeatureMap attribute. Store the value as FeatureMap."), + TestStep("3", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", + "Value has to be 1 (True)"), + TestStep("4", "Set up a subscription to the DeviceEnergyManagement cluster, with MinIntervalFloor set to 0, MaxIntervalCeiling set to 10 and KeepSubscriptions set to false", + "Subscription successfully established"), + TestStep("5", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.DEM.TESTEVENTTRIGGER for User Opt-out Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("5a", "TH reads from the DUT the OptOutState", + "Value has to be 0x00 (NoOptOut)"), + TestStep("6", "If ForecastAdjustment feature is not supported on the cluster skip steps 7 to 14"), + TestStep("7", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.DEM.TESTEVENTTRIGGER for Forecast Adjustment Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("7a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("8", "Reset all accumulated report counts, then wait 12 seconds"), + TestStep("9", "TH counts all report transactions with an attribute report for the Forecast attribute", + "TH verifies that numberOfReportsReceived <= 2"), + TestStep("10", "TH reads from the DUT the Forecast", + "Value has to include slots[0].MinDurationAdjustment, slots[0].MaxDurationAdjustment"), + TestStep("11", "If PowerForecastReporting feature is supported on the cluster TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MaxDurationAdjustment, NominalPower=forecast.slots[0].minPowerAdjustment}, Cause=GridOptimization, else StateForecastReporting shall be used, omit the NominalPower: TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("12", "TH resets all accumulated report counts, then TH sends command CancelRequest", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("13", "Wait 5 seconds"), + TestStep("13a", "TH counts all report transactions with an attribute report for the Forecast attribute", + "TH verifies that numberOfReportsReceived >= 1"), + TestStep("14", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.DEM.TESTEVENTTRIGGER for Forecast Adjustment Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("15", "If PowerAdjustment feature is not supported on the cluster skip steps 16 to 21"), + TestStep("16", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.DEM.TESTEVENTTRIGGER for Power Adjustment Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("16b", "TH reads from the DUT the PowerAdjustmentCapability", + "Value has to include Cause=NoAdjustment."), + TestStep("17", "TH resets all accumulated report counts, then TH sends command PowerAdjustRequest with Power=PowerAdjustmentCapability[0].MaxPower, Duration=20, Cause=LocalOptimization", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("18", "Wait 12 seconds"), + TestStep("18a", "TH counts all report transactions with an attribute report for the PowerAdjustmentCapability attribute", + "TH verifies that numberOfReportsReceived <= 2"), + TestStep("19", "TH resets all accumulated report counts, then TH sends command CancelPowerAdjustment", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("20", "Wait 5 seconds"), + TestStep("20a", "TH counts all report transactions with an attribute report for the PowerAdjustmentCapability attribute", + "TH verifies that numberOfReportsReceived >=1"), + TestStep("21", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.DEM.TESTEVENTTRIGGER for Power Adjustment Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("22", "Cancel the subscription to the Device Energy Management cluster", + "The subscription is cancelled successfully"), + ] + + return steps + + @ async_test_body + async def test_TC_DEM_2_10(self): + # pylint: disable=too-many-locals, too-many-statements + """Run the test steps.""" + self.step("1") + # Commission DUT - already done + + self.step("2") + feature_map = await self.read_dem_attribute_expect_success(attribute="FeatureMap") + logger.info(f"FeatureMap: {feature_map}") + + has_pfr = feature_map & Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPowerForecastReporting + has_sfr = feature_map & Clusters.DeviceEnergyManagement.Bitmaps.Feature.kStateForecastReporting + has_pa = feature_map & Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPowerAdjustment + has_sta = feature_map & Clusters.DeviceEnergyManagement.Bitmaps.Feature.kStartTimeAdjustment + has_pau = feature_map & Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPausable + has_fa = feature_map & Clusters.DeviceEnergyManagement.Bitmaps.Feature.kForecastAdjustment + has_con = feature_map & Clusters.DeviceEnergyManagement.Bitmaps.Feature.kConstraintBasedAdjustment + has_any_forecast_adjustment = has_sta | has_pau | has_fa | has_con + if has_any_forecast_adjustment: + # check it has pfr or sfr (one not both) + asserts.assert_false(has_pfr and has_sfr, "Not allowed to have both PFR and SFR features enabled!") + asserts.assert_true(has_pfr or has_sfr, "Must have either PFR or SFR with a forecast adjustment feature") + + if has_pa: + asserts.assert_true(has_pfr, "Since PowerAdjustment is supported, PFR should be used, not SFR") + + self.step("3") + await self.check_test_event_triggers_enabled() + + self.step("4") + sub_handler = ClusterAttributeChangeAccumulator(Clusters.DeviceEnergyManagement) + await sub_handler.start(self.default_controller, self.dut_node_id, + self.matter_test_config.endpoint, + min_interval_sec=0, + max_interval_sec=10, keepSubscriptions=False) + + def accumulate_reports(wait_time): + logging.info(f"Test will now wait {wait_time} seconds to accumulate reports") + time.sleep(wait_time) + + self.step("5") + await self.send_test_event_trigger_user_opt_out_clear_all() + + self.step("5a") + await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kNoOptOut) + + self.step("6") + if not has_fa: + self.skip_step("7") + self.skip_step("7a") + self.skip_step("8") + self.skip_step("9") + self.skip_step("10") + self.skip_step("11") + self.skip_step("12") + self.skip_step("13") + self.skip_step("13a") + self.skip_step("14") + else: + self.step("7") + await self.send_test_event_trigger_forecast_adjustment() + + self.step("7a") + await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) + + self.step("8") + wait = 12 # Wait 12 seconds - the spec says we should only get reports every 10s at most, unless a command changes it + sub_handler.reset() + accumulate_reports(wait) + + self.step("9") + count = sub_handler.attribute_report_counts[Clusters.DeviceEnergyManagement.Attributes.Forecast] + logging.info(f"Received {count} Forecast updates in {wait} seconds") + asserts.assert_less_equal(count, 2, f"Expected <= 2 Forecast updates in {wait} seconds") + + self.step("10") + forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") + asserts.assert_is_not_none(forecast.slots[0].minDurationAdjustment) + asserts.assert_is_not_none(forecast.slots[0].maxDurationAdjustment) + + self.step("11") + if has_pfr: + # we include nominalPower + slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( + slotIndex=0, duration=forecast.slots[0].maxDurationAdjustment, + nominalPower=forecast.slots[0].minPowerAdjustment)] + else: + # SFR we don't provide nominalPower + slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( + slotIndex=0, duration=forecast.slots[0].maxDurationAdjustment)] + await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.Success) + + self.step("12") + sub_handler.reset() + await self.send_cancel_request_command() + + self.step("13") + wait = 5 # We expect a change to the forecast attribute after the cancel, Wait 5 seconds - allow time for the report to come in + accumulate_reports(wait) + + self.step("13a") + count = sub_handler.attribute_report_counts[Clusters.DeviceEnergyManagement.Attributes.Forecast] + logging.info(f"Received {count} Forecast updates in {wait} seconds") + asserts.assert_greater_equal(count, 1, "Expected >= 1 Forecast updates after a cancelled operation") + + self.step("14") + await self.send_test_event_trigger_forecast_adjustment_clear() + + self.step("15") + if not has_pa: + self.skip_step("16") + self.skip_step("16b") + self.skip_step("17") + self.skip_step("18") + self.skip_step("18a") + self.skip_step("19") + self.skip_step("20") + self.skip_step("20a") + self.skip_step("21") + else: + + self.step("16") + await self.send_test_event_trigger_power_adjustment() + + self.step("16b") + powerAdjustCapabilityStruct = await self.read_dem_attribute_expect_success(attribute="PowerAdjustmentCapability") + asserts.assert_greater_equal(len(powerAdjustCapabilityStruct.powerAdjustCapability), 1) + logging.info(powerAdjustCapabilityStruct) + asserts.assert_equal(powerAdjustCapabilityStruct.cause, + Clusters.DeviceEnergyManagement.Enums.PowerAdjustReasonEnum.kNoAdjustment) + + # we should expect powerAdjustCapabilityStruct to have multiple entries with different max powers, min powers, max and min durations + min_power = sys.maxsize + max_power = 0 + + for entry in powerAdjustCapabilityStruct.powerAdjustCapability: + min_power = min(min_power, entry.minPower) + max_power = max(max_power, entry.maxPower) + + result = f"min_power {min_power} max_power {max_power}" + logging.info(result) + + self.step("17") + sub_handler.reset() + await self.send_power_adjustment_command(power=powerAdjustCapabilityStruct.powerAdjustCapability[0].maxPower, + duration=20, + cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization) + + self.step("18") + wait = 12 # Wait 12 seconds - the spec says we should only get reports every 10s at most, unless a command changes it + accumulate_reports(wait) + + self.step("18a") + count = sub_handler.attribute_report_counts[Clusters.DeviceEnergyManagement.Attributes.PowerAdjustmentCapability] + logging.info(f"Received {count} PowerAdjustmentCapability updates in {wait} seconds") + asserts.assert_less_equal(count, 2, f"Expected <= 2 PowerAdjustmentCapability updates in {wait} seconds") + + self.step("19") + sub_handler.reset() + await self.send_cancel_power_adjustment_command() + + self.step("20") + wait = 5 # We expect a change to the forecast attribute after the cancel, Wait 5 seconds - allow time for the report to come in + accumulate_reports(wait) + + self.step("20a") + count = sub_handler.attribute_report_counts[Clusters.DeviceEnergyManagement.Attributes.PowerAdjustmentCapability] + logging.info(f"Received {count} PowerAdjustmentCapability updates in {wait} seconds") + asserts.assert_greater_equal(count, 1, "Expected >= 1 PowerAdjustmentCapability updates after a cancelled operation") + + self.step("21") + await self.send_test_event_trigger_power_adjustment_clear() + + self.step("22") + await sub_handler.cancel() + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_DEM_2_2.py b/src/python_testing/TC_DEM_2_2.py index 0c32992d934174..3175508d056cb5 100644 --- a/src/python_testing/TC_DEM_2_2.py +++ b/src/python_testing/TC_DEM_2_2.py @@ -23,7 +23,7 @@ # test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x01 +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x01 --application evse # test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === @@ -61,86 +61,88 @@ def pics_TC_DEM_2_2(self): def steps_TC_DEM_2_2(self) -> list[TestStep]: """Execute the test steps.""" steps = [ - TestStep("1", "Commissioning, already done", - is_commissioning=True), - TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster.", - "Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"), - TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Power Adjustment Test Event", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("3a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("3b", "TH reads PowerAdjustmentCapability attribute.", + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("2", "TH reads from the DUT the _FeatureMap_ attribute", + "Verify that the DUT response contains the _FeatureMap_ attribute. Verify PowerAdjustment is supported."), + TestStep("3", "Set up a subscription to all DeviceEnergyManagement cluster events"), + TestStep("4", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", + "Value has to be 1 (True)"), + TestStep("5", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Power Adjustment Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("5a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("5b", "TH reads from the DUT the PowerAdjustmentCapability", "Value has to include Cause=NoAdjustment. Note value for later. Determine the OverallMaxPower and OverallMaxDuration as the largest MaxPower and MaxDuration of the PowerAdjustStructs returned, and similarly the OverallMinPower and OverallMinDuration as the smallest of the MinPower and MinDuration values."), - TestStep("3c", "TH reads OptOutState attribute.", - "Verify value is 0x00 (NoOptOut)"), - TestStep("4", "TH sends PowerAdjustRequest with Power=PowerAdjustmentCapability[0].MaxPower, Duration=PowerAdjustmentCapability[0].MinDuration, Cause=LocalOptimization.", - "Verify DUT responds with status SUCCESS(0x00) and Event DEM.S.E00(PowerAdjustStart) sent"), - TestStep("4a", "TH reads ESAState attribute.", - "Verify value is 0x04 (PowerAdjustActive)"), - TestStep("4b", "TH reads PowerAdjustmentCapability attribute.", + TestStep("5c", "TH reads from the DUT the OptOutState", + "Value has to be 0x00 (NoOptOut)"), + TestStep("6", "TH sends command PowerAdjustRequest with Power=PowerAdjustmentCapability[0].MaxPower, Duration=PowerAdjustmentCapability[0].MinDuration, Cause=LocalOptimization", + "Verify DUT responds w/ status SUCCESS(0x00) and Event DEM.S.E00(PowerAdjustStart) sent"), + TestStep("6a", "TH reads from the DUT the ESAState", + "Value has to be 0x04 (PowerAdjustActive)"), + TestStep("6b", "TH reads from the DUT the PowerAdjustmentCapability", "Value has to include Cause=LocalOptimizationAdjustment."), - TestStep("5", "TH sends CancelPowerAdjustRequest.", - "Verify DUT responds with status SUCCESS(0x00) and Event DEM.S.E01(PowerAdjustEnd) sent with Cause=Cancelled"), - TestStep("5a", "TH reads PowerAdjustmentCapability attribute.", + TestStep("7", "TH sends command CancelPowerAdjustRequest", + "Verify DUT responds w/ status SUCCESS(0x00) and Event DEM.S.E01(PowerAdjustEnd) sent with Cause=Cancelled"), + TestStep("7a", "TH reads from the DUT the PowerAdjustmentCapability", "Value has to include Cause=NoAdjustment."), - TestStep("5b", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("6", "TH sends CancelPowerAdjustRequest.", - "Verify DUT responds with status INVALID_IN_STATE(0xcb)"), - TestStep("7", "TH sends PowerAdjustRequest with Power=OverallMaxPower+1 Duration=OverallMinDuration Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("8", "TH sends PowerAdjustRequest with Power=OverallMinPower Duration=OverallMaxDuration+1 Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("9", "TH sends PowerAdjustRequest with Power=OverallMinPower-1 Duration=OverallMaxDuration Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("10", "TH sends PowerAdjustRequest with Power=OverallMaxPower Duration=OverallMinDuration-1 Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("11", "TH sends PowerAdjustRequest with Power=PowerAdjustmentCapability[0].MaxPower, Duration=PowerAdjustmentCapability[0].MinDuration, Cause=LocalOptimization.", - "Verify DUT responds with status SUCCESS(0x00) and event DEM.S.E00(PowerAdjustStart) sent"), - TestStep("11a", "TH reads PowerAdjustmentCapability attribute.", + TestStep("7b", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("8", "TH sends command CancelPowerAdjustRequest", + "Verify DUT responds w/ status INVALID_IN_STATE(0xcb)"), + TestStep("9", "TH sends command PowerAdjustRequest with Power=OverallMaxPower+1 Duration=OverallMinDuration Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("10", "TH sends command PowerAdjustRequest with Power=OverallMinPower Duration=OverallMaxDuration+1 Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("11", "TH sends command PowerAdjustRequest with Power=OverallMinPower-1 Duration=OverallMaxDuration Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("12", "TH sends command PowerAdjustRequest with Power=OverallMaxPower Duration=OverallMinDuration-1 Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("13", "TH sends command PowerAdjustRequest with Power=PowerAdjustmentCapability[0].MaxPower, Duration=PowerAdjustmentCapability[0].MinDuration, Cause=LocalOptimization", + "Verify DUT responds w/ status SUCCESS(0x00) and event DEM.S.E00(PowerAdjustStart) sent"), + TestStep("13a", "TH reads from the DUT the PowerAdjustmentCapability", "Value has to include Cause=LocalOptimizationAdjustment."), - TestStep("12", "TH sends PowerAdjustRequest with Power=PowerAdjustmentCapability[0].MaxPower, Duration=PowerAdjustmentCapability[0].MinDuration, Cause=GridOptimization.", - "Verify DUT responds with status SUCCESS(0x00) and no event sent"), - TestStep("12a", "TH reads ESAState attribute.", - "Verify value is 0x04 (PowerAdjustActive)"), - TestStep("12b", "TH reads PowerAdjustmentCapability attribute.", + TestStep("14", "TH sends command PowerAdjustRequest with Power=PowerAdjustmentCapability[0].MaxPower, Duration=PowerAdjustmentCapability[0].MinDuration, Cause=GridOptimization", + "Verify DUT responds w/ status SUCCESS(0x00) and no event sent"), + TestStep("14a", "TH reads from the DUT the ESAState", + "Value has to be 0x04 (PowerAdjustActive)"), + TestStep("14b", "TH reads from the DUT the PowerAdjustmentCapability", "Value has to include Cause=GridOptimizationAdjustment."), - TestStep("13", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Local Optimization Test Event.", - "Verify DUT responds with status SUCCESS(0x00) and no event sent"), - TestStep("13a", "TH reads ESAState attribute.", - "Verify value is 0x04 (PowerAdjustActive)"), - TestStep("13b", "TH reads OptOutState attribute.", - "Verify value is 0x02 (LocalOptOut)"), - TestStep("14", "TH sends PowerAdjustRequest with Power=PowerAdjustmentCapability[0].MaxPower, Duration=PowerAdjustmentCapability[0].MinDuration, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("15", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Grid Optimization Test Event.", - "Verify DUT responds with status SUCCESS(0x00) and event DEM.S.E01(PowerAdjustEnd) sent with Cause=UserOptOut, Duration= approx time from step 11 to step 15, EnergyUse= a valid value"), - TestStep("15a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("15b", "TH reads OptOutState attribute.", - "Verify value is 0x03 (OptOut)"), - TestStep("15c", "TH reads PowerAdjustmentCapability attribute.", + TestStep("15", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Local Optimization Test Event", + "Verify DUT responds w/ status SUCCESS(0x00) and no event sent"), + TestStep("15a", "TH reads from the DUT the ESAState", + "Value has to be 0x04 (PowerAdjustActive)"), + TestStep("15b", "TH reads from the DUT the OptOutState", + "Value has to be 0x02 (LocalOptOut)"), + TestStep("16", "TH sends command PowerAdjustRequest with Power=PowerAdjustmentCapability[0].MaxPower, Duration=PowerAdjustmentCapability[0].MinDuration, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("17", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Grid Optimization Test Event", + "Verify DUT responds w/ status SUCCESS(0x00) and event DEM.S.E01(PowerAdjustEnd) sent with Cause=UserOptOut, Duration= approx time from step 11 to step 15, EnergyUse= a valid value"), + TestStep("17a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("17b", "TH reads from the DUT the OptOutState", + "Value has to be 0x03 (OptOut)"), + TestStep("17c", "TH reads from the DUT the PowerAdjustmentCapability", "Value has to include Cause=NoAdjustment."), - TestStep("16", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Test Event Clear", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("16a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("16b", "TH reads OptOutState attribute.", - "Verify value is 0x00 (NoOptOut)"), - TestStep("17", "TH sends PowerAdjustRequest with Power=PowerAdjustmentCapability[0].MaxPower, Duration=PowerAdjustmentCapability[0].MinDuration, Cause=LocalOptimization.", - "Verify DUT responds with status SUCCESS(0x00) and event DEM.S.E00(PowerAdjustStart) sent"), - TestStep("17a", "TH reads ESAState attribute.", - "Verify value is 0x04 (PowerAdjustActive)"), - TestStep("17b", "TH reads PowerAdjustmentCapability attribute.", + TestStep("18", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("18a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("18b", "TH reads from the DUT the OptOutState", + "Value has to be 0x00 (NoOptOut)"), + TestStep("19", "TH sends command PowerAdjustRequest with Power=PowerAdjustmentCapability[0].MaxPower, Duration=PowerAdjustmentCapability[0].MinDuration, Cause=LocalOptimization", + "Verify DUT responds w/ status SUCCESS(0x00) and event DEM.S.E00(PowerAdjustStart) sent"), + TestStep("19a", "TH reads from the DUT the ESAState", + "Value has to be 0x04 (PowerAdjustActive)"), + TestStep("19b", "TH reads from the DUT the PowerAdjustmentCapability", "Value has to include Cause=LocalOptimizationAdjustment."), - TestStep("18", "Wait 10 seconds.", - "Event DEM.S.E01(PowerAdjustEnd) sent with Cause=NormalCompletion, Duration=10s, EnergyUse= a valid value"), - TestStep("18a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("18b", "TH reads PowerAdjustmentCapability attribute.", + TestStep("20", "Wait 10 seconds", + "Event DEM.S.E01(PowerAdjustEnd) sent with Cause=NormalCompletion, Duration in the range 10-12s, EnergyUse= a valid value"), + TestStep("20a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("20b", "TH reads from the DUT the PowerAdjustmentCapability", "Value has to include Cause=NoAdjustment."), - TestStep("19", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Power Adjustment Test Event Clear", - "Verify DUT responds with status SUCCESS(0x00)"), + TestStep("21", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Power Adjustment Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), ] return steps @@ -155,22 +157,26 @@ async def test_TC_DEM_2_2(self): self.step("1") # Commission DUT - already done + self.step("2") + await self.validate_feature_map([Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPowerAdjustment], []) + + self.step("3") # Subscribe to Events and when they are sent push them to a queue for checking later events_callback = EventChangeCallback(Clusters.DeviceEnergyManagement) await events_callback.start(self.default_controller, self.dut_node_id, self.matter_test_config.endpoint) - self.step("2") + self.step("4") await self.check_test_event_triggers_enabled() - self.step("3") + self.step("5") await self.send_test_event_trigger_power_adjustment() - self.step("3a") + self.step("5a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("3b") + self.step("5b") powerAdjustCapabilityStruct = await self.read_dem_attribute_expect_success(attribute="PowerAdjustmentCapability") asserts.assert_greater_equal(len(powerAdjustCapabilityStruct.powerAdjustCapability), 1) logging.info(powerAdjustCapabilityStruct) @@ -192,66 +198,66 @@ async def test_TC_DEM_2_2(self): result = f"min_power {min_power} max_power {max_power} min_duration {min_duration} max_duration {max_duration}" logging.info(result) - self.step("3c") + self.step("5c") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kNoOptOut) - self.step("4") + self.step("6") await self.send_power_adjustment_command(power=powerAdjustCapabilityStruct.powerAdjustCapability[0].maxPower, duration=powerAdjustCapabilityStruct.powerAdjustCapability[0].minDuration, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization) event_data = events_callback.wait_for_event_report(Clusters.DeviceEnergyManagement.Events.PowerAdjustStart) - self.step("4a") + self.step("6a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kPowerAdjustActive) - self.step("4b") + self.step("6b") powerAdjustCapabilityStruct = await self.read_dem_attribute_expect_success(attribute="PowerAdjustmentCapability") asserts.assert_greater_equal(len(powerAdjustCapabilityStruct.powerAdjustCapability), 1) asserts.assert_equal(powerAdjustCapabilityStruct.cause, Clusters.DeviceEnergyManagement.Enums.PowerAdjustReasonEnum.kLocalOptimizationAdjustment) - self.step("5") + self.step("7") await self.send_cancel_power_adjustment_command() event_data = events_callback.wait_for_event_report(Clusters.DeviceEnergyManagement.Events.PowerAdjustEnd) asserts.assert_equal(event_data.cause, Clusters.DeviceEnergyManagement.Enums.CauseEnum.kCancelled) - self.step("5a") + self.step("7a") powerAdjustCapabilityStruct = await self.read_dem_attribute_expect_success(attribute="PowerAdjustmentCapability") asserts.assert_equal(powerAdjustCapabilityStruct.cause, Clusters.DeviceEnergyManagement.Enums.PowerAdjustReasonEnum.kNoAdjustment) - self.step("5b") + self.step("7b") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("6") + self.step("8") await self.send_cancel_power_adjustment_command(expected_status=Status.InvalidInState) - self.step("7") + self.step("9") await self.send_power_adjustment_command(power=max_power + 1, duration=min_duration, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("8") + self.step("10") await self.send_power_adjustment_command(power=min_power, duration=max_duration + 1, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("9") + self.step("11") await self.send_power_adjustment_command(power=min_power - 1, duration=max_duration, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("10") + self.step("12") await self.send_power_adjustment_command(power=max_power, duration=min_duration - 1, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("11") + self.step("13") start = datetime.datetime.now() await self.send_power_adjustment_command(power=powerAdjustCapabilityStruct.powerAdjustCapability[0].minPower, duration=min_duration, @@ -259,12 +265,12 @@ async def test_TC_DEM_2_2(self): event_data = events_callback.wait_for_event_report(Clusters.DeviceEnergyManagement.Events.PowerAdjustStart) - self.step("11a") + self.step("13a") powerAdjustCapabilityStruct = await self.read_dem_attribute_expect_success(attribute="PowerAdjustmentCapability") asserts.assert_equal(powerAdjustCapabilityStruct.cause, Clusters.DeviceEnergyManagement.Enums.PowerAdjustReasonEnum.kLocalOptimizationAdjustment) - self.step("12") + self.step("14") await self.send_power_adjustment_command(power=powerAdjustCapabilityStruct.powerAdjustCapability[0].maxPower, duration=powerAdjustCapabilityStruct.powerAdjustCapability[0].minDuration, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization) @@ -272,30 +278,30 @@ async def test_TC_DEM_2_2(self): # Wait 5 seconds for an event not to be reported events_callback.wait_for_event_expect_no_report(5) - self.step("12a") + self.step("14a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kPowerAdjustActive) - self.step("12b") + self.step("14b") powerAdjustCapabilityStruct = await self.read_dem_attribute_expect_success(attribute="PowerAdjustmentCapability") asserts.assert_equal(powerAdjustCapabilityStruct.cause, Clusters.DeviceEnergyManagement.Enums.PowerAdjustReasonEnum.kGridOptimizationAdjustment) - self.step("13") + self.step("15") await self.send_test_event_trigger_user_opt_out_local() - self.step("13a") + self.step("15a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kPowerAdjustActive) - self.step("13b") + self.step("15b") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kLocalOptOut) - self.step("14") + self.step("16") await self.send_power_adjustment_command(power=max_power, duration=powerAdjustCapabilityStruct.powerAdjustCapability[0].maxDuration, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("15") + self.step("17") await self.send_test_event_trigger_user_opt_out_grid() event_data = events_callback.wait_for_event_report(Clusters.DeviceEnergyManagement.Events.PowerAdjustEnd) asserts.assert_equal(event_data.cause, Clusters.DeviceEnergyManagement.Enums.CauseEnum.kUserOptOut) @@ -305,58 +311,60 @@ async def test_TC_DEM_2_2(self): asserts.assert_less_equal(abs(elapsed.seconds - event_data.duration), 3) asserts.assert_greater_equal(event_data.energyUse, 0) - self.step("15a") + self.step("17a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("15b") + self.step("17b") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kOptOut) - self.step("15c") + self.step("17c") powerAdjustCapabilityStruct = await self.read_dem_attribute_expect_success(attribute="PowerAdjustmentCapability") asserts.assert_equal(powerAdjustCapabilityStruct.cause, Clusters.DeviceEnergyManagement.Enums.PowerAdjustReasonEnum.kNoAdjustment) - self.step("16") + self.step("18") await self.send_test_event_trigger_user_opt_out_clear_all() - self.step("16a") + self.step("18a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("16b") + self.step("18b") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kNoOptOut) - self.step("17") + self.step("19") await self.send_power_adjustment_command(power=powerAdjustCapabilityStruct.powerAdjustCapability[0].maxPower, duration=powerAdjustCapabilityStruct.powerAdjustCapability[0].minDuration, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.Success) event_data = events_callback.wait_for_event_report(Clusters.DeviceEnergyManagement.Events.PowerAdjustStart) - self.step("17a") + self.step("19a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kPowerAdjustActive) - self.step("17b") + self.step("19b") powerAdjustCapabilityStruct = await self.read_dem_attribute_expect_success(attribute="PowerAdjustmentCapability") asserts.assert_equal(powerAdjustCapabilityStruct.cause, Clusters.DeviceEnergyManagement.Enums.PowerAdjustReasonEnum.kLocalOptimizationAdjustment) - self.step("18") + self.step("20") time.sleep(10) + # Allow a little tolerance checking the duration returned in the event as CI tests can run "slower" event_data = events_callback.wait_for_event_report(Clusters.DeviceEnergyManagement.Events.PowerAdjustEnd) - asserts.assert_equal(event_data.duration, 10) + asserts.assert_greater_equal(event_data.duration, 10) + asserts.assert_less_equal(event_data.duration, 12) asserts.assert_equal(event_data.cause, Clusters.DeviceEnergyManagement.Enums.CauseEnum.kNormalCompletion) asserts.assert_greater(event_data.energyUse, 0) - self.step("18a") + self.step("20a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("18b") + self.step("20b") powerAdjustCapabilityStruct = await self.read_dem_attribute_expect_success(attribute="PowerAdjustmentCapability") asserts.assert_equal(powerAdjustCapabilityStruct.cause, Clusters.DeviceEnergyManagement.Enums.PowerAdjustReasonEnum.kNoAdjustment) - self.step("19") + self.step("21") await self.send_test_event_trigger_power_adjustment_clear() diff --git a/src/python_testing/TC_DEM_2_3.py b/src/python_testing/TC_DEM_2_3.py index 6bdd81c710a914..d462c390596449 100644 --- a/src/python_testing/TC_DEM_2_3.py +++ b/src/python_testing/TC_DEM_2_3.py @@ -22,7 +22,7 @@ # test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x7a +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0xa --application evse # test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === @@ -31,7 +31,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue from chip.interaction_model import Status -from matter_testing_support import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_DEMTestBase import DEMTestBase @@ -54,78 +54,79 @@ def pics_TC_DEM_2_3(self): def steps_TC_DEM_2_3(self) -> list[TestStep]: steps = [ - TestStep("1", "Commissioning, already done", - is_commissioning=True), - TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster.", - "Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"), - TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Start Time Adjustment Test Event", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("3a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("3b", "TH reads Forecast attribute.", + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("2", "TH reads from the DUT the _FeatureMap_ attribute", + "Verify that the DUT response contains the _FeatureMap_ attribute. Verify StartTimeAdjustment feature is supported on the cluster. Verify PowerForecastReporting or StateForecastReporting feature is supported on the cluster."), + TestStep("3", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", + "Value has to be 1 (True)"), + TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Start Time Adjustment Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("4a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("4b", "TH reads from the DUT the Forecast", "Value has to include EarliestStartTime<=StartTime, LatestEndTime>=EndTime, and ForecastUpdateReason=Internal Optimization"), - TestStep("3c", "TH reads OptOutState attribute.", - "Verify value is 0x00 (NoOptOut)"), - TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Local Optimization Test Event", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("4a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("4b", "TH reads OptOutState attribute.", - "Verify value is 0x01 (LocalOptOut)"), - TestStep("5", "TH sends StartTimeAdjustRequest with RequestedStartTime=EarliestStartTime from Forecast, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("5a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("5b", "TH reads Forecast attribute.", + TestStep("4c", "TH reads from the DUT the OptOutState", + "Value has to be 0x00 (NoOptOut)"), + TestStep("5", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Local Optimization Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("5a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("5b", "TH reads from the DUT the OptOutState", + "Value has to be 0x01 (LocalOptOut)"), + TestStep("6", "TH sends command StartTimeAdjustRequest with RequestedStartTime=EarliestStartTime from Forecast, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("6a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("6b", "TH reads from the DUT the Forecast", "Value has to be unchanged from step 3b"), - TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Test Event Clear", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("6a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("6b", "TH reads OptOutState attribute.", - "Verify value is 0x00 (NoOptOut)"), - TestStep("7", "TH sends StartTimeAdjustRequest with RequestedStartTime=EarliestStartTime from Forecast, Cause=LocalOptimization.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("7a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("7b", "TH reads Forecast attribute.", + TestStep("7", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("7a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("7b", "TH reads from the DUT the OptOutState", + "Value has to be 0x00 (NoOptOut)"), + TestStep("8", "TH sends command StartTimeAdjustRequest with RequestedStartTime=EarliestStartTime from Forecast, Cause=LocalOptimization", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("8a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("8b", "TH reads from the DUT the Forecast", "Value has to include EarliestStartTime=StartTime, LatestEndTime>=EndTime, and ForecastUpdateReason=Local Optimization"), - TestStep("8", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Local Optimization Test Event", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("8a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("8b", "TH reads OptOutState attribute.", - "Verify value is 0x01 (LocalOptOut)"), - TestStep("8c", "TH reads Forecast attribute.", + TestStep("9", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Local Optimization Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("9a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("9b", "TH reads from the DUT the OptOutState", + "Value has to be 0x01 (LocalOptOut)"), + TestStep("9c", "TH reads from the DUT the Forecast", "Value has to include EarliestStartTime<=StartTime, LatestEndTime>=EndTime, and ForecastUpdateReason=Internal Optimization"), - TestStep("9", "TH sends StartTimeAdjustRequest with RequestedStartTime=StartTime+(LatestEndTime-EndTime) from Forecast, Cause=GridOptimization.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("9a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("9b", "TH reads Forecast attribute.", + TestStep("10", "TH sends command StartTimeAdjustRequest with RequestedStartTime=StartTime+(LatestEndTime-EndTime) from Forecast, Cause=GridOptimization", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("10a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("10b", "TH reads from the DUT the Forecast", "Value has to include EarliestStartTime<=StartTime, LatestEndTime=EndTime, and ForecastUpdateReason=Grid Optimization"), - TestStep("10", "TH sends CancelRequest.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("10a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("10b", "TH reads Forecast attribute.", + TestStep("11", "TH sends command CancelRequest", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("11a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("11b", "TH reads from the DUT the Forecast", "Value has to include EarliestStartTime<=StartTime, LatestEndTime>=EndTime, and ForecastUpdateReason=Internal Optimization"), - TestStep("11", "TH sends StartTimeAdjustRequest with RequestedStartTime=EarliestStartTime-1 from Forecast, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("11a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("11b", "TH reads Forecast attribute.", + TestStep("12", "TH sends command StartTimeAdjustRequest with RequestedStartTime=EarliestStartTime-1 from Forecast, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("12a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("12b", "TH reads from the DUT the Forecast", "Value has to include StartTime and EndTime unchanged from step 10b"), - TestStep("12", "TH sends StartTimeAdjustRequest with RequestedStartTime=StartTime+(LatestEndTime-EndTime)+1 from Forecast, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("12a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("12b", "TH reads Forecast attribute.", + TestStep("13", "TH sends command StartTimeAdjustRequest with RequestedStartTime=StartTime+(LatestEndTime-EndTime)+1 from Forecast, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("13a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("13b", "TH reads from the DUT the Forecast", "Value has to include StartTime and EndTime unchanged from step 10b"), - TestStep("13", "TH sends CancelRequest.", - "Verify DUT responds with status INVALID_IN_STATE(0xcb)"), - TestStep("14", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Start Time Adjustment Test Event Clear", - "Verify DUT responds with status SUCCESS(0x00)"), + TestStep("14", "TH sends command CancelRequest", + "Verify DUT responds w/ status INVALID_IN_STATE(0xcb)"), + TestStep("15", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Start Time Adjustment Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), ] return steps @@ -138,22 +139,20 @@ async def test_TC_DEM_2_3(self): self.step("1") # Commission DUT - already done - # Subscribe to Events and when they are sent push them to a queue for checking later - events_callback = EventChangeCallback(Clusters.DeviceEnergyManagement) - await events_callback.start(self.default_controller, - self.dut_node_id, - self.matter_test_config.endpoint) - self.step("2") - await self.check_test_event_triggers_enabled() + await self.validate_feature_map([Clusters.DeviceEnergyManagement.Bitmaps.Feature.kStartTimeAdjustment], []) + await self.validate_pfr_or_sfr_in_feature_map() self.step("3") + await self.check_test_event_triggers_enabled() + + self.step("4") await self.send_test_event_trigger_start_time_adjustment() - self.step("3a") + self.step("4a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("3b") + self.step("4b") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_not_equal(forecast, NullValue) @@ -166,48 +165,48 @@ async def test_TC_DEM_2_3(self): self.print_forecast(forecast) - self.step("3c") + self.step("4c") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kNoOptOut) - self.step("4") + self.step("5") await self.send_test_event_trigger_user_opt_out_local() - self.step("4a") + self.step("5a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("4b") + self.step("5b") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kLocalOptOut) - self.step("5") + self.step("6") await self.send_start_time_adjust_request_command(requestedStartTime=forecast.earliestStartTime, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("5a") + self.step("6a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("5b") + self.step("6b") forecast2 = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast, forecast2, f"Expected same forcast {forecast} to be == {forecast2}") - self.step("6") + self.step("7") await self.send_test_event_trigger_user_opt_out_clear_all() - self.step("6a") + self.step("7a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("6b") + self.step("7b") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kNoOptOut) - self.step("7") + self.step("8") await self.send_start_time_adjust_request_command(requestedStartTime=forecast.earliestStartTime, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization) - self.step("7a") + self.step("8a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("7b") + self.step("8b") forecast3 = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast3.earliestStartTime, forecast3.startTime, f"Expected earliestStartTime {forecast3.earliestStartTime} to be == startTime {forecast3.startTime}") @@ -216,16 +215,16 @@ async def test_TC_DEM_2_3(self): asserts.assert_equal(forecast3.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kLocalOptimization, f"Expected forecastUpdateReason {forecast3.forecastUpdateReason} to be == LocalOptimization {Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kLocalOptimization}") - self.step("8") + self.step("9") await self.send_test_event_trigger_user_opt_out_local() - self.step("8a") + self.step("9a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("8b") + self.step("9b") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kLocalOptOut) - self.step("8c") + self.step("9c") forecast4 = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_less_equal(forecast4.earliestStartTime, forecast4.startTime, f"Expected earliestStartTime {forecast4.earliestStartTime} to be <= startTime {forecast4.startTime}") @@ -234,14 +233,14 @@ async def test_TC_DEM_2_3(self): asserts.assert_equal(forecast4.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kInternalOptimization, f"Expected forecastUpdateReason {forecast4.forecastUpdateReason} to be == InternalOptimization {Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kInternalOptimization}") - self.step("9") + self.step("10") await self.send_start_time_adjust_request_command(requestedStartTime=forecast4.startTime+forecast4.latestEndTime - forecast4.endTime, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization) - self.step("9a") + self.step("10a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("9b") + self.step("10b") forecast5 = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_less_equal(forecast5.earliestStartTime, forecast5.startTime, f"Expected earliestStartTime {forecast5.earliestStartTime} to be <= startTime {forecast5.startTime}") @@ -250,13 +249,13 @@ async def test_TC_DEM_2_3(self): asserts.assert_equal(forecast5.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kGridOptimization, f"Expected forecastUpdateReason {forecast5.forecastUpdateReason} to be == GridOptimization {Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kGridOptimization}") - self.step("10") + self.step("11") await self.send_cancel_request_command() - self.step("10a") + self.step("11a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("10b") + self.step("11b") forecast6 = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_less_equal(forecast6.earliestStartTime, forecast6.startTime, f"Expected earliestStartTime {forecast6.earliestStartTime} to be <= startTime {forecast6.startTime}") @@ -265,38 +264,38 @@ async def test_TC_DEM_2_3(self): asserts.assert_equal(forecast6.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kInternalOptimization, f"Expected forecastUpdateReason {forecast6.forecastUpdateReason} to be == InternalOptimization {Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kInternalOptimization}") - self.step("11") + self.step("12") await self.send_start_time_adjust_request_command(requestedStartTime=forecast6.earliestStartTime - 1, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("11a") + self.step("12a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("11b") + self.step("12b") forecast7 = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast6.startTime, forecast7.startTime, f"Expected old startTime {forecast6.startTime} to be == startTime {forecast7.startTime}") asserts.assert_equal(forecast6.endTime, forecast7.endTime, f"Expected old endTime {forecast6.endTime} to be == endTime {forecast7.endTime}") - self.step("12") + self.step("13") await self.send_start_time_adjust_request_command(requestedStartTime=forecast7.startTime+(forecast7.latestEndTime-forecast7.endTime)+1, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("12a") + self.step("13a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("12b") + self.step("13b") forecast8 = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast7.startTime, forecast8.startTime, f"Expected old startTime {forecast7.startTime} to be == startTime {forecast8.startTime}") asserts.assert_equal(forecast7.endTime, forecast8.endTime, f"Expected old endTime {forecast7.endTime} to be == endTime {forecast8.endTime}") - self.step("13") + self.step("14") await self.send_cancel_request_command(expected_status=Status.InvalidInState) - self.step("14") + self.step("15") await self.send_test_event_trigger_start_time_adjustment_clear() diff --git a/src/python_testing/TC_DEM_2_4.py b/src/python_testing/TC_DEM_2_4.py index 390889fc9f2d28..734712099e8798 100644 --- a/src/python_testing/TC_DEM_2_4.py +++ b/src/python_testing/TC_DEM_2_4.py @@ -22,7 +22,7 @@ # test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x7a +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x12 --application evse # test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === @@ -55,98 +55,100 @@ def pics_TC_DEM_2_4(self): def steps_TC_DEM_2_4(self) -> list[TestStep]: steps = [ - TestStep("1", "Commissioning, already done", - is_commissioning=True), - TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster.", - "Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"), - TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Pausable Test Event", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("3a", "TH reads ESAState.", - "Verify value is 0x01 (Online)"), - TestStep("3b", "TH reads Forecast.", - "Value has to include IsPausable=True, slot[0].SlotIsPausable=True, slot[0].MinPauseDuration>1, slot[0].MaxPauseDuration>1, slot[1].SlotIsPausable=False, ActiveSlotNumber=0, and ForecastUpdateReason=Internal Optimization"), - TestStep("3c", "TH reads OptOutState.", - "Verify value is 0x00 (NoOptOut)"), - TestStep("4", "TH sends PauseRequest with Duration=Forecast.slots[0].MinPauseDuration-1, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("4a", "TH reads ESAState.", - "Verify value is 0x01 (Online)"), - TestStep("5", "TH sends PauseRequest with Duration=Forecast.slots[0].MaxPauseDuration+1, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("5a", "TH reads ESAState.", - "Verify value is 0x01 (Online)"), - TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Grid Optimization Test Event", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("6a", "TH reads ESAState.", - "Verify value is 0x01 (Online)"), - TestStep("6b", "TH reads OptOutState.", - "Verify value is 0x02 (GridOptOut)"), - TestStep("7", "TH sends PauseRequest with Duration=Forecast.slots[0].MinPauseDuration, Cause=GridOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("7a", "TH reads ESAState.", - "Verify value is 0x01 (Online)"), - TestStep("8", "TH sends PauseRequest with Duration=Forecast.slots[0].MinPauseDuration, Cause=LocalOptimization.", - "Verify DUT responds with status SUCCESS(0x00) and event DEM.S.E02(Paused) sent"), - TestStep("8a", "TH reads ESAState.", - "Verify value is 0x05 (Paused)"), - TestStep("9", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Local Optimization Test Event.", - "Verify DUT responds with status SUCCESS(0x00) and event DEM.S.E03(Resumed) sent with Cause=3 (UserOptOut)"), - TestStep("9a", "TH reads ESAState.", - "Verify value is 0x01 (Online)"), - TestStep("9b", "TH reads OptOutState.", - "Verify value is 0x03 (OptOut)"), - TestStep("9c", "TH reads Forecast.", - "Value has to include ForecastUpdateReason=Internal Optimization"), - TestStep("10", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Test Event Clear", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("10a", "TH reads ESAState.", - "Verify value is 0x01 (Online)"), - TestStep("10b", "TH reads OptOutState.", - "Verify value is 0x00 (NoOptOut)"), - TestStep("11", "TH sends PauseRequest with Duration=Forecast.slots[0].MinPauseDuration, Cause=LocalOptimization.", - "Verify DUT responds with status SUCCESS(0x00) and event DEM.S.E02(Paused) sent"), - TestStep("11a", "TH reads ESAState.", - "Verify value is 0x05 (Paused)"), - TestStep("11b", "TH reads Forecast.", + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("2", "TH reads from the DUT the _FeatureMap_ attribute", + "Verify that the DUT response contains the _FeatureMap_ attribute. Verify Pausable feature is supported on the cluster. Verify PowerForecastReporting or StateForecastReporting feature is supported on the cluster."), + TestStep("3", "Set up a subscription to all DeviceEnergyManagement cluster events"), + TestStep("4", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", + "Value has to be 1 (True)"), + TestStep("5", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Pausable Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("5a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("5b", "TH reads from the DUT the Forecast", + "Value has to include IsPausable=True, slots[0].SlotIsPausable=True, slots[0].MinPauseDuration>1, slots[0].MaxPauseDuration>1, slots[1].SlotIsPausable=False, ActiveSlotNumber=0, and ForecastUpdateReason=Internal Optimization"), + TestStep("5c", "TH reads from the DUT the OptOutState", + "Value has to be 0x00 (NoOptOut)"), + TestStep("6", "TH sends command PauseRequest with Duration=Forecast.slots[0].MinPauseDuration-1, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("6a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("7", "TH sends command PauseRequest with Duration=Forecast.slots[0].MaxPauseDuration+1, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("7a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("8", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Grid Optimization Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("8a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("8b", "TH reads from the DUT the OptOutState", + "Value has to be 0x02 (GridOptOut)"), + TestStep("9", "TH sends command PauseRequest with Duration=Forecast.slots[0].MinPauseDuration, Cause=GridOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("9a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("10", "TH sends command PauseRequest with Duration=Forecast.slots[0].MinPauseDuration, Cause=LocalOptimization", + "Verify DUT responds w/ status SUCCESS(0x00) and Event DEM.S.E02(Paused) sent"), + TestStep("10a", "TH reads from the DUT the ESAState", + "Value has to be 0x05 (Paused)"), + TestStep("11", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Local Optimization Test Event", + "Verify DUT responds w/ status SUCCESS(0x00) and Event DEM.S.E03(Resumed) sent with Cause=3 (UserOptOut)"), + TestStep("11a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("11b", "TH reads from the DUT the OptOutState", + "Value has to be 0x03 (OptOut)"), + TestStep("11c", "TH reads from the DUT the Forecast", + "Value has to include ForecastUpdateReason=Internal Optimization"), + TestStep("12", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("12a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("12b", "TH reads from the DUT the OptOutState", + "Value has to be 0x00 (NoOptOut)"), + TestStep("13", "TH sends command PauseRequest with Duration=Forecast.slots[0].MinPauseDuration, Cause=LocalOptimization", + "Verify DUT responds w/ status SUCCESS(0x00) and Event DEM.S.E02(Paused) sent"), + TestStep("13a", "TH reads from the DUT the ESAState", + "Value has to be 0x05 (Paused)"), + TestStep("13b", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=Local Optimization"), - TestStep("12", "TH sends ResumeRequest.", - "Verify DUT responds with status SUCCESS(0x00) and event DEM.S.E03(Resumed) sent with Cause=4 (Cancelled)"), - TestStep("12a", "TH reads ESAState.", - "Verify value is 0x01 (Online)"), - TestStep("12b", "TH reads Forecast.", - "Value has to include IsPausable=True, slots[0].SlotIsPausable=True, slots[0].MinPauseDuration>1, slots[0].MaxPauseDuration>1, slots[1].SlotIsPausable=False, ActiveSlotNumber=0, ForecastUpdateReason=Internal Optimization"), - TestStep("13", "TH sends PauseRequest with Duration=Forecast.slots[0].MinPauseDuration, Cause=LocalOptimization.", - "Verify DUT responds with status SUCCESS(0x00) and event DEM.S.E02(Paused) sent"), - TestStep("13a", "TH reads ESAState.", - "Verify value is 0x05 (Paused)"), - TestStep("13b", "TH reads Forecast.", + TestStep("14", "TH sends command ResumeRequest", + "Verify DUT responds w/ status SUCCESS(0x00) and Event DEM.S.E03(Resumed) sent with Cause=4 (Cancelled)"), + TestStep("14a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("14b", "TH reads from the DUT the Forecast", + "Value has to include IsPausable=True, slots[0].SlotIsPausable=True, slots[0].MinPauseDuration>1, slots[0].MaxPauseDuration>1, slots[1].SlotIsPausable=False, ActiveSlotNumber=0, ForecastUpdateReason=InternalOptimization"), + TestStep("15", "TH sends command PauseRequest with Duration=Forecast.slots[0].MinPauseDuration, Cause=LocalOptimization", + "Verify DUT responds w/ status SUCCESS(0x00) and Event DEM.S.E02(Paused) sent"), + TestStep("15a", "TH reads from the DUT the ESAState", + "Value has to be 0x05 (Paused)"), + TestStep("15b", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=Local Optimization"), - TestStep("14", "TH sends ResumeRequest.", - "Verify DUT responds with status SUCCESS(0x00) and event DEM.S.E03(Resumed) sent with Cause=4 (Cancelled)"), - TestStep("14a", "TH reads ESAState.", - "Verify value is 0x01 (Online)"), - TestStep("15", "TH sends PauseRequest with Duration=Forecast.slots[0].MinPauseDuration, Cause=LocalOptimization.", - "Verify DUT responds with status SUCCESS(0x00) and event DEM.S.E02(Paused) sent"), - TestStep("15a", "TH reads ESAState.", - "Verify value is 0x05 (Paused)"), - TestStep("16", "Wait for minPauseDuration.", + TestStep("16", "TH sends command ResumeRequest", + "Verify DUT responds w/ status SUCCESS(0x00) and Event DEM.S.E03(Resumed) sent with Cause=4 (Cancelled)"), + TestStep("16a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("17", "TH sends command PauseRequest with Duration=Forecast.slots[0].MinPauseDuration, Cause=LocalOptimization", + "Verify DUT responds w/ status SUCCESS(0x00) and Event DEM.S.E02(Paused) sent"), + TestStep("17a", "TH reads from the DUT the ESAState", + "Value has to be 0x05 (Paused)"), + TestStep("18", "Wait for minPauseDuration.", "Event DEM.S.E03(Resumed) sent with Cause=0 (NormalCompletion)"), - TestStep("16a", "TH reads ESAState.", - "Verify value is 0x01 (Online)"), - TestStep("17", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Pausable Test Event Next Slot.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("17a", "TH reads ESAState.", - "Verify value is 0x01 (Online)"), - TestStep("17b", "TH reads Forecast.", + TestStep("18a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("19", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Pausable Test Event Next Slot", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("19a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("19b", "TH reads from the DUT the Forecast", "Value has to include ActiveSlotNumber=1"), - TestStep("18", "TH sends PauseRequest with Duration=Forecast.slots[0].MinPauseDuration, Cause=LocalOptimization.", - "Verify DUT responds with status FAILURE(0x01)"), - TestStep("18a", "TH reads ESAState.", - "Verify value is 0x01 (Online)"), - TestStep("19", "TH sends ResumeRequest.", - "Verify DUT responds with status INVALID_IN_STATE(0xcb)"), - TestStep("20", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Pausable Test Event Clear.", - "Verify DUT responds with status SUCCESS(0x00)"), + TestStep("20", "TH sends command PauseRequest with Duration=Forecast.slots[0].MinPauseDuration, Cause=LocalOptimization", + "Verify DUT responds w/ status FAILURE(0x01)"), + TestStep("20a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("21", "TH sends command ResumeRequest", + "Verify DUT responds w/ status INVALID_IN_STATE(0xcb)"), + TestStep("22", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Pausable Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), ] return steps @@ -159,22 +161,27 @@ async def test_TC_DEM_2_4(self): self.step("1") # Commission DUT - already done + self.step("2") + await self.validate_feature_map([Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPausable], []) + await self.validate_pfr_or_sfr_in_feature_map() + + self.step("3") # Subscribe to Events and when they are sent push them to a queue for checking later events_callback = EventChangeCallback(Clusters.DeviceEnergyManagement) await events_callback.start(self.default_controller, self.dut_node_id, self.matter_test_config.endpoint) - self.step("2") + self.step("4") await self.check_test_event_triggers_enabled() - self.step("3") + self.step("5") await self.send_test_event_trigger_pausable() - self.step("3a") + self.step("5a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("3b") + self.step("5b") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_not_equal(forecast, NullValue) @@ -193,100 +200,100 @@ async def test_TC_DEM_2_4(self): f"Expected forecast forecastUpdateReason {forecast.forecastUpdateReason} to be == Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kInternalOptimization") self.print_forecast(forecast) - self.step("3c") + self.step("5c") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kNoOptOut) - self.step("4") + self.step("6") await self.send_pause_request_command(forecast.slots[0].minPauseDuration - 1, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("4a") + self.step("6a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("5") + self.step("7") await self.send_pause_request_command(forecast.slots[0].maxPauseDuration + 1, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("5a") + self.step("7a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("6") + self.step("8") await self.send_test_event_trigger_user_opt_out_grid() - self.step("6a") + self.step("8a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("6b") + self.step("8b") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kGridOptOut) - self.step("7") + self.step("9") await self.send_pause_request_command(forecast.slots[0].minPauseDuration, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.ConstraintError) - self.step("7a") + self.step("9a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("8") + self.step("10") await self.send_pause_request_command(forecast.slots[0].minPauseDuration, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization) event_data = events_callback.wait_for_event_report(Clusters.DeviceEnergyManagement.Events.Paused) - self.step("8a") + self.step("10a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kPaused) - self.step("9") + self.step("11") await self.send_test_event_trigger_user_opt_out_local() event_data = events_callback.wait_for_event_report(Clusters.DeviceEnergyManagement.Events.Resumed) asserts.assert_equal(event_data.cause, Clusters.DeviceEnergyManagement.Enums.CauseEnum.kUserOptOut) - self.step("9a") + self.step("11a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("9b") + self.step("11b") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kOptOut) - self.step("9c") + self.step("11c") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_not_equal(forecast, NullValue) asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kInternalOptimization) - self.step("10") + self.step("12") await self.send_test_event_trigger_user_opt_out_clear_all() - self.step("10a") + self.step("12a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("10b") + self.step("12b") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kNoOptOut) - self.step("11") + self.step("13") await self.send_pause_request_command(forecast.slots[0].minPauseDuration, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization) event_data = events_callback.wait_for_event_report(Clusters.DeviceEnergyManagement.Events.Paused) - self.step("11a") + self.step("13a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kPaused) - self.step("11b") + self.step("13b") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kLocalOptimization) - self.step("12") + self.step("14") await self.send_resume_request_command() event_data = events_callback.wait_for_event_report(Clusters.DeviceEnergyManagement.Events.Resumed) asserts.assert_equal(event_data.cause, Clusters.DeviceEnergyManagement.Enums.CauseEnum.kCancelled) - self.step("12a") + self.step("14a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("12b") + self.step("14b") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.isPausable, True) asserts.assert_greater(forecast.slots[0].minPauseDuration, 1) @@ -297,66 +304,66 @@ async def test_TC_DEM_2_4(self): asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kInternalOptimization) - self.step("13") + self.step("15") await self.send_pause_request_command(forecast.slots[0].minPauseDuration, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization) event_data = events_callback.wait_for_event_report(Clusters.DeviceEnergyManagement.Events.Paused) - self.step("13a") + self.step("15a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kPaused) - self.step("13b") + self.step("15b") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kLocalOptimization) - self.step("14") + self.step("16") await self.send_resume_request_command() event_data = events_callback.wait_for_event_report(Clusters.DeviceEnergyManagement.Events.Resumed) asserts.assert_equal(event_data.cause, Clusters.DeviceEnergyManagement.Enums.CauseEnum.kCancelled) - self.step("14a") + self.step("16a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("15") + self.step("17") await self.send_pause_request_command(forecast.slots[0].minPauseDuration, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization) event_data = events_callback.wait_for_event_report(Clusters.DeviceEnergyManagement.Events.Paused) - self.step("15a") + self.step("17a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kPaused) - self.step("16") + self.step("18") logging.info(f"Sleeping for forecast.slots[0].minPauseDuration {forecast.slots[0].minPauseDuration}s") time.sleep(forecast.slots[0].minPauseDuration) event_data = events_callback.wait_for_event_report(Clusters.DeviceEnergyManagement.Events.Resumed) asserts.assert_equal(event_data.cause, Clusters.DeviceEnergyManagement.Enums.CauseEnum.kNormalCompletion) - self.step("16a") + self.step("18a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("17") + self.step("19") await self.send_test_event_trigger_pausable_next_slot() - self.step("17a") + self.step("19a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("17b") + self.step("19b") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.activeSlotNumber, 1) - self.step("18") + self.step("20") await self.send_pause_request_command(forecast.slots[0].minPauseDuration, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.Failure) - self.step("18a") + self.step("20a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("19") + self.step("21") await self.send_resume_request_command(expected_status=Status.InvalidInState) - self.step("20") + self.step("22") await self.send_test_event_trigger_user_opt_out_clear_all() diff --git a/src/python_testing/TC_DEM_2_5.py b/src/python_testing/TC_DEM_2_5.py index 85d3cd779b22f4..38bac00f32cfdf 100644 --- a/src/python_testing/TC_DEM_2_5.py +++ b/src/python_testing/TC_DEM_2_5.py @@ -23,7 +23,7 @@ # test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x7a +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x22 --application evse # test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === @@ -34,7 +34,7 @@ import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_DEMTestBase import DEMTestBase @@ -59,80 +59,83 @@ def pics_TC_DEM_2_5(self): def steps_TC_DEM_2_5(self) -> list[TestStep]: """Execute the test steps.""" steps = [ - TestStep("1", "Commissioning, already done", - is_commissioning=True), - TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster.", - "Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"), - TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Forecast Adjustment Test Event", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("3a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("3b", "TH reads Forecast attribute.", + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("2", "TH reads from the DUT the _FeatureMap_ attribute", + "Verify that the DUT response contains the _FeatureMap_ attribute. Verify ForecastAdjustment feature is supported on the cluster. Verify PowerForecastReporting feature is supported on the cluster. Verify StateForecastReporting feature is not supported on the cluster."), + TestStep("3", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", + "Value has to be 1 (True)"), + TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Forecast Adjustment Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("4a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("4b", "TH reads from the DUT the Forecast", "Value has to include slots[0].MinPowerAdjustment, slots[0].MaxPowerAdjustment, slots[0].MinDurationAdjustment, slots[0].MaxDurationAdjustment"), - TestStep("3c", "TH reads OptOutState attribute.", - "Verify value is 0x00 (NoOptOut)"), - TestStep("4", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID+1, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization.", - "Verify DUT responds with status FAILURE(0x01)"), - TestStep("5", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=4, NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization.", - "Verify DUT responds with status FAILURE(0x01)"), - TestStep("6", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MinPowerAdjustment-1, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("7", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MaxPowerAdjustment+1, Duration=Forecast.Slots[0].MinDurationAdjustment}, Cause=GridOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("8", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment+1}, Cause=GridOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("9", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MaxPowerAdjustment, Duration=Forecast.Slots[0].MinDurationAdjustment-1}, Cause=GridOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("10", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment}, SlotAdjustments[1].{SlotIndex=4, NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization.", - "Verify DUT responds with status FAILURE(0x01)"), - TestStep("11", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Local Optimization Test Event", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("11a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("11b", "TH reads OptOutState attribute.", - "Verify value is 0x02 (LocalOptOut)"), - TestStep("12", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("13", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("13a", "TH reads Forecast attribute.", + TestStep("4c", "TH reads from the DUT the OptOutState", + "Value has to be 0x00 (NoOptOut)"), + TestStep("5", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("6", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID+1, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization", + "Verify DUT responds w/ status FAILURE(0x01)"), + TestStep("7", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=len(Forecast.Slots), NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization", + "Verify DUT responds w/ status FAILURE(0x01)"), + TestStep("8", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MinPowerAdjustment-1, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("9", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MaxPowerAdjustment+1, Duration=Forecast.Slots[0].MinDurationAdjustment}, Cause=GridOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("10", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment+1}, Cause=GridOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("11", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MaxPowerAdjustment, Duration=Forecast.Slots[0].MinDurationAdjustment-1}, Cause=GridOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("12", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment}, SlotAdjustments[1].{SlotIndex=4, NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization", + "Verify DUT responds w/ status FAILURE(0x01)"), + TestStep("13", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Local Optimization Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("13a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("13b", "TH reads from the DUT the OptOutState", + "Value has to be 0x02 (LocalOptOut)"), + TestStep("14", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("15", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("15a", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=GridOptimization"), - TestStep("14", "TH sends CancelRequest.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("14a", "TH reads Forecast attribute.", + TestStep("16", "TH sends command CancelRequest", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("16a", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=InternalOptimization"), - TestStep("15", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("15a", "TH reads Forecast attribute.", + TestStep("17", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("17a", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=GridOptimization"), - TestStep("16", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Grid Optimization Test Event", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("16a", "TH reads OptOutState attribute.", - "Verify value is 0x03 (OptOut)"), - TestStep("16b", "TH reads Forecast attribute.", + TestStep("18", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Grid Optimization Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("18a", "TH reads from the DUT the OptOutState", + "Value has to be 0x03 (OptOut)"), + TestStep("18b", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=Internal Optimization"), - TestStep("17", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("18", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Test Event Clear", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("18a", "TH reads OptOutState attribute.", - "Verify value is 0x00 (NoOptOut)"), - TestStep("19", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MaxPowerAdjustment, Duration=Forecast.Slots[0].MinDurationAdjustment}, Cause=LocalOptimization.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("19a", "TH reads Forecast attribute.", + TestStep("19", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MinPowerAdjustment, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("20", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("20a", "TH reads from the DUT the OptOutState", + "Value has to be 0x00 (NoOptOut)"), + TestStep("21", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MaxPowerAdjustment, Duration=Forecast.Slots[0].MinDurationAdjustment}, Cause=LocalOptimization", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("21a", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=LocalOptimization"), - TestStep("20", "TH sends CancelRequest.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("20a", "TH reads Forecast attribute.", + TestStep("22", "TH sends command CancelRequest", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("22a", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=InternalOptimization"), - TestStep("21", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Forecast Adjustment Test Event Next Slot", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("22", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MaxPowerAdjustment, Duration=Forecast.Slots[0].MinDurationAdjustment}, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("23", "TH sends CancelRequest.", - "Verify DUT responds with status INVALID_IN_STATE(0xcb)"), - TestStep("24", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Forecast Adjustment Test Event Clear", - "Verify DUT responds with status SUCCESS(0x00)"), + TestStep("23", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Forecast Adjustment Test Event Next Slot", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("24", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, NominalPower=Forecast.Slots[0].MaxPowerAdjustment, Duration=Forecast.Slots[0].MinDurationAdjustment}, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("25", "TH sends command CancelRequest", + "Verify DUT responds w/ status INVALID_IN_STATE(0xcb)"), + TestStep("26", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Forecast Adjustment Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), ] return steps @@ -144,22 +147,21 @@ async def test_TC_DEM_2_5(self): self.step("1") # Commission DUT - already done - # Subscribe to Events and when they are sent push them to a queue for checking later - events_callback = EventChangeCallback(Clusters.DeviceEnergyManagement) - await events_callback.start(self.default_controller, - self.dut_node_id, - self.matter_test_config.endpoint) - self.step("2") - await self.check_test_event_triggers_enabled() + await self.validate_feature_map(must_have_features=[Clusters.DeviceEnergyManagement.Bitmaps.Feature.kForecastAdjustment, + Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPowerForecastReporting], + must_not_have_features=[Clusters.DeviceEnergyManagement.Bitmaps.Feature.kStateForecastReporting]) self.step("3") + await self.check_test_event_triggers_enabled() + + self.step("4") await self.send_test_event_trigger_forecast_adjustment() - self.step("3a") + self.step("4a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("3b") + self.step("4b") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_is_not_none(forecast.slots[0].minPowerAdjustment) @@ -167,138 +169,143 @@ async def test_TC_DEM_2_5(self): asserts.assert_is_not_none(forecast.slots[0].minDurationAdjustment) asserts.assert_is_not_none(forecast.slots[0].maxDurationAdjustment) - self.step("3c") + self.step("4c") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kNoOptOut) - self.step("4") + self.step("5") + slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( + slotIndex=0, duration=forecast.slots[0].minDurationAdjustment)] + await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.ConstraintError) + + self.step("6") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=0, nominalPower=forecast.slots[0].minPowerAdjustment, duration=forecast.slots[0].maxDurationAdjustment)] await self.send_modify_forecast_request_command(forecast.forecastID + 1, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.Failure) - self.step("5") + self.step("7") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( - slotIndex=4, nominalPower=forecast.slots[0].minPowerAdjustment, duration=forecast.slots[0].maxDurationAdjustment)] + slotIndex=len(forecast.slots), nominalPower=forecast.slots[0].minPowerAdjustment, duration=forecast.slots[0].maxDurationAdjustment)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.Failure) - self.step("6") + self.step("8") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=0, nominalPower=forecast.slots[0].minPowerAdjustment - 1, duration=forecast.slots[0].maxDurationAdjustment)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.ConstraintError) - self.step("7") + self.step("9") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=0, nominalPower=forecast.slots[0].maxPowerAdjustment + 1, duration=forecast.slots[0].minDurationAdjustment)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.ConstraintError) - self.step("8") + self.step("10") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=0, nominalPower=forecast.slots[0].minPowerAdjustment, duration=forecast.slots[0].maxDurationAdjustment + 1)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.ConstraintError) - self.step("9") + self.step("11") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=0, nominalPower=forecast.slots[0].maxPowerAdjustment, duration=forecast.slots[0].minDurationAdjustment - 1)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.ConstraintError) - self.step("10") + self.step("12") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct(slotIndex=0, nominalPower=forecast.slots[0].minPowerAdjustment, duration=forecast.slots[0].maxDurationAdjustment), Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct(slotIndex=4, nominalPower=forecast.slots[0].minPowerAdjustment, duration=forecast.slots[0].maxDurationAdjustment)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.Failure) - self.step("11") + self.step("13") await self.send_test_event_trigger_user_opt_out_local() - self.step("11a") + self.step("13a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("11b") + self.step("13b") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kLocalOptOut) - self.step("12") + self.step("14") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=0, nominalPower=forecast.slots[0].minPowerAdjustment, duration=forecast.slots[0].maxDurationAdjustment)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("13") + self.step("15") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=0, nominalPower=forecast.slots[0].minPowerAdjustment, duration=forecast.slots[0].maxDurationAdjustment)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.Success) - self.step("13a") + self.step("15a") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kGridOptimization) - self.step("14") + self.step("16") await self.send_cancel_request_command() - self.step("14a") + self.step("16a") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kInternalOptimization) - self.step("15") + self.step("17") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=0, nominalPower=forecast.slots[0].minPowerAdjustment, duration=forecast.slots[0].maxDurationAdjustment)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.Success) - self.step("15a") + self.step("17a") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kGridOptimization) - self.step("16") + self.step("18") await self.send_test_event_trigger_user_opt_out_grid() - self.step("16a") + self.step("18a") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kOptOut) - self.step("16b") + self.step("18b") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kInternalOptimization) - self.step("17") + self.step("19") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=0, nominalPower=forecast.slots[0].minPowerAdjustment, duration=forecast.slots[0].maxDurationAdjustment)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.ConstraintError) - self.step("18") + self.step("20") await self.send_test_event_trigger_user_opt_out_clear_all() - self.step("18a") + self.step("20a") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kNoOptOut) - self.step("19") + self.step("21") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=0, nominalPower=forecast.slots[0].minPowerAdjustment, duration=forecast.slots[0].minDurationAdjustment)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.Success) - self.step("19a") + self.step("21a") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kLocalOptimization) - self.step("20") + self.step("22") await self.send_cancel_request_command() - self.step("20a") + self.step("22a") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kInternalOptimization) - self.step("21") + self.step("23") await self.send_test_event_trigger_forecast_adjustment_next_slot() - self.step("22") + self.step("24") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=0, nominalPower=forecast.slots[0].minPowerAdjustment, duration=forecast.slots[0].minDurationAdjustment)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("23") + self.step("25") await self.send_cancel_request_command(expected_status=Status.InvalidInState) - self.step("24") + self.step("26") await self.send_test_event_trigger_forecast_adjustment_clear() diff --git a/src/python_testing/TC_DEM_2_6.py b/src/python_testing/TC_DEM_2_6.py index 7390436effd937..c05a80c6c3909a 100644 --- a/src/python_testing/TC_DEM_2_6.py +++ b/src/python_testing/TC_DEM_2_6.py @@ -23,7 +23,7 @@ # test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x7c +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x7c --application evse # test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === @@ -34,7 +34,7 @@ import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_DEMTestBase import DEMTestBase @@ -59,76 +59,77 @@ def pics_TC_DEM_2_6(self): def steps_TC_DEM_2_6(self) -> list[TestStep]: """Execute the test steps.""" steps = [ - TestStep("1", "Commissioning, already done", - is_commissioning=True), - TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster.", - "Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"), - TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Forecast Adjustment Test Event", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("3a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("3b", "TH reads Forecast attribute.", + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("2", "TH reads from the DUT the _FeatureMap_ attribute", + "Verify that the DUT response contains the _FeatureMap_ attribute. Verify ForecastAdjustment feature is supported on the cluster. Verify StateForecastReporting feature is supported on the cluster. Verify PowerForecastReporting feature is not supported on the cluster."), + TestStep("3", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", + "Value has to be 1 (True)"), + TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Forecast Adjustment Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("4a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("4b", "TH reads from the DUT the Forecast", "Value has to include slots[0].MinDurationAdjustment, slots[0].MaxDurationAdjustment"), - TestStep("3c", "TH reads OptOutState attribute.", - "Verify value is 0x00 (NoOptOut)"), - TestStep("4", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID+1, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization.", - "Verify DUT responds with status FAILURE(0x01)"), - TestStep("5", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=4, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization.", - "Verify DUT responds with status FAILURE(0x01)"), - TestStep("6", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MaxDurationAdjustment+1}, Cause=GridOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("7", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MinDurationAdjustment-1}, Cause=GridOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("8", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MaxDurationAdjustment}, SlotAdjustments[1].{SlotIndex=4, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization.", - "Verify DUT responds with status FAILURE(0x01)"), - TestStep("9", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Local Optimization Test Event", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("9a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("9b", "TH reads OptOutState attribute.", - "Verify value is 0x02 (LocalOptOut)"), - TestStep("10", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("11", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("11a", "TH reads Forecast attribute.", + TestStep("4c", "TH reads from the DUT the OptOutState", + "Value has to be 0x00 (NoOptOut)"), + TestStep("5", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID+1, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization", + "Verify DUT responds w/ status FAILURE(0x01)"), + TestStep("6", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=4, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization", + "Verify DUT responds w/ status FAILURE(0x01)"), + TestStep("7", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MaxDurationAdjustment+1}, Cause=GridOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("8", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MinDurationAdjustment-1}, Cause=GridOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("9", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MaxDurationAdjustment}, SlotAdjustments[1].{SlotIndex=4, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization", + "Verify DUT responds w/ status FAILURE(0x01)"), + TestStep("10", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Local Optimization Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("10a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("10b", "TH reads from the DUT the OptOutState", + "Value has to be 0x02 (LocalOptOut)"), + TestStep("11", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("12", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("12a", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=GridOptimization"), - TestStep("12", "TH sends CancelRequest.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("12a", "TH reads Forecast attribute.", + TestStep("13", "TH sends command CancelRequest", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("13a", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=InternalOptimization"), - TestStep("13", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("13a", "TH reads Forecast attribute.", + TestStep("14", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("14a", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=GridOptimization"), - TestStep("14", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Grid Optimization Test Event", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("14a", "TH reads OptOutState attribute.", - "Verify value is 0x03 (OptOut)"), - TestStep("14b", "TH reads Forecast attribute.", + TestStep("15", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Grid Optimization Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("15a", "TH reads from the DUT the OptOutState", + "Value has to be 0x03 (OptOut)"), + TestStep("15b", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=Internal Optimization"), - TestStep("15", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("16", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Test Event Clear", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("16a", "TH reads OptOutState attribute.", - "Verify value is 0x00 (NoOptOut)"), - TestStep("17", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MinDurationAdjustment}, Cause=LocalOptimization.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("17a", "TH reads Forecast attribute.", + TestStep("16", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MaxDurationAdjustment}, Cause=GridOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("17", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("17a", "TH reads from the DUT the OptOutState", + "Value has to be 0x00 (NoOptOut)"), + TestStep("18", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MinDurationAdjustment}, Cause=LocalOptimization", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("18a", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=LocalOptimization"), - TestStep("18", "TH sends CancelRequest.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("18a", "TH reads Forecast attribute.", + TestStep("19", "TH sends command CancelRequest", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("19a", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=InternalOptimization"), - TestStep("19", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Forecast Adjustment Test Event Next Slot", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("20", "TH sends ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MinDurationAdjustment}, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("21", "TH sends CancelRequest.", - "Verify DUT responds with status INVALID_IN_STATE(0xcb)"), - TestStep("22", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Forecast Adjustment Test Event Clear", - "Verify DUT responds with status SUCCESS(0x00)"), + TestStep("20", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Forecast Adjustment Test Event Next Slot", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("21", "TH sends command ModifyForecastRequest with ForecastID=Forecast.ForecastID, SlotAdjustments[0].{SlotIndex=0, Duration=Forecast.Slots[0].MinDurationAdjustment}, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("22", "TH sends command CancelRequest", + "Verify DUT responds w/ status INVALID_IN_STATE(0xcb)"), + TestStep("23", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Forecast Adjustment Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), ] return steps @@ -140,149 +141,148 @@ async def test_TC_DEM_2_6(self): self.step("1") # Commission DUT - already done - # Subscribe to Events and when they are sent push them to a queue for checking later - events_callback = EventChangeCallback(Clusters.DeviceEnergyManagement) - await events_callback.start(self.default_controller, - self.dut_node_id, - self.matter_test_config.endpoint) - self.step("2") - await self.check_test_event_triggers_enabled() + await self.validate_feature_map(must_have_features=[Clusters.DeviceEnergyManagement.Bitmaps.Feature.kForecastAdjustment, + Clusters.DeviceEnergyManagement.Bitmaps.Feature.kStateForecastReporting], + must_not_have_features=[Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPowerForecastReporting]) self.step("3") + await self.check_test_event_triggers_enabled() + + self.step("4") await self.send_test_event_trigger_forecast_adjustment() - self.step("3a") + self.step("4a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("3b") + self.step("4b") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_is_not_none(forecast.slots[0].minDurationAdjustment) asserts.assert_is_not_none(forecast.slots[0].maxDurationAdjustment) - self.step("3c") + self.step("4c") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kNoOptOut) - self.step("4") + self.step("5") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=0, duration=forecast.slots[0].maxDurationAdjustment)] await self.send_modify_forecast_request_command(forecast.forecastID + 1, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.Failure) - self.step("5") + self.step("6") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=4, duration=forecast.slots[0].maxDurationAdjustment)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.Failure) - self.step("6") + self.step("7") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=0, duration=forecast.slots[0].maxDurationAdjustment + 1)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.ConstraintError) - self.step("7") + self.step("8") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=0, duration=forecast.slots[0].minDurationAdjustment - 1)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.ConstraintError) - self.step("8") + self.step("9") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct(slotIndex=0, duration=forecast.slots[0].maxDurationAdjustment), Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct(slotIndex=4, duration=forecast.slots[0].maxDurationAdjustment)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.Failure) - self.step("9") + self.step("10") await self.send_test_event_trigger_user_opt_out_local() - self.step("9a") + self.step("10a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("9b") + self.step("10b") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kLocalOptOut) - self.step("10") + self.step("11") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=0, duration=forecast.slots[0].maxDurationAdjustment)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("11") + self.step("12") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=0, duration=forecast.slots[0].maxDurationAdjustment)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.Success) - self.step("11a") + self.step("12a") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") logging.info(forecast) asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kGridOptimization) - self.step("12") + self.step("13") await self.send_cancel_request_command() - self.step("12a") + self.step("13a") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kInternalOptimization) - self.step("13") + self.step("14") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=0, duration=forecast.slots[0].maxDurationAdjustment)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.Success) - self.step("13a") + self.step("14a") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kGridOptimization) - self.step("14") + self.step("15") await self.send_test_event_trigger_user_opt_out_grid() - self.step("14a") + self.step("15a") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kOptOut) - self.step("14b") + self.step("15b") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kInternalOptimization) - self.step("15") + self.step("16") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=0, duration=forecast.slots[0].maxDurationAdjustment)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.ConstraintError) - self.step("16") + self.step("17") await self.send_test_event_trigger_user_opt_out_clear_all() - self.step("16a") + self.step("17a") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kNoOptOut) - self.step("17") + self.step("18") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=0, duration=forecast.slots[0].minDurationAdjustment)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.Success) - self.step("17a") + self.step("18a") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kLocalOptimization) - self.step("18") + self.step("19") await self.send_cancel_request_command() - self.step("18a") + self.step("19a") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kInternalOptimization) - self.step("19") + self.step("20") await self.send_test_event_trigger_forecast_adjustment_next_slot() - self.step("20") + self.step("21") slotAdjustments = [Clusters.DeviceEnergyManagement.Structs.SlotAdjustmentStruct( slotIndex=0, duration=forecast.slots[0].minDurationAdjustment)] await self.send_modify_forecast_request_command(forecast.forecastID, slotAdjustments, Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("21") + self.step("22") await self.send_cancel_request_command(expected_status=Status.InvalidInState) - self.step("22") + self.step("23") await self.send_test_event_trigger_forecast_adjustment_clear() diff --git a/src/python_testing/TC_DEM_2_7.py b/src/python_testing/TC_DEM_2_7.py index fa7dba14a53315..b45643868a6e71 100644 --- a/src/python_testing/TC_DEM_2_7.py +++ b/src/python_testing/TC_DEM_2_7.py @@ -23,7 +23,7 @@ # test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x7a +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x7a --application evse # test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === @@ -34,7 +34,7 @@ import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_DEMTestBase import DEMTestBase @@ -59,84 +59,85 @@ def pics_TC_DEM_2_7(self): def steps_TC_DEM_2_7(self) -> list[TestStep]: """Execute the test steps.""" steps = [ - TestStep("1", "Commissioning, already done", - is_commissioning=True), - TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster.", - "Verify value is 1 (True)"), - TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Constraints-based Adjustment Test Event.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("3a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("3b", "TH reads Forecast attribute.", + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("2", "TH reads from the DUT the _FeatureMap_ attribute", + "Verify that the DUT response contains the _FeatureMap_ attribute. Verify ConstraintBasedAdjustment feature is supported on the cluster. Verify PowerForecastReporting feature is supported on the cluster. Verify StateForecastReporting feature is not supported on the cluster."), + TestStep("3", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", + "Value has to be 1 (True)"), + TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Constraints-based Adjustment Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("4a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("4b", "TH reads from the DUT the Forecast", "Value has to include valid slots[0].NominalPower, slots[0].MinPower, slots[0].MaxPower, slots[0].NominalEnergy"), - TestStep("3c", "TH reads OptOutState attribute.", - "Verify value is 0x00 (NoOptOut)"), - TestStep("4", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=now()-10, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("5", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=now()+10, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, constraints[1].{StartTime=now()+20, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, constraints[2].{StartTime=now()+40, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("6", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=now()+10, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, constraints[1].{StartTime=now()+30, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, constraints[2].{StartTime=now()+40, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("7", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=now()+30, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, constraints[1].{StartTime=now()+10, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, constraints[2].{StartTime=now()+50, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("8", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=now()+10, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, constraints[1].{StartTime=now()+50, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, constraints[2].{StartTime=now()+30, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("9", "TH reads AbsMaxPower attribute attribute.", + TestStep("4c", "TH reads from the DUT the OptOutState", + "Value has to be 0x00 (NoOptOut)"), + TestStep("5", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=now()-10, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("6", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=now()+10, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, constraints[1].{StartTime=now()+20, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, constraints[2].{StartTime=now()+40, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("7", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=now()+10, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, constraints[1].{StartTime=now()+30, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, constraints[2].{StartTime=now()+40, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("8", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=now()+30, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, constraints[1].{StartTime=now()+10, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, constraints[2].{StartTime=now()+50, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("9", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=now()+10, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, constraints[1].{StartTime=now()+50, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, constraints[2].{StartTime=now()+30, Duration=20, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("10", "TH reads from the DUT the AbsMaxPower attribute.", "Save the value"), - TestStep("9a", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, NominalPower=AbsMaxPower+1, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("10", "TH reads AbsMinPower attribute attribute.", + TestStep("10a", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, NominalPower=AbsMaxPower+1, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("11", "TH reads from the DUT the AbsMinPower attribute.", "Save the value"), - TestStep("10a", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, NominalPower=AbsMinPower-1, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("11", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, NominalPower=Forecast.Slots[0].NominalPower}, Cause=LocalOptimization.", - "Verify DUT responds with status InvalidCommand"), - TestStep("12", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=LocalOptimization.", - "Verify DUT responds with status InvalidCommand"), - TestStep("13", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Local Optimization Test Event.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("13a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("13b", "TH reads OptOutState attribute.", - "Verify value is 0x02 (LocalOptOut)"), - TestStep("14", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("15", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=GridOptimization.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("15a", "TH reads Forecast attribute.", + TestStep("11a", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, NominalPower=AbsMinPower-1, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("12", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, NominalPower=Forecast.Slots[0].NominalPower}, Cause=LocalOptimization", + "Verify DUT responds w/ status INVALID_COMMAND(0x85)"), + TestStep("13", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=LocalOptimization", + "Verify DUT responds w/ status INVALID_COMMAND(0x85)"), + TestStep("14", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Local Optimization Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("14a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("14b", "TH reads from the DUT the OptOutState", + "Value has to be 0x02 (LocalOptOut)"), + TestStep("15", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("16", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=GridOptimization", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("16a", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=GridOptimization"), - TestStep("16", "TH sends CancelRequest.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("16a", "TH reads Forecast attribute.", + TestStep("17", "TH sends command CancelRequest", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("17a", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=InternalOptimization"), - TestStep("17", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=GridOptimization.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("17a", "TH reads Forecast attribute.", + TestStep("18", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=GridOptimization", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("18a", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=GridOptimization"), - TestStep("18", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Grid Optimization Test Event.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("18a", "TH reads OptOutState attribute.", - "Verify value is 0x03 (OptOut)"), - TestStep("18b", "TH reads Forecast attribute.", + TestStep("19", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Grid Optimization Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("19a", "TH reads from the DUT the OptOutState", + "Value has to be 0x03 (OptOut)"), + TestStep("19b", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=InternalOptimization"), - TestStep("19", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=GridOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("20", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Test Event Clear.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("20a", "TH reads OptOutState attribute.", - "Verify value is 0x00 (NoOptOut)"), - TestStep("21", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=LocalOptimization.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("21a", "TH reads Forecast attribute.", + TestStep("20", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=GridOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("21", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("21a", "TH reads from the DUT the OptOutState", + "Value has to be 0x00 (NoOptOut)"), + TestStep("22", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, NominalPower=Forecast.Slots[0].NominalPower, MaximumEnergy=Forecast.Slots[0].NominalEnergy}, Cause=LocalOptimization", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("22a", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=LocalOptimization"), - TestStep("22", "TH sends CancelRequest.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("22a", "TH reads Forecast attribute.", + TestStep("23", "TH sends command CancelRequest", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("23a", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=InternalOptimization"), - TestStep("23", "TH sends CancelRequest.", - "Verify DUT responds with status INVALID_IN_STATE(0xcb)"), - TestStep("24", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Constraints-based Adjustment Adjustment Test Event Clear.", - "Verify DUT responds with status SUCCESS(0x00)"), + TestStep("24", "TH sends command CancelRequest", + "Verify DUT responds w/ status INVALID_IN_STATE(0xcb)"), + TestStep("25", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Constraints-based Adjustment Adjustment Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), ] return steps @@ -148,22 +149,21 @@ async def test_TC_DEM_2_7(self): self.step("1") # Commission DUT - already done - # Subscribe to Events and when they are sent push them to a queue for checking later - events_callback = EventChangeCallback(Clusters.DeviceEnergyManagement) - await events_callback.start(self.default_controller, - self.dut_node_id, - self.matter_test_config.endpoint) - self.step("2") - await self.check_test_event_triggers_enabled() + await self.validate_feature_map(must_have_features=[Clusters.DeviceEnergyManagement.Bitmaps.Feature.kConstraintBasedAdjustment, + Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPowerForecastReporting], + must_not_have_features=[Clusters.DeviceEnergyManagement.Bitmaps.Feature.kStateForecastReporting]) self.step("3") + await self.check_test_event_triggers_enabled() + + self.step("4") await self.send_test_event_trigger_constraint_based_adjustment() - self.step("3a") + self.step("4a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("3b") + self.step("4b") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") logging.info(forecast) asserts.assert_greater(forecast.slots[0].nominalPower, 0) @@ -171,10 +171,10 @@ async def test_TC_DEM_2_7(self): asserts.assert_greater(forecast.slots[0].maxPower, 0) asserts.assert_greater(forecast.slots[0].nominalEnergy, 0) - self.step("3c") + self.step("4c") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kNoOptOut) - self.step("4") + self.step("5") # Matter UTC is time since 00:00:00 1/1/2000 now = self.get_current_utc_time_in_seconds() @@ -182,7 +182,7 @@ async def test_TC_DEM_2_7(self): nominalPower=forecast.slots[0].nominalPower, maximumEnergy=forecast.slots[0].nominalEnergy)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("5") + self.step("6") now = self.get_current_utc_time_in_seconds() constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct(startTime=now + 10, duration=20, @@ -193,7 +193,7 @@ async def test_TC_DEM_2_7(self): nominalPower=forecast.slots[0].nominalPower, maximumEnergy=forecast.slots[0].nominalEnergy)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("6") + self.step("7") now = self.get_current_utc_time_in_seconds() constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct(startTime=now + 10, duration=20, @@ -204,7 +204,7 @@ async def test_TC_DEM_2_7(self): nominalPower=forecast.slots[0].nominalPower, maximumEnergy=forecast.slots[0].nominalEnergy)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("7") + self.step("8") now = self.get_current_utc_time_in_seconds() constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct(startTime=now + 30, duration=20, @@ -215,7 +215,7 @@ async def test_TC_DEM_2_7(self): nominalPower=forecast.slots[0].nominalPower, maximumEnergy=forecast.slots[0].nominalEnergy)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("8") + self.step("9") now = self.get_current_utc_time_in_seconds() constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct(startTime=now + 10, duration=20, @@ -226,118 +226,118 @@ async def test_TC_DEM_2_7(self): nominalPower=forecast.slots[0].nominalPower, maximumEnergy=forecast.slots[0].nominalEnergy)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("9") + self.step("10") absMaxPower = await self.read_dem_attribute_expect_success(attribute="AbsMaxPower") - self.step("9a") + self.step("10a") constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct( startTime=forecast.startTime, duration=forecast.slots[0].defaultDuration, nominalPower=absMaxPower + 1, maximumEnergy=forecast.slots[0].nominalEnergy)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("10") + self.step("11") absMinPower = await self.read_dem_attribute_expect_success(attribute="AbsMinPower") - self.step("10a") + self.step("11a") constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct( startTime=forecast.startTime, duration=forecast.slots[0].defaultDuration, nominalPower=absMinPower - 1, maximumEnergy=forecast.slots[0].nominalEnergy)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("11") + self.step("12") constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct( startTime=forecast.startTime, duration=forecast.slots[0].defaultDuration, nominalPower=forecast.slots[0].nominalPower)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.InvalidCommand) - self.step("12") + self.step("13") constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct( startTime=forecast.startTime, duration=forecast.slots[0].defaultDuration, maximumEnergy=forecast.slots[0].nominalEnergy)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.InvalidCommand) - self.step("13") + self.step("14") await self.send_test_event_trigger_user_opt_out_local() - self.step("13a") + self.step("14a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("13b") + self.step("14b") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kLocalOptOut) - self.step("14") + self.step("15") constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct( startTime=forecast.startTime, duration=forecast.slots[0].defaultDuration, nominalPower=forecast.slots[0].nominalPower, maximumEnergy=forecast.slots[0].nominalEnergy)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("15") + self.step("16") constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct( startTime=forecast.startTime, duration=forecast.slots[0].defaultDuration, nominalPower=forecast.slots[0].nominalPower, maximumEnergy=forecast.slots[0].nominalEnergy)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.Success) - self.step("15a") + self.step("16a") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kGridOptimization) - self.step("16") + self.step("17") await self.send_cancel_request_command() - self.step("16a") + self.step("17a") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kInternalOptimization) - self.step("17") + self.step("18") constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct( startTime=forecast.startTime, duration=forecast.slots[0].defaultDuration, nominalPower=forecast.slots[0].nominalPower, maximumEnergy=forecast.slots[0].nominalEnergy)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.Success) - self.step("17a") + self.step("18a") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kGridOptimization) - self.step("18") + self.step("19") await self.send_test_event_trigger_user_opt_out_grid() - self.step("18a") + self.step("19a") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kOptOut) - self.step("18b") + self.step("19b") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kInternalOptimization) - self.step("19") + self.step("20") constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct( startTime=forecast.startTime, duration=forecast.slots[0].defaultDuration, nominalPower=forecast.slots[0].nominalPower, maximumEnergy=forecast.slots[0].nominalEnergy)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.ConstraintError) - self.step("20") + self.step("21") await self.send_test_event_trigger_user_opt_out_clear_all() - self.step("20a") + self.step("21a") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kNoOptOut) - self.step("21") + self.step("22") constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct( startTime=forecast.startTime, duration=forecast.slots[0].defaultDuration, nominalPower=forecast.slots[0].nominalPower, maximumEnergy=forecast.slots[0].nominalEnergy)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.Success) - self.step("21a") + self.step("22a") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kLocalOptimization) - self.step("22") + self.step("23") await self.send_cancel_request_command() - self.step("22a") + self.step("23a") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kInternalOptimization) - self.step("23") + self.step("24") await self.send_cancel_request_command(expected_status=Status.InvalidInState) - self.step("24") + self.step("25") await self.send_test_event_trigger_constraint_based_adjustment_clear() diff --git a/src/python_testing/TC_DEM_2_8.py b/src/python_testing/TC_DEM_2_8.py index 773648c7e3ba8e..1b1a2a31537098 100644 --- a/src/python_testing/TC_DEM_2_8.py +++ b/src/python_testing/TC_DEM_2_8.py @@ -23,7 +23,7 @@ # test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x7c +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x7c --application evse # test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === @@ -34,7 +34,7 @@ import chip.clusters as Clusters from chip.interaction_model import Status -from matter_testing_support import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_DEMTestBase import DEMTestBase @@ -59,76 +59,77 @@ def pics_TC_DEM_2_8(self): def steps_TC_DEM_2_8(self) -> list[TestStep]: """Execute the test steps.""" steps = [ - TestStep("1", "Commissioning, already done", - is_commissioning=True), - TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster.", - "Verify value is 1 (True)"), - TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Constraints-based Adjustment Test Event.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("3a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("3b", "TH reads Forecast attribute.", + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("2", "TH reads from the DUT the _FeatureMap_ attribute", + "Verify that the DUT response contains the _FeatureMap_ attribute. Verify ConstraintBasedAdjustment feature is supported on the cluster. Verify StateForecastReporting feature is supported on the cluster. Verify PowerForecastReporting feature is not supported on the cluster."), + TestStep("3", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", + "Value has to be 1 (True)"), + TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Constraints-based Adjustment Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("4a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("4b", "TH reads from the DUT the Forecast", "Value has to include valid slots[0].ManufacturerESAState"), - TestStep("3c", "TH reads OptOutState attribute.", - "Verify value is 0x00 (NoOptOut)"), - TestStep("4", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=now()-10, Duration=20, LoadControl=0}, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("5", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=now()+10, Duration=20, LoadControl=0}, constraints[1].{StartTime=now()+20, Duration=20, LoadControl=0}, constraints[2].{StartTime=now()+50, Duration=20, LoadControl=0}, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("6", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=now()+10, Duration=20, LoadControl=0}, constraints[1].{StartTime=now()+30, Duration=20, LoadControl=0}, constraints[2].{StartTime=now()+40, Duration=20, LoadControl=0}, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("7", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=now()+30, Duration=20, LoadControl=0}, constraints[1].{StartTime=now()+10, Duration=20, LoadControl=0}, constraints[2].{StartTime=now()+50, Duration=20, LoadControl=0}, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("8", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=now()+10, Duration=20, LoadControl=0}, constraints[1].{StartTime=now()+50, Duration=20, LoadControl=0}, constraints[2].{StartTime=now()+30, Duration=20, LoadControl=0}, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("9", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, LoadControl=101}, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("10", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, LoadControl=-101}, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("11", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Local Optimization Test Event.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("11a", "TH reads ESAState attribute.", - "Verify value is 0x01 (Online)"), - TestStep("11b", "TH reads OptOutState attribute.", - "Verify value is 0x02 (LocalOptOut)"), - TestStep("12", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, LoadControl=1}, Cause=LocalOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("13", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, LoadControl=1}, Cause=GridOptimization.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("13a", "TH reads Forecast attribute.", + TestStep("4c", "TH reads from the DUT the OptOutState", + "Value has to be 0x00 (NoOptOut)"), + TestStep("5", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=now()-10, Duration=20, LoadControl=0}, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("6", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=now()+10, Duration=20, LoadControl=0}, constraints[1].{StartTime=now()+20, Duration=20, LoadControl=0}, constraints[2].{StartTime=now()+50, Duration=20, LoadControl=0}, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("7", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=now()+10, Duration=20, LoadControl=0}, constraints[1].{StartTime=now()+30, Duration=20, LoadControl=0}, constraints[2].{StartTime=now()+40, Duration=20, LoadControl=0}, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("8", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=now()+30, Duration=20, LoadControl=0}, constraints[1].{StartTime=now()+10, Duration=20, LoadControl=0}, constraints[2].{StartTime=now()+50, Duration=20, LoadControl=0}, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("9", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=now()+10, Duration=20, LoadControl=0}, constraints[1].{StartTime=now()+50, Duration=20, LoadControl=0}, constraints[2].{StartTime=now()+30, Duration=20, LoadControl=0}, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("10", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, LoadControl=101}, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("11", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, LoadControl=-101}, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("12", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Local Optimization Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("12a", "TH reads from the DUT the ESAState", + "Value has to be 0x01 (Online)"), + TestStep("12b", "TH reads from the DUT the OptOutState", + "Value has to be 0x02 (LocalOptOut)"), + TestStep("13", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, LoadControl=1}, Cause=LocalOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("14", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, LoadControl=1}, Cause=GridOptimization", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("14a", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=GridOptimization"), - TestStep("14", "TH sends CancelRequest.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("14a", "TH reads Forecast attribute.", + TestStep("15", "TH sends command CancelRequest", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("15a", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=InternalOptimization"), - TestStep("15", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, LoadControl=1}, Cause=GridOptimization.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("15a", "TH reads Forecast attribute.", + TestStep("16", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, LoadControl=1}, Cause=GridOptimization", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("16a", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=GridOptimization"), - TestStep("16", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Grid Optimization Test Event.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("16a", "TH reads OptOutState attribute.", - "Verify value is 0x03 (OptOut)"), - TestStep("16b", "TH reads Forecast attribute.", + TestStep("17", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Grid Optimization Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("17a", "TH reads from the DUT the OptOutState", + "Value has to be 0x03 (OptOut)"), + TestStep("17b", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=InternalOptimization"), - TestStep("17", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, LoadControl=1}, Cause=GridOptimization.", - "Verify DUT responds with status CONSTRAINT_ERROR(0x87)"), - TestStep("18", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Test Event Clear.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("18a", "TH reads OptOutState attribute.", - "Verify value is 0x00 (NoOptOut)"), - TestStep("19", "TH sends RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, LoadControl=1}, Cause=LocalOptimization.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("19a", "TH reads Forecast attribute.", + TestStep("18", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, LoadControl=1}, Cause=GridOptimization", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("19", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for User Opt-out Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("19a", "TH reads from the DUT the OptOutState", + "Value has to be 0x00 (NoOptOut)"), + TestStep("20", "TH sends command RequestConstraintBasedPowerForecast with constraints[0].{StartTime=Forecast.StartTime, Duration=Forecast.Slots[0].DefaultDuration, LoadControl=1}, Cause=LocalOptimization", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("20a", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=LocalOptimization"), - TestStep("20", "TH sends CancelRequest.", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("20a", "TH reads Forecast attribute.", + TestStep("21", "TH sends command CancelRequest", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("21a", "TH reads from the DUT the Forecast", "Value has to include ForecastUpdateReason=InternalOptimization"), - TestStep("21", "TH sends CancelRequest.", - "Verify DUT responds with status INVALID_IN_STATE(0xcb)"), - TestStep("22", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Constraints-based Adjustment Adjustment Test Event Clear.", - "Verify DUT responds with status SUCCESS(0x00)"), + TestStep("22", "TH sends command CancelRequest", + "Verify DUT responds w/ status INVALID_IN_STATE(0xcb)"), + TestStep("23", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Constraints-based Adjustment Adjustment Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), ] return steps @@ -140,29 +141,28 @@ async def test_TC_DEM_2_8(self): self.step("1") # Commission DUT - already done - # Subscribe to Events and when they are sent push them to a queue for checking later - events_callback = EventChangeCallback(Clusters.DeviceEnergyManagement) - await events_callback.start(self.default_controller, - self.dut_node_id, - self.matter_test_config.endpoint) - self.step("2") - await self.check_test_event_triggers_enabled() + await self.validate_feature_map(must_have_features=[Clusters.DeviceEnergyManagement.Bitmaps.Feature.kConstraintBasedAdjustment, + Clusters.DeviceEnergyManagement.Bitmaps.Feature.kStateForecastReporting], + must_not_have_features=[Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPowerForecastReporting]) self.step("3") + await self.check_test_event_triggers_enabled() + + self.step("4") await self.send_test_event_trigger_constraint_based_adjustment() - self.step("3a") + self.step("4a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("3b") + self.step("4b") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_is_not_none(forecast.slots[0].manufacturerESAState) - self.step("3c") + self.step("4c") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kNoOptOut) - self.step("4") + self.step("5") # Matter UTC is time since 00:00:00 1/1/2000 now = self.get_current_utc_time_in_seconds() @@ -170,7 +170,7 @@ async def test_TC_DEM_2_8(self): startTime=now - 10, duration=20, loadControl=0)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("5") + self.step("6") # Matter UTC is time since 00:00:00 1/1/2000 now = self.get_current_utc_time_in_seconds() @@ -179,7 +179,7 @@ async def test_TC_DEM_2_8(self): Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct(startTime=now + 50, duration=20, loadControl=0)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("6") + self.step("7") # Matter UTC is time since 00:00:00 1/1/2000 now = self.get_current_utc_time_in_seconds() @@ -188,7 +188,7 @@ async def test_TC_DEM_2_8(self): Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct(startTime=now + 40, duration=20, loadControl=0)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("7") + self.step("8") now = self.get_current_utc_time_in_seconds() constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct(startTime=now + 30, duration=20, loadControl=0), @@ -196,7 +196,7 @@ async def test_TC_DEM_2_8(self): Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct(startTime=now + 50, duration=20, loadControl=0)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("8") + self.step("9") now = self.get_current_utc_time_in_seconds() constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct(startTime=now + 10, duration=20, loadControl=0), @@ -204,102 +204,102 @@ async def test_TC_DEM_2_8(self): Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct(startTime=now + 30, duration=20, loadControl=0)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("9") + self.step("10") constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct( startTime=forecast.startTime, duration=forecast.slots[0].defaultDuration, loadControl=101)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("10") + self.step("11") constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct( startTime=forecast.startTime, duration=forecast.slots[0].defaultDuration, loadControl=-101)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("11") + self.step("12") await self.send_test_event_trigger_user_opt_out_local() - self.step("11a") + self.step("12a") await self.check_dem_attribute("ESAState", Clusters.DeviceEnergyManagement.Enums.ESAStateEnum.kOnline) - self.step("11b") + self.step("12b") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kLocalOptOut) - self.step("12") + self.step("13") constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct( startTime=forecast.startTime, duration=forecast.slots[0].defaultDuration, loadControl=1)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.ConstraintError) - self.step("13") + self.step("14") constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct( startTime=forecast.startTime, duration=forecast.slots[0].defaultDuration, loadControl=1)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.Success) - self.step("13a") + self.step("14a") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kGridOptimization) - self.step("14") + self.step("15") await self.send_cancel_request_command() - self.step("14a") + self.step("15a") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kInternalOptimization) - self.step("15") + self.step("16") constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct( startTime=forecast.startTime, duration=forecast.slots[0].defaultDuration, loadControl=1)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.Success) - self.step("15a") + self.step("16a") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kGridOptimization) - self.step("16") + self.step("17") await self.send_test_event_trigger_user_opt_out_grid() - self.step("16a") + self.step("17a") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kOptOut) - self.step("16b") + self.step("17b") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kInternalOptimization) - self.step("17") + self.step("18") constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct( startTime=forecast.startTime, duration=forecast.slots[0].defaultDuration, loadControl=1)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kGridOptimization, expected_status=Status.ConstraintError) - self.step("18") + self.step("19") await self.send_test_event_trigger_user_opt_out_clear_all() - self.step("18a") + self.step("19a") await self.check_dem_attribute("OptOutState", Clusters.DeviceEnergyManagement.Enums.OptOutStateEnum.kNoOptOut) - self.step("19") + self.step("20") constraintList = [Clusters.DeviceEnergyManagement.Structs.ConstraintsStruct( startTime=forecast.startTime, duration=forecast.slots[0].defaultDuration, loadControl=1)] await self.send_request_constraint_based_forecast(constraintList, cause=Clusters.DeviceEnergyManagement.Enums.AdjustmentCauseEnum.kLocalOptimization, expected_status=Status.Success) - self.step("19a") + self.step("20a") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kLocalOptimization) - self.step("20") + self.step("21") await self.send_cancel_request_command() - self.step("20a") + self.step("21a") forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_equal(forecast.forecastUpdateReason, Clusters.DeviceEnergyManagement.Enums.ForecastUpdateReasonEnum.kInternalOptimization) - self.step("21") + self.step("22") await self.send_cancel_request_command(expected_status=Status.InvalidInState) - self.step("22") + self.step("23") await self.send_test_event_trigger_constraint_based_adjustment_clear() diff --git a/src/python_testing/TC_DEM_2_9.py b/src/python_testing/TC_DEM_2_9.py index 8e60b69b481d93..3acc4b7a517ece 100644 --- a/src/python_testing/TC_DEM_2_9.py +++ b/src/python_testing/TC_DEM_2_9.py @@ -23,7 +23,7 @@ # test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x7e +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x7c --application evse # test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === @@ -33,7 +33,7 @@ import logging import chip.clusters as Clusters -from matter_testing_support import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_DEMTestBase import DEMTestBase @@ -58,18 +58,19 @@ def pics_TC_DEM_2_9(self): def steps_TC_DEM_2_9(self) -> list[TestStep]: """Execute the test steps.""" steps = [ - TestStep("1", "Commissioning, already done", - is_commissioning=True), - TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster.", - "Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"), - TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Forecast Test Event", - "Verify DUT responds with status SUCCESS(0x00)"), - TestStep("3a", "TH reads Forecast attribute.", + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("2", "TH reads from the DUT the _FeatureMap_ attribute", + "Verify that the DUT response contains the _FeatureMap_ attribute. Verify one of PowerForecastReporting or StateForecastReporting is supported but not both."), + TestStep("3", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", + "Value has to be 1 (True)"), + TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Forecast Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("4a", "TH reads from the DUT the Forecast", "Value has to include a valid slots[0].ManufacturerESAState"), - TestStep("3b", "TH reads Forecast attribute.", + TestStep("4b", "TH reads from the DUT the Forecast", "Value has to include valid slots[0].NominalPower, slots[0].MinPower, slots[0].MaxPower, slots[0].NominalEnergy"), - TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Forecast Test Event Clear", - "Verify DUT responds with status SUCCESS(0x00)"), + TestStep("5", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.DEM.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.DEM.TEST_EVENT_TRIGGER for Forecast Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), ] return steps @@ -81,27 +82,24 @@ async def test_TC_DEM_2_9(self): self.step("1") # Commission DUT - already done - # Subscribe to Events and when they are sent push them to a queue for checking later - events_callback = EventChangeCallback(Clusters.DeviceEnergyManagement) - await events_callback.start(self.default_controller, - self.dut_node_id, - self.matter_test_config.endpoint) - self.step("2") - await self.check_test_event_triggers_enabled() + await self.validate_pfr_or_sfr_in_feature_map() self.step("3") + await self.check_test_event_triggers_enabled() + + self.step("4") await self.send_test_event_trigger_forecast() - self.step("3a") + self.step("4a") feature_map = await self.read_dem_attribute_expect_success(attribute="FeatureMap") if feature_map & Clusters.DeviceEnergyManagement.Bitmaps.Feature.kStateForecastReporting: forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") asserts.assert_is_not_none(forecast.slots[0].manufacturerESAState) else: - logging.info('Device does not support StateForecastReporting. Skipping step 3a') + logging.info('Device does not support StateForecastReporting. Skipping step 4a') - self.step("3b") + self.step("4b") if feature_map & Clusters.DeviceEnergyManagement.Bitmaps.Feature.kPowerForecastReporting: forecast = await self.read_dem_attribute_expect_success(attribute="Forecast") @@ -110,9 +108,9 @@ async def test_TC_DEM_2_9(self): asserts.assert_is_not_none(forecast.slots[0].maxPower) asserts.assert_is_not_none(forecast.slots[0].nominalEnergy) else: - logging.info('Device does not support StateForecastReporting. Skipping step 3b') + logging.info('Device does not support PowerForecastReporting. Skipping step 4b') - self.step("4") + self.step("5") await self.send_test_event_trigger_forecast_clear() diff --git a/src/python_testing/TC_DRLK_2_12.py b/src/python_testing/TC_DRLK_2_12.py index 4578aa01cd2ba0..3321ea303bf3f3 100644 --- a/src/python_testing/TC_DRLK_2_12.py +++ b/src/python_testing/TC_DRLK_2_12.py @@ -31,6 +31,8 @@ from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main # Configurable parameters: +# - userIndex: userIndex to use when creating a user on the DUT for testing purposes +# defaults to 1. Add `--int-arg user_index:` to command line to override # - CredentialIndex: CredentialIndex to use when creating a Credential on the DUT for testing purposes # defaults to 1. Add `--int-arg credential_index:` to command line to override # - UserCodeTemporaryDisableTime: Value used to configure DUT for testing purposes. @@ -42,14 +44,15 @@ class TC_DRLK_2_12(MatterBaseTest, DRLK_COMMON): - def setup_class(self): - return super().setup_class() @async_test_body async def teardown_test(self): await self.teardown() return super().teardown_test() + def setup_class(self): + return super().setup_class() + def pics_TC_DRLK_2_12(self) -> list[str]: return ["DRLK.S.F0c"] diff --git a/src/python_testing/TC_DRLK_2_13.py b/src/python_testing/TC_DRLK_2_13.py index 5e1cdf6dcf6601..78f6ef0a0cae68 100644 --- a/src/python_testing/TC_DRLK_2_13.py +++ b/src/python_testing/TC_DRLK_2_13.py @@ -23,7 +23,7 @@ # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True # test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === import logging @@ -357,7 +357,7 @@ async def test_TC_DRLK_2_13(self): self.groupIdentifier = bytes.fromhex("89d085fc302ca53e279bfcdecdf3c4ad") self.groupResolvingKey = bytes.fromhex("89d0859bfcdecdf3c4adfc302ca53e27") self.common_cluster_endpoint = 0 - self.app_cluster_endpoint = 1 + self.app_cluster_endpoint = self.matter_test_config.endpoint self.alirouser = "AliroUser" self.alirocredentialissuerkey = bytes.fromhex( "047a4c882d753924cdf3779a3c84fec2debaa6f0b3084450878acc7ddcce7856ae57b1ebbe2561015103dd7474c2a183675378ec55f1e465ac3436bf3dd5ca54d4") diff --git a/src/python_testing/TC_DRLK_2_2.py b/src/python_testing/TC_DRLK_2_2.py index e7f3e6fa8e421e..9a04e9d5fd1904 100644 --- a/src/python_testing/TC_DRLK_2_2.py +++ b/src/python_testing/TC_DRLK_2_2.py @@ -31,6 +31,8 @@ from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main # Configurable parameters: +# - userIndex: userIndex to use when creating a user on the DUT for testing purposes +# defaults to 1. Add `--int-arg user_index:` to command line to override # - CredentialIndex: CredentialIndex to use when creating a Credential on the DUT for testing purposes # defaults to 1. Add `--int-arg credential_index:` to command line to override # - UserCodeTemporaryDisableTime: Value used to configure DUT for testing purposes. @@ -42,14 +44,15 @@ class TC_DRLK_2_2(MatterBaseTest, DRLK_COMMON): - def setup_class(self): - return super().setup_class() @async_test_body async def teardown_test(self): await self.teardown() return super().teardown_test() + def setup_class(self): + return super().setup_class() + def pics_TC_DRLK_2_2(self) -> list[str]: return ["DRLK.S"] diff --git a/src/python_testing/TC_DRLK_2_3.py b/src/python_testing/TC_DRLK_2_3.py index 8c6f40f19c5449..3171ed28b4f9ad 100644 --- a/src/python_testing/TC_DRLK_2_3.py +++ b/src/python_testing/TC_DRLK_2_3.py @@ -31,6 +31,8 @@ from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main # Configurable parameters: +# - userIndex: userIndex to use when creating a user on the DUT for testing purposes +# defaults to 1. Add `--int-arg user_index:` to command line to override # - CredentialIndex: CredentialIndex to use when creating a Credential on the DUT for testing purposes # defaults to 1. Add `--int-arg credential_index:` to command line to override # - UserCodeTemporaryDisableTime: Value used to configure DUT for testing purposes. @@ -42,14 +44,15 @@ class TC_DRLK_2_3(MatterBaseTest, DRLK_COMMON): - def setup_class(self): - return super().setup_class() @async_test_body async def teardown_test(self): await self.teardown() return super().teardown_test() + def setup_class(self): + return super().setup_class() + def pics_TC_DRLK_2_3(self) -> list[str]: return ["DRLK.S"] diff --git a/src/python_testing/TC_DeviceBasicComposition.py b/src/python_testing/TC_DeviceBasicComposition.py index 72e6e3e2418c8c..a4ab495114a245 100644 --- a/src/python_testing/TC_DeviceBasicComposition.py +++ b/src/python_testing/TC_DeviceBasicComposition.py @@ -19,14 +19,64 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 +# test-runner-runs: run1 run2 run3 run4 run5 run6 run7 run8 # test-runner-run/run1/app: ${ALL_CLUSTERS_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True # test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json # test-runner-run/run1/script-args: --storage-path admin_storage.json --manual-code 10054912339 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# +# test-runner-run/run2/app: ${CHIP_LOCK_APP} +# test-runner-run/run2/factoryreset: True +# test-runner-run/run2/quiet: True +# test-runner-run/run2/app-args: --discriminator 1234 --KVS kvs1 +# test-runner-run/run2/script-args: --storage-path admin_storage.json --manual-code 10054912339 +# +# test-runner-run/run3/app: ${CHIP_LOCK_APP} +# test-runner-run/run3/factoryreset: True +# test-runner-run/run3/quiet: True +# test-runner-run/run3/app-args: --discriminator 1234 --KVS kvs1 +# test-runner-run/run3/script-args: --storage-path admin_storage.json --qr-code MT:-24J0Q1212-10648G00 +# +# test-runner-run/run4/app: ${CHIP_LOCK_APP} +# test-runner-run/run4/factoryreset: True +# test-runner-run/run4/quiet: True +# test-runner-run/run4/app-args: --discriminator 1234 --KVS kvs1 +# test-runner-run/run4/script-args: --storage-path admin_storage.json --discriminator 1234 --passcode 20202021 +# +# test-runner-run/run5/app: ${CHIP_LOCK_APP} +# test-runner-run/run5/factoryreset: True +# test-runner-run/run5/quiet: True +# test-runner-run/run5/app-args: --discriminator 1234 --KVS kvs1 +# test-runner-run/run5/script-args: --storage-path admin_storage.json --manual-code 10054912339 --commissioning-method on-network +# +# test-runner-run/run6/app: ${CHIP_LOCK_APP} +# test-runner-run/run6/factoryreset: True +# test-runner-run/run6/quiet: True +# test-runner-run/run6/app-args: --discriminator 1234 --KVS kvs1 +# test-runner-run/run6/script-args: --storage-path admin_storage.json --qr-code MT:-24J0Q1212-10648G00 --commissioning-method on-network +# +# test-runner-run/run7/app: ${CHIP_LOCK_APP} +# test-runner-run/run7/factoryreset: True +# test-runner-run/run7/quiet: True +# test-runner-run/run7/app-args: --discriminator 1234 --KVS kvs1 +# test-runner-run/run7/script-args: --storage-path admin_storage.json --discriminator 1234 --passcode 20202021 --commissioning-method on-network +# +# test-runner-run/run8/app: ${CHIP_LOCK_APP} +# test-runner-run/run8/factoryreset: False +# test-runner-run/run8/quiet: True +# test-runner-run/run8/app-args: --discriminator 1234 --KVS kvs1 +# test-runner-run/run8/script-args: --storage-path admin_storage.json # === END CI TEST ARGUMENTS === +# Run 1: runs through all tests +# Run 2: tests PASE connection using manual code (12.1 only) +# Run 3: tests PASE connection using QR code (12.1 only) +# Run 4: tests PASE connection using discriminator and passcode (12.1 only) +# Run 5: Tests CASE connection using manual code (12.1 only) +# Run 6: Tests CASE connection using QR code (12.1 only) +# Run 7: Tests CASE connection using manual discriminator and passcode (12.1 only) + import logging from dataclasses import dataclass from typing import Any, Callable diff --git a/src/python_testing/TC_DeviceConformance.py b/src/python_testing/TC_DeviceConformance.py index 3cc57e2b018ab6..a6d6f19bfb53e7 100644 --- a/src/python_testing/TC_DeviceConformance.py +++ b/src/python_testing/TC_DeviceConformance.py @@ -50,7 +50,25 @@ async def setup_class_helper(self): self.xml_device_types, problems = build_xml_device_types() self.problems.extend(problems) - def check_conformance(self, ignore_in_progress: bool, is_ci: bool): + def _get_device_type_id(self, device_type_name: str) -> int: + id = [id for id, dt in self.xml_device_types.items() if dt.name.lower() == device_type_name.lower()] + if len(id) != 1: + self.fail_current_test(f"Unable to find {device_type_name} device type") + return id[0] + + def _has_device_type_supporting_macl(self): + # Currently this is just NIM. We may later be able to pull this from the device type scrape using the ManagedAclAllowed condition, + # but these are not currently exposed directly by the device. + allowed_ids = [self._get_device_type_id('network infrastructure manager')] + for endpoint in self.endpoints_tlv.values(): + desc = Clusters.Descriptor + device_types = [dt.deviceType for dt in endpoint[desc.id][desc.Attributes.DeviceTypeList.attribute_id]] + if set(allowed_ids).intersection(set(device_types)): + # TODO: it's unclear if this needs to be present on every endpoint. Right now, this assumes one is sufficient. + return True + return False + + def check_conformance(self, ignore_in_progress: bool, is_ci: bool, allow_provisional: bool): problems = [] success = True @@ -87,32 +105,27 @@ def record_warning(location, problem): ignore_attributes.update(ci_ignore_attributes) success = True - allow_provisional = self.user_params.get("allow_provisional", False) - # TODO: automate this once https://github.com/csa-data-model/projects/issues/454 is done. - provisional_cluster_ids = [Clusters.ContentControl.id, Clusters.ScenesManagement.id, Clusters.BallastConfiguration.id, - Clusters.EnergyPreference.id, Clusters.DeviceEnergyManagement.id, Clusters.DeviceEnergyManagementMode.id, Clusters.PulseWidthModulation.id, - Clusters.ProxyConfiguration.id, Clusters.ProxyDiscovery.id, Clusters.ProxyValid.id] - # TODO: Remove this once the latest 1.3 lands with the clusters removed from the DM XML and change the warning below about missing DM XMLs into a proper error - # These are clusters that weren't part of the 1.3 spec that landed in the SDK before the branch cut + provisional_cluster_ids = [] + # TODO: Remove this once we have a scrape without items not going to the test events + # These are clusters that weren't part of the 1.3 or 1.4 spec that landed in the SDK before the branch cut + # They're not marked provisional, but are present in the ToT spec under an ifdef. provisional_cluster_ids.extend([Clusters.DemandResponseLoadControl.id]) - # These clusters are zigbee only. I don't even know why they're part of the codegen, but we should get rid of them. - provisional_cluster_ids.extend([Clusters.BarrierControl.id, Clusters.OnOffSwitchConfiguration.id, - Clusters.BinaryInputBasic.id, Clusters.ElectricalMeasurement.id]) + for endpoint_id, endpoint in self.endpoints_tlv.items(): for cluster_id, cluster in endpoint.items(): cluster_location = ClusterPathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id) - if not allow_provisional and cluster_id in provisional_cluster_ids: - record_error(location=cluster_location, problem='Provisional cluster found on device') - continue - if cluster_id not in self.xml_clusters.keys(): if (cluster_id & 0xFFFF_0000) != 0: # manufacturer cluster continue - # TODO: update this from a warning once we have all the data - record_warning(location=cluster_location, - problem='Standard cluster found on device, but is not present in spec data') + record_error(location=cluster_location, + problem='Standard cluster found on device, but is not present in spec data') + continue + + is_provisional = cluster_id in provisional_cluster_ids or self.xml_clusters[cluster_id].is_provisional + if not allow_provisional and is_provisional: + record_error(location=cluster_location, problem='Provisional cluster found on device') continue feature_map = cluster[GlobalAttributeIds.FEATURE_MAP_ID] @@ -125,6 +138,13 @@ def record_warning(location, problem): for f in feature_masks: location = AttributePathLocation(endpoint_id=endpoint_id, cluster_id=cluster_id, attribute_id=GlobalAttributeIds.FEATURE_MAP_ID) + if cluster_id == Clusters.AccessControl.id and f == Clusters.AccessControl.Bitmaps.Feature.kManagedDevice: + # Managed ACL is treated as a special case because it is only allowed if other endpoints support NIM and disallowed otherwise. + if not self._has_device_type_supporting_macl(): + record_error( + location=location, problem="MACL feature is disallowed if the a supported device type is not present") + continue + if f not in self.xml_clusters[cluster_id].features.keys(): record_error(location=location, problem=f'Unknown feature with mask 0x{f:02x}') continue @@ -340,7 +360,8 @@ def test_TC_IDM_10_2(self): # https://github.com/project-chip/connectedhomeip/issues/34615 ignore_in_progress = self.user_params.get("ignore_in_progress", True) is_ci = self.check_pics('PICS_SDK_CI_ONLY') - success, problems = self.check_conformance(ignore_in_progress, is_ci) + allow_provisional = self.user_params.get("allow_provisional", False) + success, problems = self.check_conformance(ignore_in_progress, is_ci, allow_provisional) self.problems.extend(problems) if not success: self.fail_current_test("Problems with conformance") diff --git a/src/python_testing/TC_ECOINFO_2_1.py b/src/python_testing/TC_ECOINFO_2_1.py index ea9ee43b7f0569..202d1073779cb3 100644 --- a/src/python_testing/TC_ECOINFO_2_1.py +++ b/src/python_testing/TC_ECOINFO_2_1.py @@ -25,96 +25,107 @@ class TC_ECOINFO_2_1(MatterBaseTest): - def _validate_device_directory(self, is_removed_on_null, device_directory): - num_of_devices = len(device_directory) - if is_removed_on_null: - asserts.assert_less_equal(num_of_devices, 256, "Too many device entries") - for device in device_directory: - # TODO do fabric index check first - if device.deviceName is not None: - asserts.assert_true(type_matches(device.deviceName, str), "DeviceName should be a string") - asserts.assert_less_equal(len(device.deviceName), 64, "DeviceName should be <= 64") - asserts.assert_true(type_matches(device.deviceNameLastEdit, uint), "DeviceNameLastEdit should be a uint") - asserts.assert_greater(device.deviceNameLastEdit, 0, "DeviceNameLastEdit must be greater than 0") - else: - asserts.assert_true(device.deviceNameLastEdit is None, - "DeviceNameLastEdit should not be provided when there is no DeviceName") - - asserts.assert_true(type_matches(device.bridgedEndpoint, uint), "BridgedEndpoint should be a uint") - asserts.assert_greater_equal(device.bridgedEndpoint, 0, "BridgedEndpoint >= 0") - asserts.assert_less_equal(device.bridgedEndpoint, 0xffff_ffff, - "BridgedEndpoint less than or equal to Invalid Endpoint value") - - asserts.assert_true(type_matches(device.originalEndpoint, uint), "OriginalEndpoint should be a uint") - asserts.assert_greater_equal(device.originalEndpoint, 0, "OriginalEndpoint >= 0") - asserts.assert_less(device.originalEndpoint, 0xffff_ffff, - "OriginalEndpoint less than or equal to Invalid Endpoint value") - + def _validate_device_directory(self, current_fabric_index, device_directory): + for device in device_directory: + if current_fabric_index != device.fabricIndex: + # Fabric sensitve field still exist in python, just that they have default values + asserts.assert_equal(device.deviceName, None, "Unexpected value in deviceName") + asserts.assert_equal(device.deviceNameLastEdit, None, "Unexpected value in deviceNameLastEdit") + asserts.assert_equal(device.bridgedEndpoint, 0, "Unexpected value in bridgedEndpoint") + asserts.assert_equal(device.originalEndpoint, 0, "Unexpected value in originalEndpoint") asserts.assert_true(type_matches(device.deviceTypes, list), "DeviceTypes should be a list") - asserts.assert_greater_equal(len(device.deviceTypes), 1, "DeviceTypes list must contains at least one entry") - for device_type in device.deviceTypes: - asserts.assert_true(type_matches(device_type.deviceType, uint), "DeviceType should be a uint") - # TODO what other validation can we do here to device_type.deviceType - asserts.assert_true(type_matches(device_type.revision, uint), "device type's revision should be a uint") - asserts.assert_greater_equal(device_type.revision, 1, "device type's revision must >= 1") - + asserts.assert_equal(len(device.deviceTypes), 0, "DeviceTypes list should be empty") asserts.assert_true(type_matches(device.uniqueLocationIDs, list), "UniqueLocationIds should be a list") - num_of_unique_location_ids = len(device.uniqueLocationIDs) - asserts.assert_less_equal(num_of_unique_location_ids, 64, "UniqueLocationIds list should be <= 64") - for location_id in device.uniqueLocationIDs: - asserts.assert_true(type_matches(location_id, str), "UniqueLocationId should be a string") - location_id_string_length = len(location_id) - asserts.assert_greater_equal(location_id_string_length, 1, - "UniqueLocationId must contain at least one character") - asserts.assert_less_equal(location_id_string_length, 64, "UniqueLocationId should be <= 64") - - asserts.assert_true(type_matches(device.uniqueLocationIDsLastEdit, uint), - "UniqueLocationIdsLastEdit should be a uint") - if num_of_unique_location_ids: - asserts.assert_greater(device.uniqueLocationIDsLastEdit, 0, "UniqueLocationIdsLastEdit must be non-zero") - else: - asserts.assert_equal(num_of_devices, 0, "Device was removed, there should be no devices in DeviceDirectory") - - def _validate_location_directory(self, is_removed_on_null, location_directory): - num_of_locations = len(location_directory) - if is_removed_on_null: - asserts.assert_less_equal(num_of_locations, 64, "Too many location entries") - for location in location_directory: - asserts.assert_true(type_matches(location.uniqueLocationID, str), "UniqueLocationId should be a string") - location_id_string_length = len(location.uniqueLocationID) + asserts.assert_equal(len(device.uniqueLocationIDs), 0, "uniqueLocationIDs list should be empty") + asserts.assert_equal(device.uniqueLocationIDsLastEdit, 0, "Unexpected value in uniqueLocationIDsLastEdit") + continue + + if device.deviceName is not None: + asserts.assert_true(type_matches(device.deviceName, str), "DeviceName should be a string") + asserts.assert_less_equal(len(device.deviceName), 64, "DeviceName should be <= 64") + asserts.assert_true(type_matches(device.deviceNameLastEdit, uint), "DeviceNameLastEdit should be a uint") + asserts.assert_greater(device.deviceNameLastEdit, 0, "DeviceNameLastEdit must be greater than 0") + else: + asserts.assert_true(device.deviceNameLastEdit is None, + "DeviceNameLastEdit should not be provided when there is no DeviceName") + + asserts.assert_true(type_matches(device.bridgedEndpoint, uint), "BridgedEndpoint should be a uint") + asserts.assert_greater_equal(device.bridgedEndpoint, 0, "BridgedEndpoint >= 0") + asserts.assert_less_equal(device.bridgedEndpoint, 0xffff_ffff, + "BridgedEndpoint less than or equal to Invalid Endpoint value") + + asserts.assert_true(type_matches(device.originalEndpoint, uint), "OriginalEndpoint should be a uint") + asserts.assert_greater_equal(device.originalEndpoint, 0, "OriginalEndpoint >= 0") + asserts.assert_less(device.originalEndpoint, 0xffff_ffff, + "OriginalEndpoint less than or equal to Invalid Endpoint value") + + asserts.assert_true(type_matches(device.deviceTypes, list), "DeviceTypes should be a list") + asserts.assert_greater_equal(len(device.deviceTypes), 1, "DeviceTypes list must contains at least one entry") + for device_type in device.deviceTypes: + asserts.assert_true(type_matches(device_type.deviceType, uint), "DeviceType should be a uint") + # TODO what other validation can we do here to device_type.deviceType + asserts.assert_true(type_matches(device_type.revision, uint), "device type's revision should be a uint") + asserts.assert_greater_equal(device_type.revision, 1, "device type's revision must >= 1") + + asserts.assert_true(type_matches(device.uniqueLocationIDs, list), "UniqueLocationIds should be a list") + num_of_unique_location_ids = len(device.uniqueLocationIDs) + asserts.assert_less_equal(num_of_unique_location_ids, 64, "UniqueLocationIds list should be <= 64") + for location_id in device.uniqueLocationIDs: + asserts.assert_true(type_matches(location_id, str), "UniqueLocationId should be a string") + location_id_string_length = len(location_id) asserts.assert_greater_equal(location_id_string_length, 1, "UniqueLocationId must contain at least one character") asserts.assert_less_equal(location_id_string_length, 64, "UniqueLocationId should be <= 64") - asserts.assert_true(type_matches(location.locationDescriptor.locationName, str), - "LocationName should be a string") - asserts.assert_less_equal(len(location.locationDescriptor.locationName), 64, "LocationName should be <= 64") - - if location.locationDescriptor.floorNumber is not NullValue: - asserts.assert_true(type_matches(location.locationDescriptor.floorNumber, int), - "FloorNumber should be an int") - # TODO check in range of int16. - - if location.locationDescriptor.areaType is not NullValue: - # TODO check areaType is valid. - pass - - asserts.assert_true(type_matches(location.locationDescriptorLastEdit, uint), - "UniqueLocationIdsLastEdit should be a uint") - asserts.assert_greater(location.locationDescriptorLastEdit, 0, "LocationDescriptorLastEdit must be non-zero") - - else: - asserts.assert_equal(num_of_locations, 0, "Device was removed, there should be no location in LocationDirectory") + asserts.assert_true(type_matches(device.uniqueLocationIDsLastEdit, uint), + "UniqueLocationIdsLastEdit should be a uint") + if num_of_unique_location_ids: + asserts.assert_greater(device.uniqueLocationIDsLastEdit, 0, "UniqueLocationIdsLastEdit must be non-zero") + + def _validate_location_directory(self, current_fabric_index, location_directory): + for location in location_directory: + if current_fabric_index != location.fabricIndex: + # Fabric sensitve field still exist in python, just that they have default values + asserts.assert_equal(location.uniqueLocationID, "", "Unexpected value in uniqueLocationID") + asserts.assert_equal(location.locationDescriptor.locationName, "", + "Unexpected value in locationDescriptor.locationName") + asserts.assert_equal(location.locationDescriptor.floorNumber, NullValue, + "Unexpected value in locationDescriptor.floorNumber") + asserts.assert_equal(location.locationDescriptor.areaType, NullValue, + "Unexpected value in locationDescriptor.areaType") + asserts.assert_equal(location.locationDescriptorLastEdit, 0, "Unexpected value in locationDescriptorLastEdit") + continue + + asserts.assert_true(type_matches(location.uniqueLocationID, str), "UniqueLocationId should be a string") + location_id_string_length = len(location.uniqueLocationID) + asserts.assert_greater_equal(location_id_string_length, 1, + "UniqueLocationId must contain at least one character") + asserts.assert_less_equal(location_id_string_length, 64, "UniqueLocationId should be <= 64") + + asserts.assert_true(type_matches(location.locationDescriptor.locationName, str), + "LocationName should be a string") + asserts.assert_less_equal(len(location.locationDescriptor.locationName), 64, "LocationName should be <= 64") + + if location.locationDescriptor.floorNumber is not NullValue: + asserts.assert_true(type_matches(location.locationDescriptor.floorNumber, int), + "FloorNumber should be an int") + # TODO check in range of int16. + + if location.locationDescriptor.areaType is not NullValue: + # TODO check areaType is valid. + pass + + asserts.assert_true(type_matches(location.locationDescriptorLastEdit, uint), + "UniqueLocationIdsLastEdit should be a uint") + asserts.assert_greater(location.locationDescriptorLastEdit, 0, "LocationDescriptorLastEdit must be non-zero") def steps_TC_ECOINFO_2_1(self) -> list[TestStep]: steps = [TestStep(1, "Identify endpoints with Ecosystem Information Cluster", is_commissioning=True), - TestStep(2, "Reading RemovedOn Attribute"), - TestStep(3, "Reading DeviceDirectory Attribute"), - TestStep(4, "Reading LocationDirectory Attribute"), - TestStep(5, "Try Writing to RemovedOn Attribute"), - TestStep(6, "Try Writing to DeviceDirectory Attribute"), - TestStep(7, "Try Writing to LocationDirectory Attribute"), - TestStep(8, "Repeating steps 2 to 7 for each endpoint identified in step 1")] + TestStep(2, "Reading DeviceDirectory Attribute"), + TestStep(3, "Reading LocationDirectory Attribute"), + TestStep(4, "Try Writing to DeviceDirectory Attribute"), + TestStep(5, "Try Writing to LocationDirectory Attribute"), + TestStep(6, "Repeating steps 2 to 5 for each endpoint identified in step 1")] return steps @async_test_body @@ -124,6 +135,12 @@ async def test_TC_ECOINFO_2_1(self): self.print_step(0, "Commissioning, already done") + pause_for_pre_condition = self.user_params.get("pause_for_pre_condition", False) + if pause_for_pre_condition: + self.wait_for_user_input( + "Paused test to allow for manufacturer to satisfy precondition where one or more bridged devices of a supported type is connected to DUT") + + current_fabric_index = await self.read_single_attribute_check_success(cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.CurrentFabricIndex) self.step(1) endpoint_wild_card_read = await dev_ctrl.ReadAttribute(dut_node_id, [(Clusters.EcosystemInformation.Attributes.ClusterRevision)]) list_of_endpoints = list(endpoint_wild_card_read.keys()) @@ -131,19 +148,6 @@ async def test_TC_ECOINFO_2_1(self): for idx, cluster_endpoint in enumerate(list_of_endpoints): if idx == 0: self.step(2) - removed_on = await self.read_single_attribute( - dev_ctrl, - dut_node_id, - endpoint=cluster_endpoint, - attribute=Clusters.EcosystemInformation.Attributes.RemovedOn) - - is_removed_on_null = removed_on is NullValue - if not is_removed_on_null: - asserts.assert_true(type_matches(removed_on, uint)) - asserts.assert_greater(removed_on, 0, "RemovedOn must be greater than 0", "RemovedOn should be a uint") - - if idx == 0: - self.step(3) device_directory = await self.read_single_attribute( dev_ctrl, dut_node_id, @@ -151,10 +155,10 @@ async def test_TC_ECOINFO_2_1(self): attribute=Clusters.EcosystemInformation.Attributes.DeviceDirectory, fabricFiltered=False) - self._validate_device_directory(is_removed_on_null, device_directory) + self._validate_device_directory(current_fabric_index, device_directory) if idx == 0: - self.step(4) + self.step(3) location_directory = await self.read_single_attribute( dev_ctrl, dut_node_id, @@ -162,28 +166,22 @@ async def test_TC_ECOINFO_2_1(self): attribute=Clusters.EcosystemInformation.Attributes.LocationDirectory, fabricFiltered=False) - self._validate_location_directory(is_removed_on_null, location_directory) - - if idx == 0: - self.step(5) - result = await dev_ctrl.WriteAttribute(dut_node_id, [(cluster_endpoint, Clusters.EcosystemInformation.Attributes.RemovedOn(2))]) - asserts.assert_equal(len(result), 1, "Expecting only one result from trying to write to RemovedOn Attribute") - asserts.assert_equal(result[0].Status, Status.UnsupportedWrite, "Expecting Status of UnsupportedWrite") + self._validate_location_directory(current_fabric_index, location_directory) if idx == 0: - self.step(6) + self.step(4) result = await dev_ctrl.WriteAttribute(dut_node_id, [(cluster_endpoint, Clusters.EcosystemInformation.Attributes.DeviceDirectory([]))]) asserts.assert_equal(len(result), 1, "Expecting only one result from trying to write to DeviceDirectory Attribute") asserts.assert_equal(result[0].Status, Status.UnsupportedWrite, "Expecting Status of UnsupportedWrite") if idx == 0: - self.step(7) + self.step(5) result = await dev_ctrl.WriteAttribute(dut_node_id, [(cluster_endpoint, Clusters.EcosystemInformation.Attributes.DeviceDirectory([]))]) asserts.assert_equal(len(result), 1, "Expecting only one result from trying to write to LocationDirectory Attribute") asserts.assert_equal(result[0].Status, Status.UnsupportedWrite, "Expecting Status of UnsupportedWrite") if idx == 0: - self.step(8) + self.step(6) if __name__ == "__main__": diff --git a/src/python_testing/TC_ECOINFO_2_2.py b/src/python_testing/TC_ECOINFO_2_2.py index c8bb7de4004d56..24f39ab93f2a04 100644 --- a/src/python_testing/TC_ECOINFO_2_2.py +++ b/src/python_testing/TC_ECOINFO_2_2.py @@ -16,7 +16,7 @@ # import chip.clusters as Clusters -from chip.clusters.Types import NullValue +from chip.interaction_model import Status from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts @@ -32,15 +32,22 @@ def steps_TC_ECOINFO_2_2(self) -> list[TestStep]: TestStep(2, "Add a bridged device"), TestStep("2a", "(Manual Step) Add a bridged device using method indicated by the manufacturer"), TestStep("2b", "Read root endpoint's PartsList, validate exactly one endpoint added"), - TestStep("2c", "On newly added endpoint detected in 2b read RemovedOn Ecosystem Information Attribute and validate"), + TestStep("2c", "On newly added endpoint detected in 2b read DeviceDirectory Ecosystem Information Attribute and validate success"), + TestStep("2d", "On newly added endpoint detected in 2b read LocationDirectory Ecosystem Information Attribute and validate success"), TestStep(3, "Remove bridged device"), TestStep("3a", "(Manual Step) Removed bridged device added in step 2a using method indicated by the manufacturer"), - TestStep("3b", "On newly added endpoint detected in 2b read RemovedOn Ecosystem Information Attribute and validate"), - TestStep("3c", "On newly added endpoint detected in 2b read DeviceDirectory Ecosystem Information Attribute and validate"), - TestStep("3d", "On newly added endpoint detected in 2b read LocationDirectory Ecosystem Information Attribute and validate")] + TestStep("3b", "Verify that PartsList equals what was read in 1a"), + TestStep("3c", "On endpoint detected in 2b, read DeviceDirectory Ecosystem Information Attribute and validate failure"), + TestStep("3d", "On endpoint detected in 2b, read LocationDirectory Ecosystem Information Attribute and validate failure")] return steps + # This test has some manual steps, so we need a longer timeout. Test typically runs under 1 mins so 3 mins should + # be enough time for test to run + @property + def default_timeout(self) -> int: + return 3*60 + @async_test_body async def test_TC_ECOINFO_2_2(self): dev_ctrl = self.default_controller @@ -80,43 +87,55 @@ async def test_TC_ECOINFO_2_2(self): self.step("2c") newly_added_endpoint = list(unique_endpoints_set)[0] - removed_on = await self.read_single_attribute( - dev_ctrl, - dut_node_id, + await self.read_single_attribute_check_success( + dev_ctrl=dev_ctrl, + node_id=dut_node_id, endpoint=newly_added_endpoint, - attribute=Clusters.EcosystemInformation.Attributes.RemovedOn) + cluster=Clusters.EcosystemInformation, + attribute=Clusters.EcosystemInformation.Attributes.DeviceDirectory, + fabric_filtered=False) - asserts.assert_true(removed_on is NullValue, "RemovedOn is expected to be null for a newly added device") + self.step("2d") + await self.read_single_attribute_check_success( + dev_ctrl=dev_ctrl, + node_id=dut_node_id, + endpoint=newly_added_endpoint, + cluster=Clusters.EcosystemInformation, + attribute=Clusters.EcosystemInformation.Attributes.LocationDirectory, + fabric_filtered=False) self.step(3) self.step("3a") self.wait_for_user_input(prompt_msg="Removed bridged device added in step 2a using method indicated by the manufacturer") self.step("3b") - removed_on = await self.read_single_attribute( - dev_ctrl, - dut_node_id, - endpoint=newly_added_endpoint, - attribute=Clusters.EcosystemInformation.Attributes.RemovedOn) - asserts.assert_true(removed_on is not NullValue, "RemovedOn is expected to have a value") + root_part_list_step_3 = await dev_ctrl.ReadAttribute(dut_node_id, [(root_node_endpoint, Clusters.Descriptor.Attributes.PartsList)]) + set_of_endpoints_step_3 = set( + root_part_list_step_3[root_node_endpoint][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList]) + + asserts.assert_equal(set_of_endpoints_step_3, set_of_endpoints_step_1, + "Expected set of endpoints after removal to be identical to when test started") self.step("3c") - device_directory = await self.read_single_attribute( - dev_ctrl, - dut_node_id, + newly_added_endpoint = list(unique_endpoints_set)[0] + await self.read_single_attribute_expect_error( + dev_ctrl=dev_ctrl, + node_id=dut_node_id, + error=Status.UnsupportedEndpoint, endpoint=newly_added_endpoint, + cluster=Clusters.EcosystemInformation, attribute=Clusters.EcosystemInformation.Attributes.DeviceDirectory, - fabricFiltered=False) - asserts.assert_equal(len(device_directory), 0, "Expected device directory to be empty") + fabric_filtered=False) self.step("3d") - location_directory = await self.read_single_attribute( - dev_ctrl, - dut_node_id, + await self.read_single_attribute_expect_error( + dev_ctrl=dev_ctrl, + node_id=dut_node_id, + error=Status.UnsupportedEndpoint, endpoint=newly_added_endpoint, + cluster=Clusters.EcosystemInformation, attribute=Clusters.EcosystemInformation.Attributes.LocationDirectory, - fabricFiltered=False) - asserts.assert_equal(len(location_directory), 0, "Expected location directory to be empty") + fabric_filtered=False) if __name__ == "__main__": diff --git a/src/python_testing/TC_EEVSE_2_2.py b/src/python_testing/TC_EEVSE_2_2.py index 833375e0fb7523..b2591fa4a5d206 100644 --- a/src/python_testing/TC_EEVSE_2_2.py +++ b/src/python_testing/TC_EEVSE_2_2.py @@ -22,7 +22,7 @@ # test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --application evse # test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === @@ -52,93 +52,97 @@ def pics_TC_EEVSE_2_2(self): def steps_TC_EEVSE_2_2(self) -> list[TestStep]: steps = [ - TestStep("1", "Commissioning, already done", - is_commissioning=True), - TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster.", - "Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"), - TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for Basic Functionality Test Event"), - TestStep("3a", "After a few seconds TH reads from the DUT the State attribute.", - "Verify value is 0x00 (NotPluggedIn)"), - TestStep("3b", "TH reads from the DUT the SupplyState attribute.", - "Verify value is 0x00 (Disabled)"), - TestStep("3c", "TH reads from the DUT the FaultState attribute.", - "Verify value is 0x00 (NoError)"), - TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event.", - "Verify Event EEVSE.S.E00(EVConnected) sent"), - TestStep("4a", "TH reads from the DUT the State attribute.", - "Verify value is 0x01 (PluggedInNoDemand)"), - TestStep("4b", - "TH reads from the DUT the SessionID attribute. Value is noted for later"), - TestStep("5", "TH sends command EnableCharging with ChargingEnabledUntil=2 minutes in the future, minimumChargeCurrent=6000, maximumChargeCurrent=60000"), - TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event.", - "Verify Event EEVSE.S.E02(EnergyTransferStarted) sent."), - TestStep("6a", "TH reads from the DUT the State attribute.", - "Verify value is 0x3 (PluggedInCharging)"), - TestStep("6b", "TH reads from the DUT the SupplyState attribute.", - "Verify value is 0x1 (ChargingEnabled)"), - TestStep("6c", "TH reads from the DUT the ChargingEnabledUntil attribute.", - "Verify value is the commanded value"), - TestStep("6d", "TH reads from the DUT the MinimumChargeCurrent attribute.", - "Verify value is the commanded value (6000)"), - TestStep("6e", "TH reads from the DUT the MaximumChargeCurrent attribute.", - "Verify value is the min(command value (60000), CircuitCapacity)"), - TestStep("7", "Wait 2 minutes.", - "Verify Event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvseStopped"), - TestStep("7a", "TH reads from the DUT the State attribute.", - "Verify value is 0x02 (PluggedInDemand)"), - TestStep("7b", "TH reads from the DUT the SupplyState attribute.", - "Verify value is 0x00 (Disabled)"), - TestStep("8", "TH sends command EnableCharging with ChargingEnabledUntil=NULL, minimumChargeCurrent = 6000, maximumChargeCurrent=12000"), - TestStep("8a", "TH reads from the DUT the State attribute.", - "Verify value is 0x03 (PluggedInCharging)"), - TestStep("8b", "TH reads from the DUT the SupplyState attribute.", - "Verify value is 1 (ChargingEnabled)"), - TestStep("8c", "TH reads from the DUT the ChargingEnabledUntil attribute", - "Verify value is the commanded value (NULL)"), - TestStep("8d", "TH reads from the DUT the MinimumChargeCurrent attribute", - "Verify value is the commanded value (6000)"), - TestStep("8e", "TH reads from the DUT the MaximumChargeCurrent attribute", - "Verify value is the MIN(command value (60000), CircuitCapacity)"), - TestStep("9", - "If the optional attribute is supported TH writes to the DUT UserMaximumChargeCurrent=6000"), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", + "Value has to be 1 (True)"), + TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for Basic Functionality Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("3a", "After a few seconds TH reads from the DUT the State", + "Value has to be 0x00 (NotPluggedIn)"), + TestStep("3b", "TH reads from the DUT the SupplyState", + "Value has to be 0x00 (Disabled)"), + TestStep("3c", "TH reads from the DUT the FaultState", + "Value has to be 0x00 (NoError)"), + TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Plugged-in Test Event", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E00(EVConnected) sent"), + TestStep("4a", "TH reads from the DUT the State", + "Value has to be 0x01 (PluggedInNoDemand)"), + TestStep("4b", "TH reads from the DUT the SessionID", + "Value is noted for later"), + TestStep("5", "TH sends command EnableCharging with ChargingEnabledUntil=2 minutes in the future, minimumChargeCurrent=6000, maximumChargeCurrent=60000", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Charge Demand Test Event", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E02(EnergyTransferStarted) sent"), + TestStep("6a", "TH reads from the DUT the State", + "Value has to be 0x03 (PluggedInCharging)"), + TestStep("6b", "TH reads from the DUT the SupplyState", + "Value has to be 0x01 (ChargingEnabled)"), + TestStep("6c", "TH reads from the DUT the ChargingEnabledUntil", + "Value has to be the ChargingEnabledUntil commanded value"), + TestStep("6d", "TH reads from the DUT the MinimumChargeCurrent", + "Value has to be the minimumChargeCurrent commanded value"), + TestStep("6e", "TH reads from the DUT the MaximumChargeCurrent", + "Value has to be the min(maximumChargeCurrent commanded value,CircuitCapacity)"), + TestStep("7", "Wait 2 minutes", + "Event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvseStopped"), + TestStep("7a", "TH reads from the DUT the State", + "Value has to be 0x02 (PluggedInDemand)"), + TestStep("7b", "TH reads from the DUT the SupplyState", + "Value has to be 0x00 (Disabled)"), + TestStep("8", "TH sends command EnableCharging with ChargingEnabledUntil=null, minimumChargeCurrent=6000, maximumChargeCurrent=12000", + "Verify DUT responds w/ status SUCCESS(0x00) and Event EEVSE.S.E02(EnergyTransferStarted) sent"), + TestStep("8a", "TH reads from the DUT the State", + "Value has to be 0x03 (PluggedInCharging)"), + TestStep("8b", "TH reads from the DUT the SupplyState", + "Value has to be 0x01 (ChargingEnabled)"), + TestStep("8c", "TH reads from the DUT the ChargingEnabledUntil", + "Value has to be the ChargingEnabledUntil commanded value"), + TestStep("8d", "TH reads from the DUT the MinimumChargeCurrent", + "Value has to be the minimumChargeCurrent commanded value"), + TestStep("8e", "TH reads from the DUT the MaximumChargeCurrent", + "Value has to be the min(maximumChargeCurrent commanded value,CircuitCapacity)"), + TestStep("9", "If the optional attribute is supported, TH writes to the DUT the UserMaximumChargeCurrent=6000", + "Charging rate reduced to 6A"), TestStep("9a", "After a few seconds TH reads from the DUT the MaximumChargeCurrent", - "Verify value is UserMaximumChargeCurrent value (6000)"), - TestStep("10", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event Clear", - "Verify Event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvStopped"), - TestStep("10a", "TH reads from the DUT the State attribute", - "Verify value is 0x01 (PluggedInNoDemand)"), - TestStep("11", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event", - "Verify Event EEVSE.S.E02(EnergyTransferStarted) sent."), - TestStep("11a", "TH reads from the DUT the State attribute", - "Verify value is 0x03 (PluggedInCharging)"), - TestStep("12", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event Clear", - "Verify Event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvStopped"), - TestStep("12a", "TH reads from the DUT the State attribute", - "Verify value is 0x01 (PluggedInNoDemand)"), - TestStep("13", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event Clear", - "Verify Event EEVSE.S.E01(EVNotDetected) sent"), - TestStep("13a", "TH reads from the DUT the State attribute", - "Verify value is 0x00 (NotPluggedIn)"), - TestStep("13b", "TH reads from the DUT the SupplyState attribute", - "Verify value is 0x01 (ChargingEnabled)"), - TestStep("13c", "TH reads from the DUT the SessionID attribute", - "Verify value is the same value noted in 4b"), - TestStep("13d", "TH reads from the DUT the SessionDuration attribute", - "Verify value is greater than 120 (and match the time taken for the tests from step 4 to step 13)"), - TestStep("14", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event", - "Verify Event EEVSE.S.E00(EVConnected) sent"), - TestStep("14a", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event", - "Verify Event EEVSE.S.E02(EnergyTransferStarted) sent."), - TestStep("14b", "TH reads from the DUT the SessionID attribute", - "Verify value is 1 more than the value noted in 4b"), + "Value has to be the configured UserMaximumChargeCurrent value"), + TestStep("10", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Charge Demand Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvStopped"), + TestStep("10a", "TH reads from the DUT the State", + "Value has to be 0x01 (PluggedInNoDemand)"), + TestStep("11", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Charge Demand Test Event", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E02(EnergyTransferStarted) sent"), + TestStep("11a", "TH reads from the DUT the State", + "Value has to be 0x03 (PluggedInCharging)"), + TestStep("12", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Charge Demand Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvStopped"), + TestStep("12a", "TH reads from the DUT the State", + "Value has to be 0x01 (PluggedInNoDemand)"), + TestStep("13", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Plugged-in Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E01(EVNotDetected) sent"), + TestStep("13a", "TH reads from the DUT the State", + "Value has to be 0x00 (NotPluggedIn)"), + TestStep("13b", "TH reads from the DUT the SupplyState", + "Value has to be 0x01 (ChargingEnabled)"), + TestStep("13c", "TH reads from the DUT the SessionID", + "Value has to be the same value noted in 4b"), + TestStep("13d", "TH reads from the DUT the SessionDuration", + "Value has to be greater than 120 (and match the time taken for the tests from step 4 to step 13)"), + TestStep("14", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Plugged-in Test Event", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E00(EVConnected) sent"), + TestStep("14a", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Charge Demand Test Event", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E02(EnergyTransferStarted) sent"), + TestStep("14b", "TH reads from the DUT the SessionID", + "Value has to be 1 more than the value noted in 4b"), TestStep("15", "TH sends command Disable", - "Verify Event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvseStopped"), - TestStep("15a", "TH reads from the DUT the SupplyState attribute", - "Verify value is 0x00 (Disabled)"), - TestStep("16", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event Clear."), - TestStep("17", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event Clear", - "Verify Event EEVSE.S.E01(EVNotDetected) sent"), - TestStep("18", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for Basic Functionality Test Event Clear."), + "Verify DUT responds w/ status SUCCESS(0x00) and Event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvseStopped"), + TestStep("15a", "TH reads from the DUT the SupplyState", + "Value has to be 0x00 (Disabled)"), + TestStep("16", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Charge Demand Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("17", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Plugged-in Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E01(EVNotDetected) sent"), + TestStep("18", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for Basic Functionality Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), ] return steps diff --git a/src/python_testing/TC_EEVSE_2_3.py b/src/python_testing/TC_EEVSE_2_3.py index 9ff68eec659c0d..8de0ebef13e8a2 100644 --- a/src/python_testing/TC_EEVSE_2_3.py +++ b/src/python_testing/TC_EEVSE_2_3.py @@ -22,7 +22,7 @@ # test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --application evse # test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === @@ -52,91 +52,89 @@ def pics_TC_EEVSE_2_3(self): def steps_TC_EEVSE_2_3(self) -> list[TestStep]: steps = [ - TestStep("1", "Commissioning, already done", - is_commissioning=True), - TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster.", - "Verify value is 1 (True)"), - TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for Basic Functionality Test Event.", - "Verify Command response is Success"), - TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EVSE TimeOfUse Mode Test Event.", - "Verify Command response is Success"), - TestStep("5", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event.", - "Verify Command response is Success and event EEVSE.S.E00(EVConnected) sent"), - TestStep("6", "TH sends ClearTargets.", - "Verify Command response is Success"), - TestStep("6a", "TH reads NextChargeStartTime attribute.", - "Verify value is null."), - TestStep("6b", "TH reads NextChargeTargetTime attribute.", - "Verify value is null."), - TestStep("6c", "TH reads NextChargeRequiredEnergy attribute.", - "Verify value is null."), - TestStep("6d", "TH reads NextChargeTargetSoC attribute.", - "Verify value is null."), - TestStep("7", "TH sends GetTargets.", + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", + "Value has to be 1 (True)"), + TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for Basic Functionality Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EVSE TimeOfUse Mode Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("5", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Plugged-in Test Event", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E00(EVConnected) sent"), + TestStep("6", "TH sends command ClearTargets", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("6a", "TH reads from the DUT the NextChargeStartTime", + "Value has to be null."), + TestStep("6b", "TH reads from the DUT the NextChargeTargetTime", + "Value has to be null."), + TestStep("6c", "TH reads from the DUT the NextChargeRequiredEnergy", + "Value has to be null."), + TestStep("6d", "TH reads from the DUT the NextChargeTargetSoC", + "Value has to be null."), + TestStep("7", "TH sends command GetTargets", "Response EEVSE.S.C00.Tx(GetTargetsResponse) sent with no targets defined."), - TestStep("8", "TH sends SetTargets with DayOfTheWeekforSequence=0x7F (i.e. having all days set) and a single ChargingTargets={TargetTime=1439, TargetSoC=null, AddedEnergy=25000000}.", - "Verify Command response is Success"), - TestStep("8a", "TH reads NextChargeStartTime attribute.", - "Verify value is null."), - TestStep("8b", "TH reads NextChargeTargetTime attribute.", - "Verify value is null."), - TestStep("8c", "TH reads NextChargeRequiredEnergy attribute.", - "Verify value is null."), - TestStep("8d", "TH reads NextChargeTargetSoC attribute.", - "Verify value is null."), - TestStep("9", "TH sends EnableCharging with ChargingEnabledUntil=null, minimumChargeCurrent=6000, maximumChargeCurrent=60000.", - "Verify Command response is Success"), - TestStep("9a", "TH reads NextChargeStartTime attribute.", - "Verify value is before the next TargetTime above."), - TestStep("9b", "TH reads NextChargeTargetTime attribute.", - "Verify value is TargetTime above."), - TestStep("9c", "TH reads NextChargeRequiredEnergy attribute.", - "Verify value is AddedEnergy above."), - TestStep("9d", "TH reads NextChargeTargetSoC attribute.", - "Verify value is null."), - TestStep("10", "TH sends GetTargets.", + TestStep("8", "TH sends command SetTargets with DayOfTheWeekforSequence=0x7F (i.e. having all days set) and a single ChargingTargets={TargetTime=1439, TargetSoC=null, AddedEnergy=25000000}", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("8a", "TH reads from the DUT the NextChargeStartTime", + "Value has to be null."), + TestStep("8b", "TH reads from the DUT the NextChargeTargetTime", + "Value has to be null."), + TestStep("8c", "TH reads from the DUT the NextChargeRequiredEnergy", + "Value has to be null."), + TestStep("8d", "TH reads from the DUT the NextChargeTargetSoC", + "Value has to be null."), + TestStep("9", "TH sends command EnableCharging with ChargingEnabledUntil=null, minimumChargeCurrent=6000, maximumChargeCurrent=60000", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("9a", "TH reads from the DUT the NextChargeStartTime", + "Value has to be before the next TargetTime above."), + TestStep("9b", "TH reads from the DUT the NextChargeTargetTime", + "Value has to be TargetTime above."), + TestStep("9c", "TH reads from the DUT the NextChargeRequiredEnergy", + "Value has to be AddedEnergy above."), + TestStep("9d", "TH reads from the DUT the NextChargeTargetSoC", + "Value has to be null."), + TestStep("10", "TH sends command GetTargets", "Response EEVSE.S.C00.Tx(GetTargetsResponse) sent with targets equivalent to the above (Note 1)."), - TestStep("11", "TH sends SetTargets with DayOfTheWeekforSequence=0x7F (i.e. having all days set) and a single ChargingTargets={TargetTime=1, TargetSoC=100, AddedEnergy=null}.", - "Verify Command response is Success"), - TestStep("11a", "TH reads NextChargeStartTime attribute.", - "Verify value is before the next TargetTime above."), - TestStep("11b", "TH reads NextChargeTargetTime attribute.", - "Verify value is TargetTime above."), - TestStep("11c", "TH reads NextChargeRequiredEnergy attribute.", - "Verify value is null."), - TestStep("11d", "TH reads NextChargeTargetSoC attribute.", - "Verify value is 100."), - TestStep("12", "TH sends GetTargets.", + TestStep("11", "TH sends command SetTargets with DayOfTheWeekforSequence=0x7F (i.e. having all days set) and a single ChargingTargets={TargetTime=1, TargetSoC=100, AddedEnergy=null}", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("11a", "TH reads from the DUT the NextChargeStartTime", + "Value has to be before the next TargetTime above."), + TestStep("11b", "TH reads from the DUT the NextChargeTargetTime", + "Value has to be TargetTime above."), + TestStep("11c", "TH reads from the DUT the NextChargeRequiredEnergy", + "Value has to be null."), + TestStep("11d", "TH reads from the DUT the NextChargeTargetSoC", + "Value has to be 100."), + TestStep("12", "TH sends command GetTargets", "Response EEVSE.S.C00.Tx(GetTargetsResponse) sent with targets equivalent to the above (Note 1)."), - TestStep("13", "TH sends SetTargets with DayOfTheWeekforSequence=0x40 (i.e. having Saturday set) and 10 ChargingTargets with TargetTimes=60,180,300,420,540,660,780,900,1020,1140 and all with TargetSoC=null, AddedEnergy=2500000.", - "Verify Command response is Success"), - TestStep("14", "TH sends SetTargets with DayOfTheWeekforSequence=0x01 (i.e. having Sunday set) and no ChargingTargets.", - "Verify Command response is Success"), - TestStep("15", "TH sends GetTargets.", + TestStep("13", "TH sends command SetTargets with DayOfTheWeekforSequence=0x40 (i.e. having Saturday set) and 10 ChargingTargets with TargetTimes=60,180,300,420,540,660,780,900,1020,1140 and all with TargetSoC=null, AddedEnergy=2500000", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("14", "TH sends command SetTargets with DayOfTheWeekforSequence=0x01 (i.e. having Sunday set) and no ChargingTargets", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("15", "TH sends command GetTargets", "Response EEVSE.S.C00.Tx(GetTargetsResponse) sent with 1 target for each day Monday to Friday equivalent to step 9 (Note 1), 10 targets for Saturday as step 11, and no targets for Sunday."), - TestStep("16", "TH sends ClearTargets.", - "Verify Command response is Success"), - TestStep("16a", "TH reads NextChargeStartTime attribute.", - "Verify value is null."), - TestStep("16b", "TH reads NextChargeTargetTime attribute.", - "Verify value is null."), - TestStep("16c", "TH reads NextChargeRequiredEnergy attribute.", - "Verify value is null."), - TestStep("16d", "TH reads NextChargeTargetSoC attribute.", - "Verify value is null."), - TestStep("17", "TH sends GetTargets.", + TestStep("16", "TH sends command ClearTargets", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("16a", "TH reads from the DUT the NextChargeStartTime", + "Value has to be null."), + TestStep("16b", "TH reads from the DUT the NextChargeTargetTime", + "Value has to be null."), + TestStep("16c", "TH reads from the DUT the NextChargeRequiredEnergy", + "Value has to be null."), + TestStep("16d", "TH reads from the DUT the NextChargeTargetSoC", + "Value has to be null."), + TestStep("17", "TH sends command GetTargets", "Response EEVSE.S.C00.Tx(GetTargetsResponse) sent with no targets defined."), - TestStep("18", "TH sends SetTargets with two identical ChargingTargetSchedules={DayOfTheWeekforSequence=0x01,ChargingTarget[0]={TargetTime=60,TargetSoC=null,AddedEnergy=2500000}}.", - "Verify Command response is ConstraintError"), - TestStep("19", "TH sends SetTargets with DayOfTheWeekforSequence=0x40 and 11 ChargingTargets with TargetTimes=60,180,300,420,540,660,780,900,1020,1140,1260 and all with TargetSoC=null, AddedEnergy=2500000.", - "Verify Command response is ResourceExhausted"), - TestStep("20", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event Clear.", - "Verify Command response is Success and event EEVSE.S.E01(EVNotDetected) sent"), - TestStep("21", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for Basic Functionality Test Event Clear.", - "Verify Command response is Success"), - TestStep("22", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for for EVSE TimeOfUse Mode Test Event Clear.", - "Verify Command response is Success"), - + TestStep("18", "TH sends command SetTargets with two identical ChargingTargetSchedules={DayOfTheWeekforSequence=0x01,ChargingTarget[0]={TargetTime=60,TargetSoC=null,AddedEnergy=2500000}}", + "Verify DUT responds w/ status CONSTRAINT_ERROR(0x87)"), + TestStep("19", "TH sends command SetTargets with DayOfTheWeekforSequence=0x40 and 11 ChargingTargets with TargetTimes=60,180,300,420,540,660,780,900,1020,1140,1260 and all with TargetSoC=null, AddedEnergy=2500000", + "Verify DUT responds w/ status RESOURCE_EXHAUSTED(0x89)"), + TestStep("20", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Plugged-in Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E01(EVNotDetected) sent"), + TestStep("21", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for Basic Functionality Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("22", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EVSE TimeOfUse Mode Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), ] return steps diff --git a/src/python_testing/TC_EEVSE_2_4.py b/src/python_testing/TC_EEVSE_2_4.py index 3b2db653e86b63..ee8dbae5fa43a2 100644 --- a/src/python_testing/TC_EEVSE_2_4.py +++ b/src/python_testing/TC_EEVSE_2_4.py @@ -22,7 +22,7 @@ # test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --application evse # test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === @@ -50,52 +50,55 @@ def pics_TC_EEVSE_2_4(self): def steps_TC_EEVSE_2_4(self) -> list[TestStep]: steps = [ - TestStep("1", "Commissioning, already done", - is_commissioning=True), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", - "Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"), - TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for Basic Functionality Test Event"), - TestStep("3a", "After a few seconds TH reads from the DUT the State attribute", - "Verify value is 0x00 (NotPluggedIn)"), - TestStep("3b", "TH reads from the DUT the SupplyState attribute", - "Verify value is 0x00 (Disabled)"), - TestStep("3c", "TH reads from the DUT the FaultState attribute", - "Verify value is 0x00 (NoError)"), - TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event", - "Verify Event EEVSE.S.E00(EVConnected) sent"), - TestStep("4a", "TH reads from the DUT the State attribute", - "Verify value is 0x01 (PluggedInNoDemand)"), - TestStep("4b", - "TH reads from the DUT the SessionID attribute. Value is saved for later"), - TestStep("5", "TH sends command EnableCharging with ChargingEnabledUntil=Null, minimumChargeCurrent=6000, maximumChargeCurrent=60000"), - TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event", - "Verify Event EEVSE.S.E02(EnergyTransferStarted) sent."), - TestStep("6a", "TH reads from the DUT the State attribute", - "Verify value is 0x3 (PluggedInCharging)"), - TestStep("6b", "TH reads from the DUT the SupplyState attribute", - "Verify value is 0x1 (ChargingEnabled)"), - TestStep("7", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EVSE Ground Fault Test Event", - "Verify Event EEVSE.S.E04(Fault) sent with SessionID matching value in step 4b, FaultStatePreviousFaultState = 0x00 (NoError), FaultStateCurrentFaultState = 0x07 (GroundFault)"), - TestStep("7a", "TH reads from the DUT the State attribute", - "Verify value is 0x6 (Fault)"), - TestStep("7b", "TH reads from the DUT the SupplyState attribute", - "Verify value is 0x4 (DisabledError)"), - TestStep("8", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EVSE Over Temperature Fault Test Event", - "Verify Event EEVSE.S.E04(Fault) sent with SessionID matching value in step 4b, FaultStatePreviousFaultState = 0x07 (GroundFault), FaultStateCurrentFaultState = 0x0F (OverTemperature)"), - TestStep("8a", "TH reads from the DUT the State attribute", - "Verify value is 0x6 (Fault)"), - TestStep("8b", "TH reads from the DUT the SupplyState attribute", - "Verify value is 0x4 (DisabledError)"), - TestStep("9", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EVSE Fault Test Event Clear", - "Verify Event EEVSE.S.E04(Fault) sent with SessionID matching value in step 4b, FaultStatePreviousFaultState = 0x0F (OverTemperature), FaultStateCurrentFaultState = 0x00 (NoError)"), - TestStep("9a", "TH reads from the DUT the State attribute", - "Verify value is 0x3 (PluggedInCharging)"), - TestStep("9b", "TH reads from the DUT the SupplyState attribute", - "Verify value is 0x1 (ChargingEnabled)"), - TestStep("10", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Charge Demand Test Event Clear."), - TestStep("11", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EV Plugged-in Test Event Clear", - "Verify Event EEVSE.S.E01(EVNotDetected) sent"), - TestStep("12", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for Basic Functionality Test Event Clear."), + "Value has to be 1 (True)"), + TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for Basic Functionality Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("3a", "After a few seconds TH reads from the DUT the State", + "Value has to be 0x00 (NotPluggedIn)"), + TestStep("3b", "TH reads from the DUT the SupplyState", + "Value has to be 0x00 (Disabled)"), + TestStep("3c", "TH reads from the DUT the FaultState", + "Value has to be 0x00 (NoError)"), + TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Plugged-in Test Event", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E00(EVConnected) sent"), + TestStep("4a", "TH reads from the DUT the State", + "Value has to be 0x01 (PluggedInNoDemand)"), + TestStep("4b", "TH reads from the DUT the SessionID", + "Value is noted for later"), + TestStep("5", "TH sends command EnableCharging with ChargingEnabledUntil=null, minimumChargeCurrent=6000, maximumChargeCurrent=60000", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Charge Demand Test Event", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E02(EnergyTransferStarted) sent"), + TestStep("6a", "TH reads from the DUT the State", + "Value has to be 0x03 (PluggedInCharging)"), + TestStep("6b", "TH reads from the DUT the SupplyState", + "Value has to be 0x01 (ChargingEnabled)"), + TestStep("7", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EVSE Ground Fault Test Event", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E04(Fault) sent with SessionID matching value in step 4b, FaultStatePreviousFaultState = 0x00 (NoError), FaultStateCurrentFaultState = 0x07 (GroundFault)"), + TestStep("7a", "TH reads from the DUT the State", + "Value has to be 0x06 (Fault)"), + TestStep("7b", "TH reads from the DUT the SupplyState", + "Value has to be 0x04 (DisabledError)"), + TestStep("8", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EVSE Over Temperature Fault Test Event", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E04(Fault) sent with SessionID matching value in step 4b, FaultStatePreviousFaultState = 0x07 (GroundFault), FaultStateCurrentFaultState = 0x0F (OverTemperature)"), + TestStep("8a", "TH reads from the DUT the State", + "Value has to be 0x06 (Fault)"), + TestStep("8b", "TH reads from the DUT the SupplyState", + "Value has to be 0x04 (DisabledError)"), + TestStep("9", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EVSE Fault Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E04(Fault) sent with SessionID matching value in step 4b, FaultStatePreviousFaultState = 0x0F (OverTemperature), FaultStateCurrentFaultState = 0x00 (NoError)"), + TestStep("9a", "TH reads from the DUT the State", + "Value has to be 0x03 (PluggedInCharging)"), + TestStep("9b", "TH reads from the DUT the SupplyState", + "Value has to be 0x01 (ChargingEnabled)"), + TestStep("10", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Charge Demand Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("11", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Plugged-in Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E01(EVNotDetected) sent"), + TestStep("12", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for Basic Functionality Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), ] return steps diff --git a/src/python_testing/TC_EEVSE_2_5.py b/src/python_testing/TC_EEVSE_2_5.py index 89ee987ace2f66..3096f013dde8af 100644 --- a/src/python_testing/TC_EEVSE_2_5.py +++ b/src/python_testing/TC_EEVSE_2_5.py @@ -22,7 +22,7 @@ # test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --application evse # test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === @@ -50,39 +50,47 @@ def pics_TC_EEVSE_2_5(self): def steps_TC_EEVSE_2_5(self) -> list[TestStep]: steps = [ - TestStep("1", "Commissioning, already done", - is_commissioning=True), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", - "Verify that TestEventTriggersEnabled attribute has a value of 1 (True)"), - TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for Basic Functionality Test Event"), - TestStep("3a", "TH reads from the DUT the State attribute", - "Verify value is 0x00 (NotPluggedIn)"), - TestStep("3b", "TH reads from the DUT the SupplyState attribute", - "Verify value is 0x00 (Disabled)"), - TestStep("3c", "TH reads from the DUT the FaultState attribute", - "Verify value is 0x00 (NoError)"), - TestStep("4", "TH sends command EnableCharging with ChargingEnabledUntil=Null, minimumChargeCurrent=6000, maximumChargeCurrent=60000"), - TestStep("4a", "TH reads from the DUT the State attribute", - "Verify value is 0x00 (NotPluggedIn)"), - TestStep("4b", "TH reads from the DUT the SupplyState attribute", - "Verify value is 0x01 (ChargingEnabled)"), + "Value has to be 1 (True)"), + TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for Basic Functionality Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("3a", "TH reads from the DUT the State", + "Value has to be 0x00 (NotPluggedIn)"), + TestStep("3b", "TH reads from the DUT the SupplyState", + "Value has to be 0x00 (Disabled)"), + TestStep("3c", "TH reads from the DUT the FaultState", + "Value has to be 0x00 (NoError)"), + TestStep("4", "TH sends command EnableCharging with ChargingEnabledUntil=null, minimumChargeCurrent=6000, maximumChargeCurrent=60000", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("4a", "TH reads from the DUT the State", + "Value has to be 0x00 (NotPluggedIn)"), + TestStep("4b", "TH reads from the DUT the SupplyState", + "Value has to be 0x01 (ChargingEnabled)"), TestStep("5", "TH sends command StartDiagnostics", - "Verify that command is rejected with Failure"), - TestStep("6", "TH sends command Disable."), - TestStep("6a", "TH reads from the DUT the State attribute", - "Verify value is 0x00 (NotPluggedIn)"), - TestStep("6b", "TH reads from the DUT the SupplyState attribute", - "Verify value is 0x00 (Disabled)"), + "Verify DUT responds w/ status FAILURE(0x01)"), + TestStep("6", "TH sends command Disable", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("6a", "TH reads from the DUT the State", + "Value has to be 0x00 (NotPluggedIn)"), + TestStep("6b", "TH reads from the DUT the SupplyState", + "Value has to be 0x00 (Disabled)"), TestStep("7", "TH sends command StartDiagnostics", - "Verify that command is accepted with Success"), - TestStep("7a", "TH reads from the DUT the SupplyState attribute", - "Verify value is 0x04 (DisabledDiagnostics)"), - TestStep("8", "A few seconds later TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for EVSE Diagnostics Complete Event"), - TestStep("8a", "TH reads from the DUT the State attribute", - "Verify value is 0x00 (NotPluggedIn)"), - TestStep("8b", "TH reads from the DUT the SupplyState attribute", - "Verify value is 0x00 (Disabled)"), - TestStep("9", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EEVSE.TEST_EVENT_TRIGGER for Basic Functionality Test Event Clear."), + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("7a", "TH reads from the DUT the SupplyState", + "Value has to be 0x04 (DisabledDiagnostics)"), + TestStep("8", "TH sends command EnableCharging with ChargingEnabledUntil=null, minimumChargeCurrent=6000, maximumChargeCurrent=60000", + "Verify DUT responds w/ status FAILURE(0x01)"), + TestStep("8a", "TH reads from the DUT the SupplyState", + "Value has to be 0x04 (DisabledDiagnostics)"), + TestStep("9", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EVSE Diagnostics Complete Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("9a", "TH reads from the DUT the State", + "Value has to be 0x00 (NotPluggedIn)"), + TestStep("9b", "TH reads from the DUT the SupplyState", + "Value has to be 0x00 (Disabled)"), + TestStep("10", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for Basic Functionality Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), ] return steps @@ -145,16 +153,23 @@ async def test_TC_EEVSE_2_5(self): await self.check_evse_attribute("SupplyState", Clusters.EnergyEvse.Enums.SupplyStateEnum.kDisabledDiagnostics) self.step("8") - await self.send_test_event_trigger_evse_diagnostics_complete() + await self.send_enable_charge_command(charge_until=charge_until, min_charge=min_charge_current, + max_charge=max_charge_current, expected_status=Status.Failure) self.step("8a") + await self.check_evse_attribute("SupplyState", Clusters.EnergyEvse.Enums.SupplyStateEnum.kDisabledDiagnostics) + + self.step("9") + await self.send_test_event_trigger_evse_diagnostics_complete() + + self.step("9a") await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kNotPluggedIn) - self.step("8b") + self.step("9b") # It should stay disabled after a diagnostics session await self.check_evse_attribute("SupplyState", Clusters.EnergyEvse.Enums.SupplyStateEnum.kDisabled) - self.step("9") + self.step("10") await self.send_test_event_trigger_basic_clear() diff --git a/src/python_testing/TC_EEVSE_2_6.py b/src/python_testing/TC_EEVSE_2_6.py new file mode 100644 index 00000000000000..4567f96c3e466a --- /dev/null +++ b/src/python_testing/TC_EEVSE_2_6.py @@ -0,0 +1,293 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments +# for details about the block below. +# +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 +# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} +# test-runner-run/run1/factoryreset: True +# test-runner-run/run1/quiet: True +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --application evse +# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# === END CI TEST ARGUMENTS === + +import logging +import time + +import chip.clusters as Clusters +from chip.clusters.Types import NullValue +from matter_testing_support import (ClusterAttributeChangeAccumulator, EventChangeCallback, MatterBaseTest, TestStep, + async_test_body, default_matter_test_main) +from mobly import asserts +from TC_EEVSE_Utils import EEVSEBaseTestHelper + +logger = logging.getLogger(__name__) + + +class TC_EEVSE_2_6(MatterBaseTest, EEVSEBaseTestHelper): + + def desc_TC_EEVSE_2_6(self) -> str: + """Returns a description of this test""" + return "5.1.6. [TC-EEVSE-2.6] Test Q quality functionality with DUT as Server" + + def pics_TC_EEVSE_2_6(self): + """ This function returns a list of PICS for this test case that must be True for the test to be run""" + + return ["EEVSE.S"] + + def steps_TC_EEVSE_2_6(self) -> list[TestStep]: + steps = [ + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("2", "TH reads from the DUT the FeatureMap", + "Verify that the DUT response contains the FeatureMap attribute. Store the value as FeatureMap."), + TestStep("3", "Set up a subscription to all EnergyEVSE cluster events"), + TestStep("4", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", + "Value has to be 1 (True)"), + TestStep("5", "Set up a subscription to the EnergyEVSE cluster, with MinIntervalFloor set to 0, MaxIntervalCeiling set to 10 and KeepSubscriptions set to True", + "Subscription successfully established"), + TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for Basic Functionality Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("6a", "TH reads from the DUT the State", + "Value has to be 0x00 (NotPluggedIn)"), + TestStep("7", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Plugged-in Test Event", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E00(EVConnected) sent"), + TestStep("8", "TH sends command EnableCharging with ChargingEnabledUntil=null, minimumChargeCurrent=6000, maximumChargeCurrent=12000", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("9", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Charge Demand Test Event", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E02(EnergyTransferStarted) sent"), + TestStep("9a", "TH reads from the DUT the State", + "Value has to be 0x03 (PluggedInCharging)"), + TestStep("10", "Reset all accumulated report counts, then wait 12 seconds"), + TestStep("10a", "TH counts all report transactions with an attribute report for the SessionID attribute", + "TH verifies that numberOfReportsReceived = 0"), + TestStep("10b", "TH counts all report transactions with an attribute report for the SessionDuration attribute", + "TH verifies that numberOfReportsReceived <= 2"), + TestStep("10c", "TH counts all report transactions with an attribute report for the SessionEnergyCharged attribute", + "TH verifies that numberOfReportsReceived <= 2"), + TestStep("10d", "TH counts all report transactions with an attribute report for the SessionEnergyDischarged attribute", + "TH verifies that numberOfReportsReceived <= 2"), + TestStep("11", "Reset all accumulated report counts"), + TestStep("12", "TH sends command Disable", + "Verify DUT responds w/ status SUCCESS(0x00) and Event EEVSE.S.E03(EnergyTransferStopped) sent with reason EvseStopped"), + TestStep("13", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Charge Demand Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("14", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Plugged-in Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E01(EVNotDetected) sent"), + TestStep("15", "Wait 5 seconds"), + TestStep("15a", "TH counts all report transactions with an attribute report for the SessionID attribute", + "TH verifies that numberOfReportsReceived = 0"), + TestStep("15b", "TH counts all report transactions with an attribute report for the SessionDuration attribute", + "TH verifies that numberOfReportsReceived >= 1"), + TestStep("15c", "TH counts all report transactions with an attribute report for the SessionEnergyCharged attribute", + "TH verifies that numberOfReportsReceived >= 1"), + TestStep("15d", "If V2X feature is supported on the cluster, TH counts all report transactions with an attribute report for the SessionEnergyDischarged attribute", + "TH verifies that numberOfReportsReceived >= 1"), + TestStep("16", "Reset all accumulated report counts"), + TestStep("17", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Plugged-in Test Event", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E00(EVConnected) sent"), + TestStep("18", "Wait 5 seconds"), + TestStep("18a", "TH counts all report transactions with an attribute report for the SessionID attribute", + "TH verifies that numberOfReportsReceived = 1"), + TestStep("18b", "TH counts all report transactions with an attribute report for the SessionDuration attribute", + "TH verifies that numberOfReportsReceived >= 1"), + TestStep("18c", "TH counts all report transactions with an attribute report for the SessionEnergyCharged attribute", + "TH verifies that numberOfReportsReceived >= 1"), + TestStep("18d", "If V2X feature is supported on the cluster, TH counts all report transactions with an attribute report for the SessionEnergyDischarged attribute", + "TH verifies that numberOfReportsReceived >= 1"), + TestStep("19", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for EV Plugged-in Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00) and event EEVSE.S.E01(EVNotDetected) sent"), + TestStep("20", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EEVSE.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EEVSE.TESTEVENTTRIGGER for Basic Functionality Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("21", "Cancel the subscription to the Device Energy Management cluster", + "The subscription is cancelled successfully"), + ] + + return steps + + @async_test_body + async def test_TC_EEVSE_2_6(self): + self.step("1") + # Commission DUT - already done + + self.step("2") + feature_map = await self.read_evse_attribute_expect_success(attribute="FeatureMap") + logger.info(f"FeatureMap: {feature_map}") + has_v2x = feature_map & Clusters.EnergyEvse.Bitmaps.Feature.kV2x + + # Subscribe to Events and when they are sent push them to a queue for checking later + self.step("3") + events_callback = EventChangeCallback(Clusters.EnergyEvse) + await events_callback.start(self.default_controller, + self.dut_node_id, + self.matter_test_config.endpoint) + + self.step("4") + await self.check_test_event_triggers_enabled() + + self.step("5") + sub_handler = ClusterAttributeChangeAccumulator(Clusters.EnergyEvse) + await sub_handler.start(self.default_controller, self.dut_node_id, + self.matter_test_config.endpoint, + min_interval_sec=0, + max_interval_sec=10, keepSubscriptions=True) + + def accumulate_reports(wait_time): + logging.info(f"Test will now wait {wait_time} seconds to accumulate reports") + time.sleep(wait_time) + + self.step("6") + await self.send_test_event_trigger_basic() + + self.step("6a") + await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kNotPluggedIn) + + self.step("7") + await self.send_test_event_trigger_pluggedin() + event_data = events_callback.wait_for_event_report( + Clusters.EnergyEvse.Events.EVConnected) + + self.step("8") + charge_until = NullValue + min_charge_current = 6000 + max_charge_current = 12000 + await self.send_enable_charge_command(charge_until=charge_until, min_charge=min_charge_current, max_charge=max_charge_current) + + self.step("9") + await self.send_test_event_trigger_charge_demand() + event_data = events_callback.wait_for_event_report(Clusters.EnergyEvse.Events.EnergyTransferStarted) + + self.step("9a") + await self.check_evse_attribute("State", Clusters.EnergyEvse.Enums.StateEnum.kPluggedInCharging) + + self.step("10") + wait = 12 # Wait 12 seconds - the spec says we should only get reports every 10s at most, unless a command changes it + sub_handler.reset() + accumulate_reports(wait) + + self.step("10a") + count = sub_handler.attribute_report_counts[Clusters.EnergyEvse.Attributes.SessionID] + logging.info(f"Received {count} SessionID updates in {wait} seconds") + asserts.assert_equal(count, 0, f"Expected NO SessionID updates in {wait} seconds") + + self.step("10b") + count = sub_handler.attribute_report_counts[Clusters.EnergyEvse.Attributes.SessionDuration] + logging.info(f"Received {count} SessionDuration updates in {wait} seconds") + asserts.assert_less_equal(count, 2, f"Expected <= 2 SessionDuration updates in {wait} seconds") + + self.step("10c") + count = sub_handler.attribute_report_counts[Clusters.EnergyEvse.Attributes.SessionEnergyCharged] + logging.info(f"Received {count} SessionEnergyCharged updates in {wait} seconds") + asserts.assert_less_equal(count, 2, f"Expected <= 2 SessionEnergyCharged updates in {wait} seconds") + + self.step("10d") + if has_v2x: + count = sub_handler.attribute_report_counts[Clusters.EnergyEvse.Attributes.SessionEnergyDischarged] + logging.info(f"Received {count} SessionEnergyDischarged updates in {wait} seconds") + asserts.assert_less_equal(count, 2, f"Expected <= 2 SessionEnergyDischarged updates in {wait} seconds") + + self.step("11") + sub_handler.reset() + + self.step("12") + await self.send_disable_command() + event_data = events_callback.wait_for_event_report( + Clusters.EnergyEvse.Events.EnergyTransferStopped) + expected_reason = Clusters.EnergyEvse.Enums.EnergyTransferStoppedReasonEnum.kEVSEStopped + asserts.assert_equal(expected_reason, event_data.reason, + f"EnergyTransferStopped event reason was {event_data.reason}, expected {expected_reason}") + + self.step("13") + await self.send_test_event_trigger_charge_demand_clear() + + self.step("14") + await self.send_test_event_trigger_pluggedin_clear() + event_data = events_callback.wait_for_event_report( + Clusters.EnergyEvse.Events.EVNotDetected) + + self.step("15") + wait = 5 # We expect a change to the Session attributes after the EV is unplugged, Wait 5 seconds - allow time for the report to come in + accumulate_reports(wait) + + self.step("15a") + count = sub_handler.attribute_report_counts[Clusters.EnergyEvse.Attributes.SessionID] + logging.info(f"Received {count} SessionID updates in {wait} seconds") + asserts.assert_equal(count, 0, "Expected = 0 SessionID updates after a Unplugged operation - it changes on next plug-in") + + self.step("15b") + count = sub_handler.attribute_report_counts[Clusters.EnergyEvse.Attributes.SessionDuration] + logging.info(f"Received {count} SessionDuration updates in {wait} seconds") + asserts.assert_greater_equal(count, 1, "Expected >= 1 SessionDuration updates after a Unplugged operation") + + self.step("15c") + count = sub_handler.attribute_report_counts[Clusters.EnergyEvse.Attributes.SessionEnergyCharged] + logging.info(f"Received {count} SessionEnergyCharged updates in {wait} seconds") + asserts.assert_greater_equal(count, 1, "Expected >= 1 SessionEnergyCharged updates after a Unplugged operation") + + self.step("15d") + if has_v2x: + count = sub_handler.attribute_report_counts[Clusters.EnergyEvse.Attributes.SessionEnergyDischarged] + logging.info(f"Received {count} SessionEnergyDischarged updates in {wait} seconds") + asserts.assert_greater_equal(count, 1, "Expected >= 1 SessionEnergyDischarged updates after a Unplugged operation") + + self.step("16") + sub_handler.reset() + + self.step("17") + await self.send_test_event_trigger_pluggedin() + event_data = events_callback.wait_for_event_report( + Clusters.EnergyEvse.Events.EVConnected) + + self.step("18") + wait = 5 # We expect a change to the Session attributes after the EV is plugged in again, Wait 5 seconds - allow time for the report to come in + accumulate_reports(wait) + + self.step("18a") + count = sub_handler.attribute_report_counts[Clusters.EnergyEvse.Attributes.SessionID] + logging.info(f"Received {count} SessionID updates in {wait} seconds") + asserts.assert_equal(count, 1, "Expected = 1 SessionID updates after a plug-in") + + self.step("18b") + count = sub_handler.attribute_report_counts[Clusters.EnergyEvse.Attributes.SessionDuration] + logging.info(f"Received {count} SessionDuration updates in {wait} seconds") + asserts.assert_greater_equal(count, 1, "Expected >= 1 SessionDuration updates after a Unplugged operation") + + self.step("18c") + count = sub_handler.attribute_report_counts[Clusters.EnergyEvse.Attributes.SessionEnergyCharged] + logging.info(f"Received {count} SessionEnergyCharged updates in {wait} seconds") + asserts.assert_greater_equal(count, 1, "Expected >= 1 SessionEnergyCharged updates after a Unplugged operation") + + self.step("18d") + if has_v2x: + count = sub_handler.attribute_report_counts[Clusters.EnergyEvse.Attributes.SessionEnergyDischarged] + logging.info(f"Received {count} SessionEnergyDischarged updates in {wait} seconds") + asserts.assert_greater_equal(count, 1, "Expected >= 1 SessionEnergyDischarged updates after a Unplugged operation") + + self.step("19") + await self.send_test_event_trigger_pluggedin_clear() + event_data = events_callback.wait_for_event_report( + Clusters.EnergyEvse.Events.EVNotDetected) + + self.step("20") + await self.send_test_event_trigger_basic_clear() + + self.step("21") + await sub_handler.cancel() + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_EWATERHTR_2_1.py b/src/python_testing/TC_EWATERHTR_2_1.py index 176ecf2f95a173..df5d2821ece9e4 100644 --- a/src/python_testing/TC_EWATERHTR_2_1.py +++ b/src/python_testing/TC_EWATERHTR_2_1.py @@ -20,11 +20,11 @@ # # === BEGIN CI TEST ARGUMENTS === # test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} +# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --int-arg PIXIT.EWATERHTR.EM:1 PIXIT.EWATERHTR.TP:2 +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x03 --application water-heater +# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === import logging @@ -50,20 +50,21 @@ def pics_TC_EWATERHTR_2_1(self): def steps_TC_EWATERHTR_2_1(self) -> list[TestStep]: steps = [ - TestStep("1", "Commissioning, already done", - is_commissioning=True), - TestStep("2", "TH reads HeaterTypes attribute.", - "DUT as Server replies with a WaterHeaterHeatSourceBitmap (enum8) greater than 0x00 (at least one type supported), and less than 0x20 (no undefined types supported)."), - TestStep("3", "TH reads HeatDemand attribute.", - "DUT as Server replies with a WaterHeaterHeatSourceBitmap (enum8)."), - TestStep("4", "TH reads TankVolume attribute.", - "DUT as Server replies with a uint16 value."), - TestStep("5", "TH reads EstimatedHeatRequired attribute.", - "DUT as Server replies with an energy-mWh value."), - TestStep("6", "TH reads TankPercentage attribute.", - "DUT as Server replies with a percent value."), - TestStep("7", "TH reads BoostState attribute.", - "DUT as Server replies with a BoostStateEnum (enum8) value."), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)."), + TestStep("2", "TH reads from the DUT the FeatureMap attribute.", + "Verify that the DUT response contains the FeatureMap attribute. Store the value as FeatureMap."), + TestStep("3", "TH reads from the DUT the HeaterTypes attribute.", + "Verify that the DUT response contains a WaterHeaterTypeBitmap (enum8) greater than 0x00 (at least one type supported), and less than 0x20 (no undefined types supported)"), + TestStep("4", "TH reads from the DUT the HeatDemand attribute.", + "Verify that the DUT response contains a WaterHeaterDemandBitmap (enum8) value less than 0x20 (no undefined types supported)."), + TestStep("5", "TH reads from the DUT the TankVolume attribute.", + "Verify that the DUT response contains a uint16 value."), + TestStep("6", "TH reads from the DUT the EstimatedHeatRequired attribute.", + "Verify that the DUT response contains an energy-mWh value that is greater or equal to 0."), + TestStep("7", "TH reads from the DUT the TankPercentage attribute.", + "Verify that the DUT response contains a percent value that is between 0 and 100 inclusive."), + TestStep("8", "TH reads from the DUT the BoostState attribute.", + "Verify that the DUT response contains a BoostStateEnum (enum8) value that is less than or equal to 1."), ] return steps @@ -71,40 +72,42 @@ def steps_TC_EWATERHTR_2_1(self) -> list[TestStep]: @async_test_body async def test_TC_EWATERHTR_2_1(self): - em_supported = self.matter_test_config.global_test_params['PIXIT.EWATERHTR.EM'] - tp_supported = self.matter_test_config.global_test_params['PIXIT.EWATERHTR.TP'] - self.step("1") # Commission DUT - already done + # Get the feature map for later self.step("2") + feature_map = await self.read_whm_attribute_expect_success(attribute="FeatureMap") + em_supported = bool(feature_map & Clusters.WaterHeaterManagement.Bitmaps.Feature.kEnergyManagement) + tp_supported = bool(feature_map & Clusters.WaterHeaterManagement.Bitmaps.Feature.kTankPercent) + logger.info(f"FeatureMap: {feature_map} : TP supported: {tp_supported} | EM supported: {em_supported}") + + self.step("3") heaterTypes = await self.read_whm_attribute_expect_success(attribute="HeaterTypes") asserts.assert_greater(heaterTypes, 0, f"Unexpected HeaterTypes value - expected {heaterTypes} > 0") asserts.assert_less_equal(heaterTypes, Clusters.WaterHeaterManagement.Bitmaps.WaterHeaterHeatSourceBitmap.kOther, f"Unexpected HeaterTypes value - expected {heaterTypes} <= WaterHeaterHeatSourceBitmap.kOther") - self.step("3") + self.step("4") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") - asserts.assert_greater(heatDemand, 0, - f"Unexpected HeatDemand value - expected {heatDemand} > 0") asserts.assert_less_equal(heatDemand, Clusters.WaterHeaterManagement.Bitmaps.WaterHeaterHeatSourceBitmap.kOther, f"Unexpected HeatDemand value - expected {heatDemand} <= WaterHeaterHeatSourceBitmap.kOther") - self.step("4") + self.step("5") if em_supported: value = await self.read_whm_attribute_expect_success(attribute="TankVolume") else: logging.info("Skipping step 4 as PIXIT.EWATERHTR.EM not supported") - self.step("5") + self.step("6") if em_supported: value = await self.read_whm_attribute_expect_success(attribute="EstimatedHeatRequired") asserts.assert_greater_equal(value, 0, f"Unexpected EstimatedHeatRequired value - expected {value} >= 0") else: logging.info("Skipping step 5 as PIXIT.EWATERHTR.EM not supported") - self.step("6") + self.step("7") if tp_supported: value = await self.read_whm_attribute_expect_success(attribute="TankPercentage") asserts.assert_greater_equal(value, 0, f"Unexpected TankPercentage value - expected {value} >= 0") @@ -112,9 +115,9 @@ async def test_TC_EWATERHTR_2_1(self): else: logging.info("Skipping step 6 as PIXIT.EWATERHTR.TP not supported") - self.step("7") + self.step("8") boost_state = await self.read_whm_attribute_expect_success(attribute="BoostState") - asserts.assert_less_equal(boost_state, Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kInactive, + asserts.assert_less_equal(boost_state, Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kActive, f"Unexpected BoostState value - expected {boost_state} should be BoostStateEnum (enum8) value in range 0x00 to 0x01") diff --git a/src/python_testing/TC_EWATERHTR_2_2.py b/src/python_testing/TC_EWATERHTR_2_2.py index 9eafd35afaed33..8c96e52d4524c8 100644 --- a/src/python_testing/TC_EWATERHTR_2_2.py +++ b/src/python_testing/TC_EWATERHTR_2_2.py @@ -20,10 +20,10 @@ # # === BEGIN CI TEST ARGUMENTS === # test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} +# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x00 --application water-heater # test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === @@ -32,7 +32,7 @@ import time import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from matter_testing_support import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_EWATERHTRBase import EWATERHTRBase @@ -52,119 +52,136 @@ def pics_TC_EWATERHTR_2_2(self): def steps_TC_EWATERHTR_2_2(self) -> list[TestStep]: steps = [ - TestStep("1", "Commissioning, already done", - is_commissioning=True), - TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster.", - "Verify value is 1 (True)"), - TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER for Basic installation Test Event.", - "Verify Command response is Success"), - TestStep("3a", "TH reads HeatDemand attribute.", - "Verify value is 0x00 (no demand on any source)"), - TestStep("3b", "TH reads BoostState attribute.", - "Verify value is 0 (Inactive)"), - TestStep("3c", "TH reads HeaterTypes attribute.", - "Verify value is greater than 0x00 (at least one type supported) and store the value as HeaterTypes"), - TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER for Manual mode Test Event.", - "Verify Command response is Success"), - TestStep("4a", "TH reads HeatDemand attribute.", - "Verify value is greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), - TestStep("5", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER for Water Temperature 61C Test Event.", - "Verify Command response is Success"), - TestStep("5a", "TH reads HeatDemand attribute.", - "Verify value is 0x00 (no demand on any source)"), - TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER for Water Temperature 20C Test Event.", - "Verify Command response is Success"), - TestStep("6a", "TH reads HeatDemand attribute.", - "Verify value is greater than 0x00 (demand on at least one source)"), - TestStep("7", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER for Off mode Test Event.", - "Verify Command response is Success"), - TestStep("7a", "TH reads HeatDemand attribute.", - "Verify value is 0x00 (no demand on any source)"), - TestStep("8", "TH sends Boost with Duration=5s,OneShot=True.", - "Verify Command response is Success"), - TestStep("8a", "TH reads HeatDemand attribute.", - "Verify value is greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), - TestStep("8b", "TH reads BoostState attribute.", - "Verify value is 1 (Active)"), - TestStep("9", "Wait 6 seconds"), - TestStep("9a", "TH reads HeatDemand attribute.", - "Verify value is 0x00 (no demand on any source)"), - TestStep("9b", "TH reads BoostState attribute.", - "Verify value is 0 (Inactive)"), - TestStep("10", "TH sends Boost with Duration=600s,OneShot=True.", - "Verify Command response is Success"), - TestStep("10a", "TH reads HeatDemand attribute.", - "Verify value is greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), - TestStep("10b", "TH reads BoostState attribute.", - "Verify value is 1 (Active)"), - TestStep("11", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER for Water Temperature 61C Test Event.", - "Verify Command response is Success"), - TestStep("11a", "TH reads HeatDemand attribute.", - "Verify value is 0x00 (no demand on any source)"), - TestStep("11b", "TH reads BoostState attribute.", - "Verify value is 0 (Inactive)"), - TestStep("12", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER for Water Temperature 20C Test Event.", - "Verify Command response is Success"), - TestStep("12a", "TH reads HeatDemand attribute.", - "Verify value is 0x00 (no demand on any source)"), - TestStep("13", "TH sends Boost with Duration=600s.", - "Verify Command response is Success"), - TestStep("13a", "TH reads HeatDemand attribute.", - "Verify value is greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), - TestStep("13b", "TH reads BoostState attribute.", - "Verify value is 1 (Active)"), - TestStep("14", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER for Water Temperature 61C Test Event.", - "Verify Command response is Success"), - TestStep("14a", "TH reads HeatDemand attribute.", - "Verify value is 0x00 (no demand on any source)"), - TestStep("14b", "TH reads BoostState attribute.", - "Verify value is 1 (Active)"), - TestStep("15", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER for Water Temperature 20C Test Event.", - "Verify Command response is Success"), - TestStep("15a", "TH reads HeatDemand attribute.", - "Verify value is greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), - TestStep("15b", "TH reads BoostState attribute.", - "Verify value is 1 (Active)"), - TestStep("16", "TH sends CancelBoost.", - "Verify Command response is Success"), - TestStep("16a", "TH reads HeatDemand attribute.", - "Verify value is 0x00 (no demand on any source)"), - TestStep("16b", "TH reads BoostState attribute.", - "Verify value is 0 (Inactive)"), - TestStep("17", "TH sends Boost with Duration=600s,TemporarySetpoint=65C.", - "Verify Command response is Success"), - TestStep("17a", "TH reads HeatDemand attribute.", - "Verify value is greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), - TestStep("17b", "TH reads BoostState attribute.", - "Verify value is 1 (Active)"), - TestStep("18", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER for Water Temperature 61C Test Event.", - "Verify Command response is Success"), - TestStep("18a", "TH reads HeatDemand attribute.", - "Verify value is greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), - TestStep("18b", "TH reads BoostState attribute.", - "Verify value is 1 (Active)"), - TestStep("19", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER for Water Temperature 66C Test Event.", - "Verify Command response is Success"), - TestStep("19a", "TH reads HeatDemand attribute.", - "Verify value is 0x00 (no demand on any source)"), - TestStep("19b", "TH reads BoostState attribute.", - "Verify value is 1 (Active)"), - TestStep("20", "TH sends Boost with Duration=600s,TemporarySetpoint=70C.", - "Verify Command response is Success"), - TestStep("20a", "TH reads HeatDemand attribute.", - "Verify value is greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), - TestStep("20b", "TH reads BoostState attribute.", - "Verify value is 1 (Active)"), - TestStep("21", "TH sends CancelBoost.", - "Verify Command response is Success"), - TestStep("21a", "TH reads HeatDemand attribute.", - "Verify value is 0x00 (no demand on any source)"), - TestStep("21b", "TH reads BoostState attribute.", - "Verify value is 0 (Inactive)"), - TestStep("22", "TH sends CancelBoost.", - "Verify Command response is Success"), - TestStep("23", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER for Basic installation Test Event Clear.", - "Verify Command response is Success"), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("2", "Set up a subscription to all WaterHeaterManagement cluster events"), + TestStep("3", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", + "Value has to be 1 (True)"), + TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EWATERHTR.TESTEVENTTRIGGER for Basic installation Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("4a", "TH reads from the DUT the HeatDemand", + "Value has to be 0x00 (no demand on any source)"), + TestStep("4b", "TH reads from the DUT the BoostState", + "Value has to be 0 (Inactive)"), + TestStep("4c", "TH reads from the DUT the HeaterTypes", + "Value has to be greater than 0x00 (at least one type supported) and Store the value as HeaterTypes"), + TestStep("5", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EWATERHTR.TESTEVENTTRIGGER for Manual mode Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("5a", "TH reads from the DUT the HeatDemand", + "Value has to be greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), + TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EWATERHTR.TESTEVENTTRIGGER for Water Temperature 61C Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("6a", "TH reads from the DUT the HeatDemand", + "Value has to be 0x00 (no demand on any source)"), + TestStep("7", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EWATERHTR.TESTEVENTTRIGGER for Water Temperature 20C Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("7a", "TH reads from the DUT the HeatDemand", + "Value has to be greater than 0x00 (demand on at least one source)"), + TestStep("8", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EWATERHTR.TESTEVENTTRIGGER for Off mode Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("8a", "TH reads from the DUT the HeatDemand", + "Value has to be 0x00 (no demand on any source)"), + TestStep("9", "TH sends command Boost with Duration=5s,OneShot=True", + "Verify DUT responds w/ status SUCCESS(0x00) and Event EWATERHTR.S.E00(BoostStarted) sent with Duration=5 and OneShot=True"), + TestStep("9a", "TH reads from the DUT the HeatDemand", + "Value has to be greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), + TestStep("9b", "TH reads from the DUT the BoostState", + "Value has to be 1 (Active)"), + TestStep("10", "Wait 6 seconds", + "Event EWATERHTR.S.E00(BoostEnded) sent"), + TestStep("10a", "TH reads from the DUT the HeatDemand", + "Value has to be 0x00 (no demand on any source)"), + TestStep("10b", "TH reads from the DUT the BoostState", + "Value has to be 0 (Inactive)"), + TestStep("11", "TH sends command Boost with Duration=600s,OneShot=True", + "Verify DUT responds w/ status SUCCESS(0x00) and Event EWATERHTR.S.E00(BoostStarted) sent with Duration=600 and OneShot=True"), + TestStep("11a", "TH reads from the DUT the HeatDemand", + "Value has to be greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), + TestStep("11b", "TH reads from the DUT the BoostState", + "Value has to be 1 (Active)"), + TestStep("12", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EWATERHTR.TESTEVENTTRIGGER for Water Temperature 61C Test Event", + "Verify DUT responds w/ status SUCCESS(0x00) and Event EWATERHTR.S.E00(BoostEnded) sent"), + TestStep("12a", "TH reads from the DUT the HeatDemand", + "Value has to be 0x00 (no demand on any source)"), + TestStep("12b", "TH reads from the DUT the BoostState", + "Value has to be 0 (Inactive)"), + TestStep("13", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EWATERHTR.TESTEVENTTRIGGER for Water Temperature 20C Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("13a", "TH reads from the DUT the HeatDemand", + "Value has to be 0x00 (no demand on any source)"), + TestStep("14", "TH sends command Boost with Duration=600s", + "Verify DUT responds w/ status SUCCESS(0x00) and Event EWATERHTR.S.E00(BoostStarted) sent with Duration=600 and OneShot=None"), + TestStep("14a", "TH reads from the DUT the HeatDemand", + "Value has to be greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), + TestStep("14b", "TH reads from the DUT the BoostState", + "Value has to be 1 (Active)"), + TestStep("15", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EWATERHTR.TESTEVENTTRIGGER for Water Temperature 61C Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("15a", "TH reads from the DUT the HeatDemand", + "Value has to be 0x00 (no demand on any source)"), + TestStep("15b", "TH reads from the DUT the BoostState", + "Value has to be 1 (Active)"), + TestStep("16", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EWATERHTR.TESTEVENTTRIGGER for Water Temperature 20C Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("16a", "TH reads from the DUT the HeatDemand", + "Value has to be greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), + TestStep("16b", "TH reads from the DUT the BoostState", + "Value has to be 1 (Active)"), + TestStep("17", "TH sends command CancelBoost", + "Verify DUT responds w/ status SUCCESS(0x00) and Event EWATERHTR.S.E00(BoostEnded) sent"), + TestStep("17a", "TH reads from the DUT the HeatDemand", + "Value has to be 0x00 (no demand on any source)"), + TestStep("17b", "TH reads from the DUT the BoostState", + "Value has to be 0 (Inactive)"), + TestStep("18", "TH sends command Boost with Duration=500s,TemporarySetpoint=65C", + "Verify DUT responds w/ status SUCCESS(0x00) and Event EWATERHTR.S.E00(BoostStarted) sent with Duration=500 and TemporarySetpoint=6500"), + TestStep("18a", "TH reads from the DUT the HeatDemand", + "Value has to be greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), + TestStep("18b", "TH reads from the DUT the BoostState", + "Value has to be 1 (Active)"), + TestStep("19", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EWATERHTR.TESTEVENTTRIGGER for Water Temperature 61C Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("19a", "TH reads from the DUT the HeatDemand", + "Value has to be greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), + TestStep("19b", "TH reads from the DUT the BoostState", + "Value has to be 1 (Active)"), + TestStep("20", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EWATERHTR.TESTEVENTTRIGGER for Water Temperature 66C Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("20a", "TH reads from the DUT the HeatDemand", + "Value has to be 0x00 (no demand on any source)"), + TestStep("20b", "TH reads from the DUT the BoostState", + "Value has to be 1 (Active)"), + TestStep("21", "TH sends command Boost with Duration=600s,TemporarySetpoint=70C", + "Verify DUT responds w/ status SUCCESS(0x00) and Event EWATERHTR.S.E00(BoostStarted) sent with Duration=600 and TemporarySetpoint=7000"), + TestStep("21a", "TH reads from the DUT the HeatDemand", + "Value has to be greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), + TestStep("21b", "TH reads from the DUT the BoostState", + "Value has to be 1 (Active)"), + TestStep("22", "TH sends command CancelBoost", + "Verify DUT responds w/ status SUCCESS(0x00) and Event EWATERHTR.S.E00(BoostEnded) sent"), + TestStep("22a", "TH reads from the DUT the HeatDemand", + "Value has to be 0x00 (no demand on any source)"), + TestStep("22b", "TH reads from the DUT the BoostState", + "Value has to be 0 (Inactive)"), + TestStep("23", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EWATERHTR.TESTEVENTTRIGGER for Water Temperature 20C Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("23a", "TH reads from the DUT the HeatDemand", + "Value has to be 0x00 (no demand on any source)"), + TestStep("24", "TH sends command Boost with Duration=200s,EmergencyBoost=True", + "Verify DUT responds w/ status SUCCESS(0x00) and Event EWATERHTR.S.E00(BoostStarted) sent with Duration=200, EmergencyBoost=True and TemporarySetpoint=None"), + TestStep("24a", "TH reads from the DUT the HeatDemand", + "Value has to be greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), + TestStep("24b", "TH reads from the DUT the BoostState", + "Value has to be 1 (Active)"), + TestStep("25", "TH sends command CancelBoost", + "Verify DUT responds w/ status SUCCESS(0x00) and Event EWATERHTR.S.E00(BoostEnded) sent"), + TestStep("25a", "TH reads from the DUT the HeatDemand", + "Value has to be 0x00 (no demand on any source)"), + TestStep("25b", "TH reads from the DUT the BoostState", + "Value has to be 0 (Inactive)"), + TestStep("26", "TH sends command CancelBoost", + "Verify DUT responds w/ status SUCCESS(0x00) and no event sent"), + TestStep("27", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EWATERHTR.TESTEVENTTRIGGER for Basic installation Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), ] return steps @@ -176,202 +193,273 @@ async def test_TC_EWATERHTR_2_2(self): # Commission DUT - already done self.step("2") - await self.check_test_event_triggers_enabled() + # Subscribe to Events and when they are sent push them to a queue for checking later + events_callback = EventChangeCallback(Clusters.WaterHeaterManagement) + await events_callback.start(self.default_controller, + self.dut_node_id, + self.matter_test_config.endpoint) self.step("3") + await self.check_test_event_triggers_enabled() + + self.step("4") await self.send_test_event_trigger_basic_installation_test_event() - self.step("3a") + self.step("4a") await self.check_whm_attribute("HeatDemand", 0) - self.step("3b") + self.step("4b") await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kInactive) - self.step("3c") + self.step("4c") heaterTypes = await self.read_whm_attribute_expect_success(attribute="HeaterTypes") asserts.assert_greater(heaterTypes, 0, f"Unexpected HeaterTypes value - expected {heaterTypes} > 0") asserts.assert_less_equal(heaterTypes, Clusters.WaterHeaterManagement.Bitmaps.WaterHeaterHeatSourceBitmap.kOther, f"Unexpected HeaterTypes value - expected {heaterTypes} <= WaterHeaterHeatSourceBitmap.kOther") - self.step("4") + self.step("5") await self.send_test_event_trigger_manual_mode_test_event() - self.step("4a") + self.step("5a") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") asserts.assert_greater(heatDemand, 0) asserts.assert_equal(heatDemand & (~heaterTypes), 0, "heatDemand should only be from declared supported types"), - self.step("5") + self.step("6") await self.send_test_event_trigger_water_temperature61C_test_event() - self.step("5a") + self.step("6a") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") asserts.assert_equal(heatDemand, 0) - self.step("6") + self.step("7") await self.send_test_event_trigger_water_temperature20C_test_event() - self.step("6a") + self.step("7a") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") asserts.assert_greater(heatDemand, 0) asserts.assert_equal(heatDemand & (~heaterTypes), 0, "heatDemand should only be from declared supported types"), - self.step("7") + self.step("8") await self.send_test_event_trigger_off_mode_test_event() - self.step("7a") + self.step("8a") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") asserts.assert_equal(heatDemand, 0) - self.step("8") + self.step("9") await self.send_boost_command(duration=5, one_shot=True) - self.step("8a") + event_data = events_callback.wait_for_event_report(Clusters.WaterHeaterManagement.Events.BoostStarted) + asserts.assert_equal(event_data.boostInfo.duration, 5) + asserts.assert_equal(event_data.boostInfo.oneShot, True) + + self.step("9a") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") asserts.assert_greater(heatDemand, 0) asserts.assert_equal(heatDemand & (~heaterTypes), 0, "heatDemand should only be from declared supported types"), - self.step("8b") + self.step("9b") await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kActive) - self.step("9") + self.step("10") time.sleep(6) + event_data = events_callback.wait_for_event_report(Clusters.WaterHeaterManagement.Events.BoostEnded) - self.step("9a") + self.step("10a") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") asserts.assert_equal(heatDemand, 0) - self.step("9b") + self.step("10b") await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kInactive) - self.step("10") + self.step("11") await self.send_boost_command(duration=600, one_shot=True) - self.step("10a") + event_data = events_callback.wait_for_event_report(Clusters.WaterHeaterManagement.Events.BoostStarted) + asserts.assert_equal(event_data.boostInfo.duration, 600) + asserts.assert_equal(event_data.boostInfo.oneShot, True) + + self.step("11a") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") asserts.assert_greater(heatDemand, 0) asserts.assert_equal(heatDemand & (~heaterTypes), 0, "heatDemand should only be from declared supported types"), - self.step("10b") + self.step("11b") await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kActive) - self.step("11") + self.step("12") await self.send_test_event_trigger_water_temperature61C_test_event() - self.step("11a") + event_data = events_callback.wait_for_event_report(Clusters.WaterHeaterManagement.Events.BoostEnded) + + self.step("12a") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") asserts.assert_equal(heatDemand, 0) - self.step("11b") + self.step("12b") await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kInactive) - self.step("12") + self.step("13") await self.send_test_event_trigger_water_temperature20C_test_event() - self.step("12a") + self.step("13a") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") asserts.assert_equal(heatDemand, 0) - self.step("13") + self.step("14") await self.send_boost_command(duration=600) - self.step("13a") + event_data = events_callback.wait_for_event_report(Clusters.WaterHeaterManagement.Events.BoostStarted) + asserts.assert_equal(event_data.boostInfo.duration, 600) + asserts.assert_true(event_data.boostInfo.oneShot is None, "oneShot should be None") + + self.step("14a") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") asserts.assert_greater(heatDemand, 0) asserts.assert_equal(heatDemand & (~heaterTypes), 0, "heatDemand should only be from declared supported types"), - self.step("13b") + self.step("14b") await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kActive) - self.step("14") + self.step("15") await self.send_test_event_trigger_water_temperature61C_test_event() - self.step("14a") + self.step("15a") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") asserts.assert_equal(heatDemand, 0) - self.step("14b") + self.step("15b") await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kActive) - self.step("15") + self.step("16") await self.send_test_event_trigger_water_temperature20C_test_event() - self.step("15a") + self.step("16a") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") asserts.assert_greater(heatDemand, 0) asserts.assert_equal(heatDemand & (~heaterTypes), 0, "heatDemand should only be from declared supported types"), - self.step("15b") + self.step("16b") await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kActive) - self.step("16") + self.step("17") await self.send_cancel_boost_command() - self.step("16a") + event_data = events_callback.wait_for_event_report(Clusters.WaterHeaterManagement.Events.BoostEnded) + + self.step("17a") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") asserts.assert_equal(heatDemand, 0) - self.step("16b") + self.step("17b") await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kInactive) - self.step("17") - await self.send_boost_command(duration=600, temporary_setpoint=6500) + self.step("18") + await self.send_boost_command(duration=500, temporary_setpoint=6500) - self.step("17a") + event_data = events_callback.wait_for_event_report(Clusters.WaterHeaterManagement.Events.BoostStarted) + asserts.assert_equal(event_data.boostInfo.duration, 500) + asserts.assert_equal(event_data.boostInfo.temporarySetpoint, 6500) + + self.step("18a") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") asserts.assert_greater(heatDemand, 0) asserts.assert_equal(heatDemand & (~heaterTypes), 0, "heatDemand should only be from declared supported types"), - self.step("17b") + self.step("18b") await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kActive) - self.step("18") + self.step("19") await self.send_test_event_trigger_water_temperature61C_test_event() - self.step("18a") + self.step("19a") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") asserts.assert_greater(heatDemand, 0) asserts.assert_equal(heatDemand & (~heaterTypes), 0, "heatDemand should only be from declared supported types"), - self.step("18b") + self.step("19b") await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kActive) - self.step("19") + self.step("20") await self.send_test_event_trigger_water_temperature66C_test_event() - self.step("19a") + self.step("20a") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") asserts.assert_equal(heatDemand, 0) - self.step("19b") + self.step("20b") await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kActive) - self.step("20") + self.step("21") await self.send_boost_command(duration=600, temporary_setpoint=7000) - self.step("20a") + event_data = events_callback.wait_for_event_report(Clusters.WaterHeaterManagement.Events.BoostStarted) + asserts.assert_equal(event_data.boostInfo.duration, 600) + asserts.assert_equal(event_data.boostInfo.temporarySetpoint, 7000) + + self.step("21a") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") asserts.assert_greater(heatDemand, 0) asserts.assert_equal(heatDemand & (~heaterTypes), 0, "heatDemand should only be from declared supported types"), - self.step("20b") + self.step("21b") await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kActive) - self.step("21") + self.step("22") await self.send_cancel_boost_command() - self.step("21a") + event_data = events_callback.wait_for_event_report(Clusters.WaterHeaterManagement.Events.BoostEnded) + + self.step("22a") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") asserts.assert_equal(heatDemand, 0) - self.step("21b") + self.step("22b") await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kInactive) - self.step("22") + self.step("23") + await self.send_test_event_trigger_water_temperature20C_test_event() + + self.step("23a") + heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") + asserts.assert_equal(heatDemand, 0) + + self.step("24") + await self.send_boost_command(duration=200, emergency_boost=True) + + event_data = events_callback.wait_for_event_report(Clusters.WaterHeaterManagement.Events.BoostStarted) + asserts.assert_equal(event_data.boostInfo.duration, 200) + asserts.assert_equal(event_data.boostInfo.emergencyBoost, True) + asserts.assert_is_none(event_data.boostInfo.temporarySetpoint) + + self.step("24a") + heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") + asserts.assert_greater(heatDemand, 0) + asserts.assert_equal(heatDemand & (~heaterTypes), 0, "heatDemand should only be from declared supported types"), + + self.step("24b") + await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kActive) + + self.step("25") await self.send_cancel_boost_command() - self.step("23") + event_data = events_callback.wait_for_event_report(Clusters.WaterHeaterManagement.Events.BoostEnded) + + self.step("25a") + heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") + asserts.assert_equal(heatDemand, 0) + + self.step("25b") + await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kInactive) + + self.step("26") + await self.send_cancel_boost_command() + + event_data = events_callback.wait_for_event_expect_no_report() + + self.step("27") await self.send_test_event_trigger_basic_installation_test_event_clear() diff --git a/src/python_testing/TC_EWATERHTR_2_3.py b/src/python_testing/TC_EWATERHTR_2_3.py index 41500bd3ea586e..e39257134b3db5 100644 --- a/src/python_testing/TC_EWATERHTR_2_3.py +++ b/src/python_testing/TC_EWATERHTR_2_3.py @@ -19,10 +19,10 @@ # # === BEGIN CI TEST ARGUMENTS === # test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} +# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --featureSet 0x03 --application water-heater # test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === @@ -30,7 +30,7 @@ import logging import chip.clusters as Clusters -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from matter_testing_support import EventChangeCallback, MatterBaseTest, TestStep, async_test_body, default_matter_test_main from mobly import asserts from TC_EWATERHTRBase import EWATERHTRBase @@ -49,92 +49,92 @@ def pics_TC_EWATERHTR_2_3(self): def steps_TC_EWATERHTR_2_3(self) -> list[TestStep]: steps = [ - TestStep("1", "Commissioning, already done", - is_commissioning=True), - TestStep("2", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster.", - "Verify value is 1 (True)"), - TestStep("3", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER for Basic installation Test Event.", - "Verify Command response is Success"), - TestStep("3a", "TH reads HeatDemand attribute.", - "Verify value is 0x00 (no demand on any source)"), - TestStep("3b", "TH reads BoostState attribute.", - "Verify value is 0 (Inactive)"), - TestStep("3c", "TH reads TankPercentage attribute.", - "Verify value is 0%"), - TestStep("3d", "TH reads HeaterTypes attribute.", - "Verify value is greater than 0x00 (at least one type supported) and store the value as HeaterTypes"), - TestStep("4", "TH sends Boost with Duration=600s,TargetPercentage=100%.", - "Verify Command response is Success"), - TestStep("4a", "TH reads HeatDemand attribute.", - "Verify value is greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), - TestStep("4b", "TH reads BoostState attribute.", - "Verify value is 1 (Active)"), - TestStep("5", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER for Water Temperature 61C Test Event.", - "Verify Command response is Success"), - TestStep("5a", "TH reads HeatDemand attribute.", - "Verify value is 0x00 (no demand on any source)"), - TestStep("5b", "TH reads BoostState attribute.", - "Verify value is 1 (Active)"), - TestStep("5c", "TH reads TankPercentage attribute.", - "Verify value is 100%"), - TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER for Draw off hot water Test Event.", - "Verify Command response is Success"), - TestStep("6a", "TH reads HeatDemand attribute.", - "Verify value is greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), - TestStep("6b", "TH reads BoostState attribute.", - "Verify value is 1 (Active)"), - TestStep("6c", "TH reads TankPercentage attribute.", - "Verify value is 75%"), - TestStep("7", "TH sends CancelBoost.", - "Verify Command response is Success"), - TestStep("7a", "TH reads HeatDemand attribute.", - "Verify value is 0x00 (no demand on any source)"), - TestStep("7b", "TH reads BoostState attribute.", - "Verify value is 0 (Inactive)"), - TestStep("7c", "TH reads TankPercentage attribute.", - "Verify value is 75%"), - TestStep("8", "TH sends Boost with Duration=600s,TargetPercentage=100%,TargetReheat=65%.", - "Verify Command response is Success"), - TestStep("8a", "TH reads HeatDemand attribute.", - "Verify value is greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), - TestStep("8b", "TH reads BoostState attribute.", - "Verify value is 1 (Active)"), - TestStep("8c", "TH reads TankPercentage attribute.", - "Verify value is 75%"), - TestStep("9", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER for Water Temperature 61C Test Event.", - "Verify Command response is Success"), - TestStep("9a", "TH reads HeatDemand attribute.", - "Verify value is 0x00 (no demand on any source)"), - TestStep("9b", "TH reads BoostState attribute.", - "Verify value is 1 (Active)"), - TestStep("9c", "TH reads TankPercentage attribute.", - "Verify value is 100%"), - TestStep("10", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER for Draw off hot water Test Event.", - "Verify Command response is Success"), - TestStep("10a", "TH reads HeatDemand attribute.", - "Verify value is 0x00 (no demand on any source)"), - TestStep("10b", "TH reads BoostState attribute.", - "Verify value is 1 (Active)"), - TestStep("10c", "TH reads TankPercentage attribute.", - "Verify value is 75%"), - TestStep("11", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER for Draw off hot water Test Event.", - "Verify Command response is Success"), - TestStep("11a", "TH reads HeatDemand attribute.", - "Verify value is greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), - TestStep("11b", "TH reads BoostState attribute.", - "Verify value is 1 (Active)"), - TestStep("11c", "TH reads TankPercentage attribute.", - "Verify value is 50%"), - TestStep("12", "TH sends CancelBoost.", - "Verify Command response is Success"), - TestStep("12a", "TH reads HeatDemand attribute.", - "Verify value is 0x00 (no demand on any source)"), - TestStep("12b", "TH reads BoostState attribute.", - "Verify value is 0 (Inactive)"), - TestStep("12c", "TH reads TankPercentage attribute.", - "Verify value is 50%"), - TestStep("13", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER_KEY and EventTrigger field set to PIXIT.EWATERHTR.TEST_EVENT_TRIGGER for Basic installation Test Event Clear.", - "Verify Command response is Success"), + TestStep("1", "Commission DUT to TH (can be skipped if done in a preceding test)"), + TestStep("2", "Set up a subscription to all WaterHeaterManagement cluster events"), + TestStep("3", "TH reads TestEventTriggersEnabled attribute from General Diagnostics Cluster", + "Value has to be 1 (True)"), + TestStep("4", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EWATERHTR.TESTEVENTTRIGGER for Basic installation Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("4a", "TH reads from the DUT the HeatDemand", + "Value has to be 0x00 (no demand on any source)"), + TestStep("4b", "TH reads from the DUT the BoostState", + "Value has to be 0 (Inactive)"), + TestStep("4c", "TH reads from the DUT the TankPercentage", + "Value has to be 0%"), + TestStep("4d", "TH reads from the DUT the HeaterTypes", + "Value has to be greater than 0x00 (at least one type supported) and Store the value as HeaterTypes"), + TestStep("5", "TH sends command Boost with Duration=600s,TargetPercentage=100%", + "Verify DUT responds w/ status SUCCESS(0x00) and Event EWATERHTR.S.E00(BoostStarted) sent with Duration=600 and TargetPercentage=100"), + TestStep("5a", "TH reads from the DUT the HeatDemand", + "Value has to be greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), + TestStep("5b", "TH reads from the DUT the BoostState", + "Value has to be 1 (Active)"), + TestStep("6", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EWATERHTR.TESTEVENTTRIGGER for Water Temperature 61C Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("6a", "TH reads from the DUT the HeatDemand", + "Value has to be 0x00 (no demand on any source)"), + TestStep("6b", "TH reads from the DUT the BoostState", + "Value has to be 1 (Active)"), + TestStep("6c", "TH reads from the DUT the TankPercentage", + "Value has to be 100%"), + TestStep("7", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EWATERHTR.TESTEVENTTRIGGER for Draw off hot water Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("7a", "TH reads from the DUT the HeatDemand", + "Value has to be greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), + TestStep("7b", "TH reads from the DUT the BoostState", + "Value has to be 1 (Active)"), + TestStep("7c", "TH reads from the DUT the TankPercentage", + "Value has to be 76%"), + TestStep("8", "TH sends command CancelBoost", + "Verify DUT responds w/ status SUCCESS(0x00) and Event EWATERHTR.S.E00(BoostEnded) sent"), + TestStep("8a", "TH reads from the DUT the HeatDemand", + "Value has to be 0x00 (no demand on any source)"), + TestStep("8b", "TH reads from the DUT the BoostState", + "Value has to be 0 (Inactive)"), + TestStep("8c", "TH reads from the DUT the TankPercentage", + "Value has to be 76%"), + TestStep("9", "TH sends command Boost with Duration=400s,TargetPercentage=100%,TargetReheat=65%", + "Verify DUT responds w/ status SUCCESS(0x00) and Event EWATERHTR.S.E00(BoostStarted) sent with Duration=400 and TargetPercentage=100 and TargetReheat=65"), + TestStep("9a", "TH reads from the DUT the HeatDemand", + "Value has to be greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), + TestStep("9b", "TH reads from the DUT the BoostState", + "Value has to be 1 (Active)"), + TestStep("9c", "TH reads from the DUT the TankPercentage", + "Value has to be 76%"), + TestStep("10", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EWATERHTR.TESTEVENTTRIGGER for Water Temperature 61C Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("10a", "TH reads from the DUT the HeatDemand", + "Value has to be 0x00 (no demand on any source)"), + TestStep("10b", "TH reads from the DUT the BoostState", + "Value has to be 1 (Active)"), + TestStep("10c", "TH reads from the DUT the TankPercentage", + "Value has to be 100%"), + TestStep("11", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EWATERHTR.TESTEVENTTRIGGER for Draw off hot water Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("11a", "TH reads from the DUT the HeatDemand", + "Value has to be 0x00 (no demand on any source)"), + TestStep("11b", "TH reads from the DUT the BoostState", + "Value has to be 1 (Active)"), + TestStep("11c", "TH reads from the DUT the TankPercentage", + "Value has to be 76%"), + TestStep("12", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EWATERHTR.TESTEVENTTRIGGER for Draw off hot water Test Event", + "Verify DUT responds w/ status SUCCESS(0x00)"), + TestStep("12a", "TH reads from the DUT the HeatDemand", + "Value has to be greater than 0x00 (demand on at least one source) and (HeaterDemand & (!HeaterTypes)) is zero (demand is only from declared supported types)"), + TestStep("12b", "TH reads from the DUT the BoostState", + "Value has to be 1 (Active)"), + TestStep("12c", "TH reads from the DUT the TankPercentage", + "Value has to be 57%"), + TestStep("13", "TH sends command CancelBoost", + "Verify DUT responds w/ status SUCCESS(0x00) and Event EWATERHTR.S.E00(BoostEnded) sent"), + TestStep("13a", "TH reads from the DUT the HeatDemand", + "Value has to be 0x00 (no demand on any source)"), + TestStep("13b", "TH reads from the DUT the BoostState", + "Value has to be 0 (Inactive)"), + TestStep("13c", "TH reads from the DUT the TankPercentage", + "Value has to be 57%"), + TestStep("14", "TH sends TestEventTrigger command to General Diagnostics Cluster on Endpoint 0 with EnableKey field set to PIXIT.EWATERHTR.TESTEVENT_TRIGGERKEY and EventTrigger field set to PIXIT.EWATERHTR.TESTEVENTTRIGGER for Basic installation Test Event Clear", + "Verify DUT responds w/ status SUCCESS(0x00)"), ] return steps @@ -146,102 +146,108 @@ async def test_TC_EWATERHTR_2_3(self): # Commission DUT - already done self.step("2") - await self.check_test_event_triggers_enabled() + # Subscribe to Events and when they are sent push them to a queue for checking later + events_callback = EventChangeCallback(Clusters.WaterHeaterManagement) + await events_callback.start(self.default_controller, + self.dut_node_id, + self.matter_test_config.endpoint) self.step("3") + await self.check_test_event_triggers_enabled() + + self.step("4") await self.send_test_event_trigger_basic_installation_test_event() - self.step("3a") + self.step("4a") await self.check_whm_attribute("HeatDemand", 0) - self.step("3b") + self.step("4b") await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kInactive) - self.step("3c") + self.step("4c") await self.check_whm_attribute("TankPercentage", 0) - self.step("3d") + self.step("4d") heaterTypes = await self.read_whm_attribute_expect_success(attribute="HeaterTypes") asserts.assert_greater(heaterTypes, 0) - self.step("4") + self.step("5") await self.send_boost_command(duration=600, target_percentage=100) - self.step("4a") - heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") - asserts.assert_greater(heatDemand, 0) - asserts.assert_equal(heatDemand & (~heaterTypes), 0, "heatDemand should only be from declared supported types"), - - self.step("4b") - await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kActive) - - self.step("5") - await self.send_test_event_trigger_water_temperature61C_test_event() + event_data = events_callback.wait_for_event_report(Clusters.WaterHeaterManagement.Events.BoostStarted) + asserts.assert_equal(event_data.boostInfo.duration, 600) + asserts.assert_equal(event_data.boostInfo.targetPercentage, 100) self.step("5a") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") - asserts.assert_equal(heatDemand, 0) + asserts.assert_greater(heatDemand, 0) + asserts.assert_equal(heatDemand & (~heaterTypes), 0, "heatDemand should only be from declared supported types"), self.step("5b") await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kActive) - self.step("5c") - await self.check_whm_attribute("TankPercentage", 100) - self.step("6") - await self.send_test_event_trigger_draw_off_hot_water_test_event() + await self.send_test_event_trigger_water_temperature61C_test_event() self.step("6a") heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") - asserts.assert_greater(heatDemand, 0) - asserts.assert_equal(heatDemand & (~heaterTypes), 0, "heatDemand should only be from declared supported types"), + asserts.assert_equal(heatDemand, 0) self.step("6b") await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kActive) self.step("6c") - await self.check_whm_attribute("TankPercentage", 75) + await self.check_whm_attribute("TankPercentage", 100) self.step("7") - await self.send_cancel_boost_command() + await self.send_test_event_trigger_draw_off_hot_water_test_event() self.step("7a") - await self.check_whm_attribute("HeatDemand", 0) + heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") + asserts.assert_greater(heatDemand, 0) + asserts.assert_equal(heatDemand & (~heaterTypes), 0, "heatDemand should only be from declared supported types"), self.step("7b") - await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kInactive) + await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kActive) self.step("7c") - await self.check_whm_attribute("TankPercentage", 75) + await self.check_whm_attribute("TankPercentage", 76) self.step("8") - await self.send_boost_command(duration=600, target_percentage=100, target_reheat=65) + await self.send_cancel_boost_command() + + event_data = events_callback.wait_for_event_report(Clusters.WaterHeaterManagement.Events.BoostEnded) self.step("8a") - heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") - asserts.assert_greater(heatDemand, 0) - asserts.assert_equal(heatDemand & (~heaterTypes), 0, "heatDemand should only be from declared supported types"), + await self.check_whm_attribute("HeatDemand", 0) self.step("8b") - await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kActive) + await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kInactive) self.step("8c") - await self.check_whm_attribute("TankPercentage", 75) + await self.check_whm_attribute("TankPercentage", 76) self.step("9") - await self.send_test_event_trigger_water_temperature61C_test_event() + await self.send_boost_command(duration=400, target_percentage=100, target_reheat=65) + + event_data = events_callback.wait_for_event_report(Clusters.WaterHeaterManagement.Events.BoostStarted) + asserts.assert_equal(event_data.boostInfo.duration, 400) + asserts.assert_equal(event_data.boostInfo.targetPercentage, 100) + asserts.assert_equal(event_data.boostInfo.targetReheat, 65) self.step("9a") - await self.check_whm_attribute("HeatDemand", 0) + heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") + asserts.assert_greater(heatDemand, 0) + asserts.assert_equal(heatDemand & (~heaterTypes), 0, "heatDemand should only be from declared supported types"), self.step("9b") await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kActive) self.step("9c") - await self.check_whm_attribute("TankPercentage", 100) + await self.check_whm_attribute("TankPercentage", 76) self.step("10") - await self.send_test_event_trigger_draw_off_hot_water_test_event() + await self.send_test_event_trigger_water_temperature61C_test_event() self.step("10a") await self.check_whm_attribute("HeatDemand", 0) @@ -250,35 +256,49 @@ async def test_TC_EWATERHTR_2_3(self): await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kActive) self.step("10c") - await self.check_whm_attribute("TankPercentage", 75) + await self.check_whm_attribute("TankPercentage", 100) self.step("11") await self.send_test_event_trigger_draw_off_hot_water_test_event() self.step("11a") - heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") - asserts.assert_greater(heatDemand, 0) - asserts.assert_equal(heatDemand & (~heaterTypes), 0, "heatDemand should only be from declared supported types"), + await self.check_whm_attribute("HeatDemand", 0) self.step("11b") await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kActive) self.step("11c") - await self.check_whm_attribute("TankPercentage", 50) + await self.check_whm_attribute("TankPercentage", 76) self.step("12") - await self.send_cancel_boost_command() + await self.send_test_event_trigger_draw_off_hot_water_test_event() self.step("12a") - await self.check_whm_attribute("HeatDemand", 0) + heatDemand = await self.read_whm_attribute_expect_success(attribute="HeatDemand") + asserts.assert_greater(heatDemand, 0) + asserts.assert_equal(heatDemand & (~heaterTypes), 0, "heatDemand should only be from declared supported types"), self.step("12b") - await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kInactive) + await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kActive) self.step("12c") - await self.check_whm_attribute("TankPercentage", 50) + await self.check_whm_attribute("TankPercentage", 57) self.step("13") + await self.send_cancel_boost_command() + + event_data = events_callback.wait_for_event_report(Clusters.WaterHeaterManagement.Events.BoostEnded) + + self.step("13a") + await self.check_whm_attribute("HeatDemand", 0) + + self.step("13b") + await self.check_whm_attribute("BoostState", Clusters.WaterHeaterManagement.Enums.BoostStateEnum.kInactive) + + self.step("13c") + await self.check_whm_attribute("TankPercentage", 57) + + self.step("14") await self.send_test_event_trigger_basic_installation_test_event_clear() diff --git a/src/python_testing/TC_ICDM_2_1.py b/src/python_testing/TC_ICDM_2_1.py index 63b27c64d6d8fa..25b7897abaaf47 100644 --- a/src/python_testing/TC_ICDM_2_1.py +++ b/src/python_testing/TC_ICDM_2_1.py @@ -96,7 +96,8 @@ def desc_TC_ICDM_2_1(self) -> str: def steps_TC_ICDM_2_1(self) -> list[TestStep]: steps = [ - TestStep(1, "Commissioning, already done", is_commissioning=True), + TestStep("1a", "Commissioning, already done", is_commissioning=True), + TestStep("1b", "CTH reads from the DUT the FeatureMap attribute."), TestStep(2, "TH reads from the DUT the ActiveModeThreshold attribute."), TestStep(3, "TH reads from the DUT the ActiveModeDuration attribute."), TestStep(4, "TH reads from the DUT the IdleModeDuration attribute."), @@ -131,8 +132,9 @@ async def test_TC_ICDM_2_1(self): attributes = cluster.Attributes # Commissioning - self.step(1) + self.step("1a") # Read feature map + self.step("1b") featureMap = await self._read_icdm_attribute_expect_success( attributes.FeatureMap) diff --git a/src/python_testing/TC_ICDM_3_1.py b/src/python_testing/TC_ICDM_3_1.py index f20e2816723a28..f6f094698ca25c 100644 --- a/src/python_testing/TC_ICDM_3_1.py +++ b/src/python_testing/TC_ICDM_3_1.py @@ -85,7 +85,7 @@ def steps_TC_ICDM_3_1(self) -> list[TestStep]: TestStep(7, "TTH sends UnregisterClient command with the CheckInNodeID from Step 6."), TestStep(8, "TH sends UnregisterClient command with the CheckInNodeID from Step 2."), TestStep(9, "TH reads from the DUT the RegisteredClients attribute."), - TestStep(10, "Repeat Step 9 with the rest of CheckInNodeIDs from the list of RegisteredClients from Step 4, if any."), + TestStep(10, "Repeat Step 8-9 with the rest of CheckInNodeIDs from the list of RegisteredClients from Step 4, if any."), TestStep(11, "TH reads from the DUT the RegisteredClients attribute."), TestStep(12, "TH sends UnregisterClient command with the CheckInNodeID from Step 2."), ] @@ -240,6 +240,11 @@ async def test_TC_ICDM_3_1(self): e.status, Status.Success, "Unexpected error returned") pass + registeredClients = await self._read_icdm_attribute_expect_success(attributes.RegisteredClients) + for remainingClient in registeredClients: + asserts.assert_not_equal(remainingClient.checkInNodeID, client["checkInNodeID"], + "CheckInNodeID was unregistered. It should not be present in the attribute list.") + self.step(11) registeredClients = await self._read_icdm_attribute_expect_success( attributes.RegisteredClients) diff --git a/src/python_testing/TC_ICDM_3_4.py b/src/python_testing/TC_ICDM_3_4.py index b062da0845e4ea..b8d0693acb7d75 100644 --- a/src/python_testing/TC_ICDM_3_4.py +++ b/src/python_testing/TC_ICDM_3_4.py @@ -63,7 +63,7 @@ def steps_TC_ICDM_3_4(self) -> list[TestStep]: steps = [ TestStep(0, "Commissioning, already done", is_commissioning=True), TestStep(1, "TH reads from the DUT the ICDCounter attribute."), - TestStep("2a", "Reboot DUT."), + TestStep("2a", "Power cycle DUT."), TestStep("2b", "TH waits for {PIXIT.WAITTIME.REBOOT}"), TestStep(3, "Verify that the DUT response contains value of ICDCounter and stores in IcdCounter2. \ IcdCounter2 is greater or equal to IcdCounter1. \ diff --git a/src/python_testing/TC_ICDM_5_1.py b/src/python_testing/TC_ICDM_5_1.py new file mode 100644 index 00000000000000..f9c081b6fe56ce --- /dev/null +++ b/src/python_testing/TC_ICDM_5_1.py @@ -0,0 +1,197 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments +# for details about the block below. +# +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 +# test-runner-run/run1/app: ${LIT_ICD_APP} +# test-runner-run/run1/factoryreset: True +# test-runner-run/run1/quiet: True +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# === END CI TEST ARGUMENTS === + +import logging +from dataclasses import dataclass + +import chip.clusters as Clusters +from chip.interaction_model import InteractionModelError, Status +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main +from mdns_discovery import mdns_discovery +from mobly import asserts + +Cluster = Clusters.Objects.IcdManagement +Commands = Cluster.Commands +Attributes = Cluster.Attributes +OperatingModeEnum = Cluster.Enums.OperatingModeEnum +ClientTypeEnum = Cluster.Enums.ClientTypeEnum + + +@dataclass +class Client: + checkInNodeID: int + subjectId: int + key: bytes + clientType: ClientTypeEnum + + +logger = logging.getLogger(__name__) +kRootEndpointId = 0 + +client1 = Client( + checkInNodeID=1, + subjectId=1, + key=bytes([x for x in range(0x10, 0x20)]), + clientType=ClientTypeEnum.kEphemeral +) + + +class TC_ICDM_5_1(MatterBaseTest): + + # + # Class Helper functions + # + + async def _read_icdm_attribute_expect_success(self, attribute) -> OperatingModeEnum: + return await self.read_single_attribute_check_success(endpoint=kRootEndpointId, cluster=Cluster, attribute=attribute) + + async def _send_single_icdm_command(self, command): + return await self.send_single_cmd(command, endpoint=kRootEndpointId) + + async def _get_icd_txt_record(self) -> OperatingModeEnum: + discovery = mdns_discovery.MdnsDiscovery(verbose_logging=True) + service = await discovery.get_operational_service( + node_id=self.dut_node_id, + compressed_fabric_id=self.default_controller.GetCompressedFabricId(), + log_output=True, discovery_timeout_sec=240) + + asserts.assert_is_not_none( + service, f"Failed to get operational node service information for {self.dut_node_id} on {self.default_controller.GetCompressedFabricId()}") + + icdTxtRecord = OperatingModeEnum(int(service.txt_record['ICD'])) + if icdTxtRecord.value != int(service.txt_record['ICD']): + raise AttributeError(f'Not a known ICD type: {service.txt_record["ICD"]}') + + return icdTxtRecord + + # + # Test Harness Helpers + # + + def desc_TC_ICDM_5_1(self) -> str: + """Returns a description of this test""" + return "[TC-ICDM-5.1] Operating Mode with DUT as Server" + + def steps_TC_ICDM_5_1(self) -> list[TestStep]: + steps = [ + TestStep(0, "Commissioning, already done", is_commissioning=True), + TestStep(1, "TH reads from the DUT the RegisteredClients attribute"), + TestStep("2a", "TH reads from the DUT the OperatingMode attribute."), + TestStep("2b", "Verify that the ICD DNS-SD TXT key is present."), + TestStep("3a", "TH sends RegisterClient command."), + TestStep("3b", "TH reads from the DUT the OperatingMode attribute."), + TestStep("3c", "Verify that mDNS is advertising ICD key."), + TestStep(4, "TH sends UnregisterClient command with CheckInNodeID1."), + TestStep("5a", "TH reads from the DUT the OperatingMode attribute."), + TestStep("5b", "Verify that the ICD DNS-SD TXT key is present."), + ] + return steps + + def pics_TC_ICDM_5_1(self) -> list[str]: + """ This function returns a list of PICS for this test case that must be True for the test to be run""" + pics = [ + "ICDM.S", + "ICDM.S.F02", + ] + return pics + + # + # ICDM 5.1 Test Body + # + + @async_test_body + async def test_TC_ICDM_5_1(self): + + # Commissioning + self.step(0) + + try: + self.step(1) + registeredClients = await self._read_icdm_attribute_expect_success( + Attributes.RegisteredClients) + + for client in registeredClients: + try: + await self._send_single_icdm_command(Commands.UnregisterClient(checkInNodeID=client.checkInNodeID)) + except InteractionModelError as e: + asserts.assert_equal( + e.status, Status.Success, "Unexpected error returned") + + self.step("2a") + operatingMode = await self._read_icdm_attribute_expect_success(Attributes.OperatingMode) + asserts.assert_equal(operatingMode, OperatingModeEnum.kSit) + + self.step("2b") + icdTxtRecord = await self._get_icd_txt_record() + asserts.assert_equal(icdTxtRecord, OperatingModeEnum.kSit, "OperatingMode Is not in SIT mode.") + + self.step("3a") + try: + await self._send_single_icdm_command(Commands.RegisterClient(checkInNodeID=client1.checkInNodeID, monitoredSubject=client1.subjectId, key=client1.key, clientType=client1.clientType)) + except InteractionModelError as e: + asserts.assert_equal( + e.status, Status.Success, "Unexpected error returned") + + self.step("3b") + operatingMode = await self._read_icdm_attribute_expect_success(Attributes.OperatingMode) + asserts.assert_equal(operatingMode, OperatingModeEnum.kLit) + + self.step("3c") + icdTxtRecord = await self._get_icd_txt_record() + asserts.assert_equal(icdTxtRecord, OperatingModeEnum.kLit, "OperatingMode Is not in Lit mode.") + + self.step(4) + try: + await self._send_single_icdm_command(Commands.UnregisterClient(checkInNodeID=client1.checkInNodeID)) + except InteractionModelError as e: + asserts.assert_equal( + e.status, Status.Success, "Unexpected error returned") + + self.step("5a") + operatingMode = await self._read_icdm_attribute_expect_success(Attributes.OperatingMode) + asserts.assert_equal(operatingMode, OperatingModeEnum.kSit) + + self.step("5b") + icdTxtRecord = await self._get_icd_txt_record() + asserts.assert_equal(icdTxtRecord, OperatingModeEnum.kSit, "OperatingMode Is not in SIT mode.") + + finally: + registeredClients = await self._read_icdm_attribute_expect_success( + Attributes.RegisteredClients) + + for client in registeredClients: + try: + await self._send_single_icdm_command(Commands.UnregisterClient(checkInNodeID=client.checkInNodeID)) + except InteractionModelError as e: + asserts.assert_equal( + e.status, Status.Success, "Unexpected error returned") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_LVL_2_3.py b/src/python_testing/TC_LVL_2_3.py index f3fac953b4d715..dcb2e8d65df168 100644 --- a/src/python_testing/TC_LVL_2_3.py +++ b/src/python_testing/TC_LVL_2_3.py @@ -24,7 +24,7 @@ # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True # test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === import logging @@ -33,7 +33,7 @@ import chip.clusters as Clusters import test_plan_support from matter_testing_support import (ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, default_matter_test_main, - has_cluster, per_endpoint_test) + has_cluster, run_if_endpoint_matches) from mobly import asserts @@ -43,11 +43,11 @@ def steps_TC_LVL_2_3(self) -> list[TestStep]: THRead = "TH reads" THcommand = "TH sends the command" return [TestStep(1, test_plan_support.commission_if_required(), is_commissioning=True), - TestStep(2, f"{THRead} FeatureMap attribute and the AttributeList value"), + TestStep(2, f"{THRead} FeatureMap attribute and the AttributeList value", test_plan_support.verify_success()), TestStep( "3a", f"If the MaxLevel attribute is in the AttributeList, {THRead} MaxLevel attribute and store value as maxLevel, otherwise set maxLevel to 254", test_plan_support.verify_success()), TestStep( - "3b", f"If the MinLevel attribute is in the AttributeList, {THRead} MinLevel attribute and store value as minLevel, otherwise set minLevel to 1", test_plan_support.verify_success()), + "3b", f"If the MinLevel attribute is in the AttributeList, {THRead} MinLevel attribute and store value as minLevel, otherwise set minLevel to 0 if LT is not supported or 1 if LT is supported", test_plan_support.verify_success()), TestStep(4, f"{THcommand} MoveWithOnOff with MoveMode field set to Down and rate set to 254 and remaining fields set to 0", test_plan_support.verify_success()), TestStep(5, f"{THRead} CurrentLevel attribute and store value as startCurrentLevel", @@ -57,8 +57,8 @@ def steps_TC_LVL_2_3(self) -> list[TestStep]: TestStep(7, f"{THcommand} MoveToLevelWithOnOff with Level field set to maxLevel, TransitionTime field set to 100 (10s) and remaining fields set to 0", test_plan_support.verify_success()), TestStep(8, "TH stores the reported values of CurrentLevel in all incoming reports for CurrentLevel attribute, that contains data in reportedCurrentLevelValuesList, over a period of 30 seconds."), - TestStep(9, "TH verifies that reportedCurrentLevelValuesList does not contain more than 10 entries for CurrentLevel", - "reportedCurrentLevelValuesList has 10 or less entries in the list"), + TestStep(9, "TH verifies that reportedCurrentLevelValuesList does not contain more than 12 entries for CurrentLevel", + "reportedCurrentLevelValuesList has 12 or fewer entries in the list"), TestStep(10, "If reportedCurrentLevelValuesList only contain a single entry, TH verifies the value of the entry is equal to maxLevel", "The entry in reportedCurrentLevelValuesList is equal to maxLevel"), TestStep(11, "If reportedCurrentLevelValuesList contains two or more entries, TH verifies the value of the first entry is larger than startCurrentLevel", @@ -77,14 +77,14 @@ def steps_TC_LVL_2_3(self) -> list[TestStep]: TestStep(20, "TH verifies reportedRemainingTimeValuesList contains three entries", "reportedRemainingTimeValuesList has 3 entries in the list"), TestStep(21, "TH verifies the first entry in reportedRemainingTimeValuesList is approximately 100 (10s)", - "The first entry in reportedRemainingTimeValuesList is approximately equal to 100"), + "The first entry in reportedRemainingTimeValuesList is in the range 95 - 100"), TestStep(22, "TH verifies the second entry in reportedRemainingTimeValuesList is approximately 150", - "The second entry in reportedRemainingTimeValuesList is approximately equal to 150"), + "The second entry in reportedRemainingTimeValuesList is in the range 145 - 150"), TestStep(23, "TH verifies the third entry in reportedRemainingTimeValuesList is 0", "The third entry in reportedRemainingTimeValuesList is equal to 0") ] - @per_endpoint_test(has_cluster(Clusters.LevelControl)) + @run_if_endpoint_matches(has_cluster(Clusters.LevelControl)) async def test_TC_LVL_2_3(self): # Commissioning - already done self.step(1) @@ -96,8 +96,6 @@ async def test_TC_LVL_2_3(self): attributes = await self.read_single_attribute_check_success(cluster=lvl, attribute=lvl.Attributes.AttributeList) self.step("3a") - attributes = await self.read_single_attribute_check_success(cluster=lvl, attribute=lvl.Attributes.AttributeList) - if lvl.Attributes.MaxLevel.attribute_id in attributes: max_level = await self.read_single_attribute_check_success(cluster=lvl, attribute=lvl.Attributes.MaxLevel) else: @@ -107,7 +105,10 @@ async def test_TC_LVL_2_3(self): if lvl.Attributes.MinLevel.attribute_id in attributes: min_level = await self.read_single_attribute_check_success(cluster=lvl, attribute=lvl.Attributes.MinLevel) else: - min_level = 1 + if (lvl.Bitmaps.Feature.kLighting & feature_map) == 0: + min_level = 0 + else: + min_level = 1 self.step(4) cmd = Clusters.LevelControl.Commands.MoveToLevelWithOnOff(level=min_level, transitionTime=0) @@ -133,7 +134,7 @@ async def test_TC_LVL_2_3(self): self.step(9) count = sub_handler.attribute_report_counts[lvl.Attributes.CurrentLevel] - asserts.assert_less_equal(count, 10, "Received more than 10 reports for CurrentLevel") + asserts.assert_less_equal(count, 12, "Received more than 12 reports for CurrentLevel") asserts.assert_greater(count, 0, "Did not receive any reports for CurrentLevel") self.step(10) @@ -189,9 +190,11 @@ async def test_TC_LVL_2_3(self): self.step(21) remaining_time = sub_handler.attribute_reports[lvl.Attributes.RemainingTime] logging.info(f'Reamining time reports: {remaining_time}') + asserts.assert_less_equal(remaining_time[0].value, 100, "Unexpected first RemainingTime report") asserts.assert_almost_equal(remaining_time[0].value, 100, delta=10, msg="Unexpected first RemainingTime report") self.step(22) + asserts.assert_less_equal(remaining_time[1].value, 150, "Unexpected second RemainingTime report") asserts.assert_almost_equal(remaining_time[1].value, 150, delta=10, msg="Unexpected second RemainingTime report") self.step(23) diff --git a/src/python_testing/TC_MCORE_FS_1_1.py b/src/python_testing/TC_MCORE_FS_1_1.py index f64b718e96f2e8..e56a1fb8246b56 100755 --- a/src/python_testing/TC_MCORE_FS_1_1.py +++ b/src/python_testing/TC_MCORE_FS_1_1.py @@ -45,11 +45,14 @@ async def setup_class(self): self.port = 5543 discriminator = random.randint(0, 4095) passcode = 20202021 - app_args = f'--secured-device-port {self.port} --discriminator {discriminator} --passcode {passcode} --KVS {self.kvs}' - cmd = f'{app} {app_args}' + cmd = [app] + cmd.extend(['--secured-device-port', str(5543)]) + cmd.extend(['--discriminator', str(discriminator)]) + cmd.extend(['--passcode', str(passcode)]) + cmd.extend(['--KVS', self.kvs]) # TODO: Determine if we want these logs cooked or pushed to somewhere else logging.info("Starting application to acts mock a server portion of TH_FSA") - self.app_process = subprocess.Popen(cmd, bufsize=0, shell=True) + self.app_process = subprocess.Popen(cmd) logging.info("Started application to acts mock a server portion of TH_FSA") time.sleep(3) @@ -84,6 +87,12 @@ def steps_TC_MCORE_FS_1_1(self) -> list[TestStep]: TestStep("3c", "DUT_FSA commissions TH_FSA")] return steps + # This test has some manual steps and one sleep for up to 30 seconds. Test typically + # runs under 1 mins, so 3 minutes is more than enough. + @property + def default_timeout(self) -> int: + return 3*60 + @async_test_body async def test_TC_MCORE_FS_1_1(self): self.is_ci = self.check_pics('PICS_SDK_CI_ONLY') diff --git a/src/python_testing/TC_MCORE_FS_1_2.py b/src/python_testing/TC_MCORE_FS_1_2.py index c199225b33f99c..816abe5d876b00 100644 --- a/src/python_testing/TC_MCORE_FS_1_2.py +++ b/src/python_testing/TC_MCORE_FS_1_2.py @@ -117,9 +117,11 @@ def steps_TC_MCORE_FS_1_2(self) -> list[TestStep]: TestStep(7, "TH reads all attributes in the Bridged Device Basic Information cluster on new endpoint identified in step 3 from the DUT_FSA")] return steps + # This test has some manual steps, so we need a longer timeout. Test typically runs under 1 mins so 3 mins should + # be enough time for test to run @property def default_timeout(self) -> int: - return self.user_params.get("report_waiting_timeout_delay_sec", 10)*2 + 60 + return 3*60 @async_test_body async def test_TC_MCORE_FS_1_2(self): diff --git a/src/python_testing/TC_MCORE_FS_1_3.py b/src/python_testing/TC_MCORE_FS_1_3.py index e707b500a6fba8..1a18896c055952 100644 --- a/src/python_testing/TC_MCORE_FS_1_3.py +++ b/src/python_testing/TC_MCORE_FS_1_3.py @@ -15,15 +15,31 @@ # limitations under the License. # -# This test requires a TH_SERVER application that returns UnsupportedAttribute when reading UniqueID from BasicInformation Cluster. Please specify with --string-arg th_server_app_path: +# This test requires a TH_SERVER_NO_UID application that returns UnsupportedAttribute +# when reading UniqueID from BasicInformation Cluster. Please specify the app +# location with --string-arg th_server_no_uid_app_path: +# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments +# for details about the block below. +# +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 +# test-runner-run/run1/app: examples/fabric-admin/scripts/fabric-sync-app.py +# test-runner-run/run1/app-args: --app-admin=${FABRIC_ADMIN_APP} --app-bridge=${FABRIC_BRIDGE_APP} --stdin-pipe=dut-fsa-stdin --discriminator=1234 +# test-runner-run/run1/factoryreset: True +# test-runner-run/run1/script-args: --PICS src/app/tests/suites/certification/ci-pics-values --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --string-arg th_server_no_uid_app_path:${LIGHTING_APP_NO_UNIQUE_ID} +# test-runner-run/run1/script-start-delay: 5 +# test-runner-run/run1/quiet: false +# === END CI TEST ARGUMENTS === + +import asyncio import logging import os import random -import signal import subprocess -import time -import uuid +import sys +import tempfile +import threading import chip.clusters as Clusters from chip import ChipDeviceCtrl @@ -32,131 +48,224 @@ from mobly import asserts +# TODO: Make this class more generic. Issue #35348 +class Subprocess(threading.Thread): + + def __init__(self, args: list = [], tag="", **kw): + super().__init__(**kw) + self.tag = f"[{tag}] " if tag else "" + self.args = args + + def forward_f(self, f_in, f_out): + while True: + line = f_in.readline() + if not line: + break + f_out.write(f"{self.tag}{line}") + f_out.flush() + + def run(self): + logging.info("RUN: %s", " ".join(self.args)) + self.p = subprocess.Popen(self.args, errors="ignore", stdin=subprocess.PIPE, + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Forward stdout and stderr with a tag attached. + t1 = threading.Thread(target=self.forward_f, args=[self.p.stdout, sys.stdout]) + t1.start() + t2 = threading.Thread(target=self.forward_f, args=[self.p.stderr, sys.stderr]) + t2.start() + # Wait for the process to finish. + self.p.wait() + t1.join() + t2.join() + + def stop(self): + self.p.terminate() + self.join() + + +class AppServer: + + def __init__(self, app, storage_dir, port=None, discriminator=None, passcode=None): + + args = [app] + args.extend(["--KVS", tempfile.mkstemp(dir=storage_dir, prefix="kvs-app-")[1]]) + args.extend(['--secured-device-port', str(port)]) + args.extend(["--discriminator", str(discriminator)]) + args.extend(["--passcode", str(passcode)]) + self.app = Subprocess(args, tag="SERVER") + self.app.start() + + def stop(self): + self.app.stop() + + class TC_MCORE_FS_1_3(MatterBaseTest): - @async_test_body - async def setup_class(self): + + @property + def default_timeout(self) -> int: + # This test has some manual steps, so we need a longer timeout. + return 200 + + def setup_class(self): super().setup_class() - self.device_for_th_eco_nodeid = 1111 - self.device_for_th_eco_kvs = None - self.device_for_th_eco_port = 5543 - self.app_process_for_th_eco = None - - self.device_for_dut_eco_nodeid = 1112 - self.device_for_dut_eco_kvs = None - self.device_for_dut_eco_port = 5544 - self.app_process_for_dut_eco = None - - # Create a second controller on a new fabric to communicate to the server - new_certificate_authority = self.certificate_authority_manager.NewCertificateAuthority() - new_fabric_admin = new_certificate_authority.NewFabricAdmin(vendorId=0xFFF1, fabricId=2) - paa_path = str(self.matter_test_config.paa_trust_store_path) - self.TH_server_controller = new_fabric_admin.NewController(nodeId=112233, paaTrustStorePath=paa_path) + + self.th_server = None + self.storage = None + + # Get the path to the TH_SERVER_NO_UID app from the user params. + th_server_app = self.user_params.get("th_server_no_uid_app_path", None) + if not th_server_app: + asserts.fail("This test requires a TH_SERVER_NO_UID app. Specify app path with --string-arg th_server_no_uid_app_path:") + if not os.path.exists(th_server_app): + asserts.fail(f"The path {th_server_app} does not exist") + + # Create a temporary storage directory for keeping KVS files. + self.storage = tempfile.TemporaryDirectory(prefix=self.__class__.__name__) + logging.info("Temporary storage directory: %s", self.storage.name) + + self.th_server_port = 5544 + self.th_server_discriminator = random.randint(0, 4095) + self.th_server_passcode = 20202021 + + # Start the TH_SERVER_NO_UID app. + self.th_server = AppServer( + th_server_app, + storage_dir=self.storage.name, + port=self.th_server_port, + discriminator=self.th_server_discriminator, + passcode=self.th_server_passcode) def teardown_class(self): - if self.app_process_for_dut_eco is not None: - logging.warning("Stopping app with SIGTERM") - self.app_process_for_dut_eco.send_signal(signal.SIGTERM.value) - self.app_process_for_dut_eco.wait() - if self.app_process_for_th_eco is not None: - logging.warning("Stopping app with SIGTERM") - self.app_process_for_th_eco.send_signal(signal.SIGTERM.value) - self.app_process_for_th_eco.wait() - - os.remove(self.device_for_dut_eco_kvs) - if self.device_for_th_eco_kvs is not None: - os.remove(self.device_for_th_eco_kvs) + if self.th_server is not None: + self.th_server.stop() + if self.storage is not None: + self.storage.cleanup() super().teardown_class() - async def create_device_and_commission_to_th_fabric(self, kvs, port, node_id_for_th, device_info): - app = self.user_params.get("th_server_app_path", None) - if not app: - asserts.fail('This test requires a TH_SERVER app. Specify app path with --string-arg th_server_app_path:') + def steps_TC_MCORE_FS_1_3(self) -> list[TestStep]: + return [ + TestStep(0, "Commission DUT if not done", is_commissioning=True), + TestStep(1, "TH commissions TH_SERVER_NO_UID to TH's fabric"), + TestStep(2, "DUT_FSA commissions TH_SERVER_NO_UID to DUT_FSA's fabric and generates a UniqueID.", + "TH verifies a value is visible for the UniqueID from the DUT_FSA's Bridged Device Basic Information Cluster."), + ] - if not os.path.exists(app): - asserts.fail(f'The path {app} does not exist') + async def commission_via_commissioner_control(self, controller_node_id: int, device_node_id: int): + """Commission device_node_id to controller_node_id using CommissionerControl cluster.""" - discriminator = random.randint(0, 4095) - passcode = 20202021 + request_id = random.randint(0, 0xFFFFFFFFFFFFFFFF) - cmd = [app] - cmd.extend(['--secured-device-port', str(port)]) - cmd.extend(['--discriminator', str(discriminator)]) - cmd.extend(['--passcode', str(passcode)]) - cmd.extend(['--KVS', kvs]) + vendor_id = await self.read_single_attribute_check_success( + node_id=device_node_id, + cluster=Clusters.BasicInformation, + attribute=Clusters.BasicInformation.Attributes.VendorID, + ) - # TODO: Determine if we want these logs cooked or pushed to somewhere else - logging.info(f"Starting TH device for {device_info}") - self.app_process_for_dut_eco = subprocess.Popen(cmd) - logging.info(f"Started TH device for {device_info}") - time.sleep(3) + product_id = await self.read_single_attribute_check_success( + node_id=device_node_id, + cluster=Clusters.BasicInformation, + attribute=Clusters.BasicInformation.Attributes.ProductID, + ) - logging.info("Commissioning from separate fabric") - await self.TH_server_controller.CommissionOnNetwork(nodeId=node_id_for_th, setupPinCode=passcode, filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, filter=discriminator) - logging.info("Commissioning device for DUT ecosystem onto TH for managing") + await self.send_single_cmd( + node_id=controller_node_id, + cmd=Clusters.CommissionerControl.Commands.RequestCommissioningApproval( + requestId=request_id, + vendorId=vendor_id, + productId=product_id, + ), + ) - def steps_TC_MCORE_FS_1_3(self) -> list[TestStep]: - steps = [TestStep(1, "DUT_FSA commissions TH_SED_DUT to DUT_FSAs fabric and generates a UniqueID", is_commissioning=True), - TestStep(2, "TH_FSA commissions TH_SED_TH onto TH_FSAs fabric and generates a UniqueID."), - TestStep(3, "Follow manufacturer provided instructions to enable DUT_FSA to synchronize TH_SED_TH onto DUT_FSAs fabric."), - TestStep(4, "DUT_FSA synchronizes TH_SED_TH onto DUT_FSAs fabric and copies the UniqueID presented by TH_FSAs Bridged Device Basic Information Cluster.")] - return steps + if not self.is_ci: + self.wait_for_user_input("Approve Commissioning Approval Request on DUT using manufacturer specified mechanism") + + resp = await self.send_single_cmd( + node_id=controller_node_id, + cmd=Clusters.CommissionerControl.Commands.CommissionNode( + requestId=request_id, + responseTimeoutSeconds=30, + ), + ) + + asserts.assert_equal(type(resp), Clusters.CommissionerControl.Commands.ReverseOpenCommissioningWindow, + "Incorrect response type") + + await self.send_single_cmd( + node_id=device_node_id, + cmd=Clusters.AdministratorCommissioning.Commands.OpenCommissioningWindow( + commissioningTimeout=3*60, + PAKEPasscodeVerifier=resp.PAKEPasscodeVerifier, + discriminator=resp.discriminator, + iterations=resp.iterations, + salt=resp.salt, + ), + timedRequestTimeoutMs=5000, + ) @async_test_body async def test_TC_MCORE_FS_1_3(self): self.is_ci = self.check_pics('PICS_SDK_CI_ONLY') - self.print_step(0, "Commissioning DUT to TH, already done") + + # Commissioning - done + self.step(0) + self.step(1) - # These steps are not explicitly in step 1, but they help identify the dynamically added endpoint in step 1. - root_node_endpoint = 0 - root_part_list = await self.read_single_attribute_check_success(cluster=Clusters.Descriptor, attribute=Clusters.Descriptor.Attributes.PartsList, endpoint=root_node_endpoint) - set_of_endpoints_before_adding_device = set(root_part_list) - - kvs = f'kvs_{str(uuid.uuid4())}' - device_info = "for DUT ecosystem" - await self.create_device_and_commission_to_th_fabric(kvs, self.device_for_dut_eco_port, self.device_for_dut_eco_nodeid, device_info) - - self.device_for_dut_eco_kvs = kvs - read_result = await self.TH_server_controller.ReadAttribute(self.device_for_dut_eco_nodeid, [(root_node_endpoint, Clusters.BasicInformation.Attributes.UniqueID)]) - result = read_result[root_node_endpoint][Clusters.BasicInformation][Clusters.BasicInformation.Attributes.UniqueID] - asserts.assert_true(type_matches(result, Clusters.Attribute.ValueDecodeFailure), "We were expecting a value decode failure") - asserts.assert_equal(result.Reason.status, Status.UnsupportedAttribute, "Incorrect error returned from reading UniqueID") - - params = await self.openCommissioningWindow(dev_ctrl=self.TH_server_controller, node_id=self.device_for_dut_eco_nodeid) - - self.wait_for_user_input( - prompt_msg=f"Using the DUT vendor's provided interface, commission the device using the following parameters:\n" - f"- discriminator: {params.randomDiscriminator}\n" - f"- setupPinCode: {params.commissioningParameters.setupPinCode}\n" - f"- setupQRCode: {params.commissioningParameters.setupQRCode}\n" - f"- setupManualcode: {params.commissioningParameters.setupManualCode}\n" - f"If using FabricSync Admin, you may type:\n" - f">>> pairing onnetwork {params.commissioningParameters.setupPinCode}") - - root_part_list = await self.read_single_attribute_check_success(cluster=Clusters.Descriptor, attribute=Clusters.Descriptor.Attributes.PartsList, endpoint=root_node_endpoint) - set_of_endpoints_after_adding_device = set(root_part_list) - - asserts.assert_true(set_of_endpoints_after_adding_device.issuperset( - set_of_endpoints_before_adding_device), "Expected only new endpoints to be added") - unique_endpoints_set = set_of_endpoints_after_adding_device - set_of_endpoints_before_adding_device - asserts.assert_equal(len(unique_endpoints_set), 1, "Expected only one new endpoint") - newly_added_endpoint = list(unique_endpoints_set)[0] - - th_sed_dut_unique_id = await self.read_single_attribute_check_success(cluster=Clusters.BridgedDeviceBasicInformation, attribute=Clusters.BridgedDeviceBasicInformation.Attributes.UniqueID, endpoint=newly_added_endpoint) - asserts.assert_true(type_matches(th_sed_dut_unique_id, str), "UniqueID should be a string") - asserts.assert_true(th_sed_dut_unique_id, "UniqueID should not be an empty string") + + th_server_th_node_id = 1 + await self.default_controller.CommissionOnNetwork( + nodeId=th_server_th_node_id, + setupPinCode=self.th_server_passcode, + filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, + filter=self.th_server_discriminator, + ) + + await self.read_single_attribute_expect_error( + cluster=Clusters.BasicInformation, + attribute=Clusters.BasicInformation.Attributes.UniqueID, + node_id=th_server_th_node_id, + error=Status.UnsupportedAttribute, + ) self.step(2) - kvs = f'kvs_{str(uuid.uuid4())}' - device_info = "for TH_FSA ecosystem" - await self.create_device_and_commission_to_th_fabric(kvs, self.device_for_th_eco_port, self.device_for_th_eco_nodeid, device_info) - self.device_for_th_eco_kvs = kvs - # TODO(https://github.com/CHIP-Specifications/chip-test-plans/issues/4375) During setup we need to create the TH_FSA device - # where we would commission device created in create_device_and_commission_to_th_fabric to be commissioned into TH_FSA. - - # TODO(https://github.com/CHIP-Specifications/chip-test-plans/issues/4375) Because we cannot create a TH_FSA and there is - # no way to mock it the following 2 test steps are skipped for now. - self.skip_step(3) - self.skip_step(4) + + # Get the list of endpoints on the DUT_FSA_BRIDGE before adding the TH_SERVER_NO_UID. + dut_fsa_bridge_endpoints = set(await self.read_single_attribute_check_success( + cluster=Clusters.Descriptor, + attribute=Clusters.Descriptor.Attributes.PartsList, + node_id=self.dut_node_id, + endpoint=0, + )) + + await self.commission_via_commissioner_control( + controller_node_id=self.dut_node_id, + device_node_id=th_server_th_node_id) + + # Wait for the device to appear on the DUT_FSA_BRIDGE. + await asyncio.sleep(2) + + # Get the list of endpoints on the DUT_FSA_BRIDGE after adding the TH_SERVER_NO_UID. + dut_fsa_bridge_endpoints_new = set(await self.read_single_attribute_check_success( + cluster=Clusters.Descriptor, + attribute=Clusters.Descriptor.Attributes.PartsList, + node_id=self.dut_node_id, + endpoint=0, + )) + + # Get the endpoint number for just added TH_SERVER_NO_UID. + logging.info("Endpoints on DUT_FSA_BRIDGE: old=%s, new=%s", dut_fsa_bridge_endpoints, dut_fsa_bridge_endpoints_new) + asserts.assert_true(dut_fsa_bridge_endpoints_new.issuperset(dut_fsa_bridge_endpoints), + "Expected only new endpoints to be added") + unique_endpoints_set = dut_fsa_bridge_endpoints_new - dut_fsa_bridge_endpoints + asserts.assert_equal(len(unique_endpoints_set), 1, "Expected only one new endpoint on DUT_FSA") + dut_fsa_bridge_th_server_endpoint = list(unique_endpoints_set)[0] + + dut_fsa_bridge_th_server_unique_id = await self.read_single_attribute_check_success( + cluster=Clusters.BridgedDeviceBasicInformation, + attribute=Clusters.BridgedDeviceBasicInformation.Attributes.UniqueID, + endpoint=dut_fsa_bridge_th_server_endpoint) + asserts.assert_true(type_matches(dut_fsa_bridge_th_server_unique_id, str), "UniqueID should be a string") + asserts.assert_true(dut_fsa_bridge_th_server_unique_id, "UniqueID should not be an empty string") + logging.info("UniqueID generated for TH_SERVER_NO_UID: %s", dut_fsa_bridge_th_server_unique_id) if __name__ == "__main__": diff --git a/src/python_testing/TC_MCORE_FS_1_4.py b/src/python_testing/TC_MCORE_FS_1_4.py new file mode 100644 index 00000000000000..e6337352d5a71c --- /dev/null +++ b/src/python_testing/TC_MCORE_FS_1_4.py @@ -0,0 +1,476 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# This test requires a TH_SERVER_NO_UID application that returns UnsupportedAttribute +# when reading UniqueID from BasicInformation Cluster. Please specify the app +# location with --string-arg th_server_no_uid_app_path: + +# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments +# for details about the block below. +# +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 +# test-runner-run/run1/app: examples/fabric-admin/scripts/fabric-sync-app.py +# test-runner-run/run1/app-args: --app-admin=${FABRIC_ADMIN_APP} --app-bridge=${FABRIC_BRIDGE_APP} --stdin-pipe=dut-fsa-stdin --discriminator=1234 +# test-runner-run/run1/factoryreset: True +# test-runner-run/run1/script-args: --PICS src/app/tests/suites/certification/ci-pics-values --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --string-arg th_fsa_app_path:examples/fabric-admin/scripts/fabric-sync-app.py th_fsa_admin_path:${FABRIC_ADMIN_APP} th_fsa_bridge_path:${FABRIC_BRIDGE_APP} th_server_no_uid_app_path:${LIGHTING_APP_NO_UNIQUE_ID} dut_fsa_stdin_pipe:dut-fsa-stdin +# test-runner-run/run1/script-start-delay: 5 +# test-runner-run/run1/quiet: false +# === END CI TEST ARGUMENTS === + +import asyncio +import logging +import os +import random +import subprocess +import sys +import tempfile +import threading + +import chip.clusters as Clusters +from chip import ChipDeviceCtrl +from chip.interaction_model import Status +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches +from mobly import asserts + + +async def wait_for_server_initialization(server_port, timeout=5): + """Wait until the server is ready by checking if it opens the expected port.""" + start_time = asyncio.get_event_loop().time() + elapsed_time = 0 + retry_interval = 1 + + logging.info(f"Waiting for server to initialize on TCP port {server_port} for up to {timeout} seconds.") + + while elapsed_time < timeout: + try: + # Try connecting to the server to check if it's ready + reader, writer = await asyncio.open_connection('::1', server_port) + writer.close() + await writer.wait_closed() + logging.info(f"TH_SERVER_NO_UID is initialized and ready on port {server_port}.") + return + except (ConnectionRefusedError, OSError) as e: + logging.warning(f"Connection to port {server_port} failed: {e}. Retrying in {retry_interval} seconds...") + + await asyncio.sleep(retry_interval) + elapsed_time = asyncio.get_event_loop().time() - start_time + + raise TimeoutError(f"Server on port {server_port} did not initialize within {timeout} seconds. " + f"Total time waited: {elapsed_time} seconds.") + +# TODO: Make this class more generic. Issue #35348 + + +class Subprocess(threading.Thread): + + def __init__(self, args: list = [], stdout_cb=None, tag="", **kw): + super().__init__(**kw) + self.tag = f"[{tag}] " if tag else "" + self.stdout_cb = stdout_cb + self.args = args + + def forward_f(self, f_in, f_out): + while True: + line = f_in.readline() + if not line: + break + f_out.write(f"{self.tag}{line}") + f_out.flush() + if self.stdout_cb is not None: + self.stdout_cb(line) + + def run(self): + logging.info("RUN: %s", " ".join(self.args)) + self.p = subprocess.Popen(self.args, errors="ignore", stdin=subprocess.PIPE, + stdout=subprocess.PIPE, stderr=subprocess.PIPE) + # Forward stdout and stderr with a tag attached. + forwarding_stdout_thread = threading.Thread(target=self.forward_f, args=[self.p.stdout, sys.stdout]) + forwarding_stdout_thread.start() + forwarding_stderr_thread = threading.Thread(target=self.forward_f, args=[self.p.stderr, sys.stderr]) + forwarding_stderr_thread.start() + # Wait for the process to finish. + self.p.wait() + forwarding_stdout_thread.join() + forwarding_stderr_thread.join() + + def stop(self): + self.p.terminate() + self.join() + + +class FabricSyncApp: + + def _process_admin_output(self, line): + if self.wait_for_text_text is not None and self.wait_for_text_text in line: + self.wait_for_text_event.set() + + def wait_for_text(self, timeout=30): + if not self.wait_for_text_event.wait(timeout=timeout): + raise Exception(f"Timeout waiting for text: {self.wait_for_text_text}") + self.wait_for_text_event.clear() + self.wait_for_text_text = None + + def __init__(self, fabric_sync_app_path, fabric_admin_app_path, fabric_bridge_app_path, + storage_dir, fabric_name=None, node_id=None, vendor_id=None, + paa_trust_store_path=None, bridge_port=None, bridge_discriminator=None, + bridge_passcode=None): + + self.wait_for_text_event = threading.Event() + self.wait_for_text_text = None + + args = [fabric_sync_app_path] + args.append(f"--app-admin={fabric_admin_app_path}") + args.append(f"--app-bridge={fabric_bridge_app_path}") + # Override default ports, so it will be possible to run + # our TH_FSA alongside the DUT_FSA during CI testing. + args.append("--app-admin-rpc-port=44000") + args.append("--app-bridge-rpc-port=44001") + # Keep the storage directory in a temporary location. + args.append(f"--storage-dir={storage_dir}") + if paa_trust_store_path is not None: + args.append(f"--paa-trust-store-path={paa_trust_store_path}") + if fabric_name is not None: + args.append(f"--commissioner-name={fabric_name}") + if node_id is not None: + args.append(f"--commissioner-node-id={node_id}") + args.append(f"--commissioner-vendor-id={vendor_id}") + args.append(f"--secured-device-port={bridge_port}") + args.append(f"--discriminator={bridge_discriminator}") + args.append(f"--passcode={bridge_passcode}") + + self.fabric_sync_app = Subprocess(args, stdout_cb=self._process_admin_output) + self.wait_for_text_text = "Successfully opened pairing window on the device" + self.fabric_sync_app.start() + + # Wait for the fabric-sync-app to be ready. + self.wait_for_text() + + def commission_on_network(self, node_id, setup_pin_code=None, filter_type=None, filter=None): + self.wait_for_text_text = f"Commissioning complete for node ID {node_id:#018x}: success" + # Send the commissioning command to the admin. + self.fabric_sync_app.p.stdin.write(f"pairing onnetwork {node_id} {setup_pin_code}\n") + self.fabric_sync_app.p.stdin.flush() + # Wait for success message. + self.wait_for_text() + + def stop(self): + self.fabric_sync_app.stop() + + +class AppServer: + + def __init__(self, app, storage_dir, port=None, discriminator=None, passcode=None): + + args = [app] + args.extend(["--KVS", tempfile.mkstemp(dir=storage_dir, prefix="kvs-app-")[1]]) + args.extend(['--secured-device-port', str(port)]) + args.extend(["--discriminator", str(discriminator)]) + args.extend(["--passcode", str(passcode)]) + self.app = Subprocess(args, tag="SERVER") + self.app.start() + + def stop(self): + self.app.stop() + + +class TC_MCORE_FS_1_4(MatterBaseTest): + + @property + def default_timeout(self) -> int: + # This test has some manual steps, so we need a longer timeout. + return 200 + + def setup_class(self): + super().setup_class() + + self.th_fsa_controller = None + self.th_server = None + self.storage = None + + # Get the path to the TH_FSA (fabric-admin and fabric-bridge) app from the user params. + th_fsa_app_path = self.user_params.get("th_fsa_app_path") + if not th_fsa_app_path: + asserts.fail("This test requires a TH_FSA app. Specify app path with --string-arg th_fsa_app_path:") + if not os.path.exists(th_fsa_app_path): + asserts.fail(f"The path {th_fsa_app_path} does not exist") + th_fsa_admin_path = self.user_params.get("th_fsa_admin_path") + if not th_fsa_admin_path: + asserts.fail("This test requires a TH_FSA_ADMIN app. Specify app path with --string-arg th_fsa_admin_path:") + if not os.path.exists(th_fsa_admin_path): + asserts.fail(f"The path {th_fsa_admin_path} does not exist") + th_fsa_bridge_path = self.user_params.get("th_fsa_bridge_path") + if not th_fsa_bridge_path: + asserts.fail("This test requires a TH_FSA_BRIDGE app. Specify app path with --string-arg th_fsa_bridge_path:") + if not os.path.exists(th_fsa_bridge_path): + asserts.fail(f"The path {th_fsa_bridge_path} does not exist") + + # Get the path to the TH_SERVER_NO_UID app from the user params. + th_server_app = self.user_params.get("th_server_no_uid_app_path", None) + if not th_server_app: + asserts.fail("This test requires a TH_SERVER_NO_UID app. Specify app path with --string-arg th_server_no_uid_app_path:") + if not os.path.exists(th_server_app): + asserts.fail(f"The path {th_server_app} does not exist") + + # Create a temporary storage directory for keeping KVS files. + self.storage = tempfile.TemporaryDirectory(prefix=self.__class__.__name__) + logging.info("Temporary storage directory: %s", self.storage.name) + + self.th_fsa_bridge_address = "::1" + self.th_fsa_bridge_port = 5543 + # Random discriminator between 0 and MAX - 1. The one-less is to save + # a room for the TH_SERVER_NO_UID discriminator. + self.th_fsa_bridge_discriminator = random.randint(0, 4094) + self.th_fsa_bridge_passcode = 20202021 + + self.th_fsa_controller = FabricSyncApp( + th_fsa_app_path, + th_fsa_admin_path, + th_fsa_bridge_path, + storage_dir=self.storage.name, + paa_trust_store_path=self.matter_test_config.paa_trust_store_path, + bridge_port=self.th_fsa_bridge_port, + bridge_discriminator=self.th_fsa_bridge_discriminator, + bridge_passcode=self.th_fsa_bridge_passcode, + vendor_id=0xFFF1) + + # Get the named pipe path for the DUT_FSA app input from the user params. + dut_fsa_stdin_pipe = self.user_params.get("dut_fsa_stdin_pipe", None) + if dut_fsa_stdin_pipe is not None: + self.dut_fsa_stdin = open(dut_fsa_stdin_pipe, "w") + + self.th_server_port = 5544 + self.th_server_discriminator = self.th_fsa_bridge_discriminator + 1 + self.th_server_passcode = 20202022 + + # Start the TH_SERVER_NO_UID app. + self.th_server = AppServer( + th_server_app, + storage_dir=self.storage.name, + port=self.th_server_port, + discriminator=self.th_server_discriminator, + passcode=self.th_server_passcode) + + # Wait for TH_SERVER_NO_UID get initialized. + try: + asyncio.run(wait_for_server_initialization(self.th_server_port)) + except TimeoutError: + asserts.fail(f"TH_SERVER_NO_UID server failed to open port {self.th_server_port}") + + def teardown_class(self): + if self.th_fsa_controller is not None: + self.th_fsa_controller.stop() + if self.th_server is not None: + self.th_server.stop() + if self.storage is not None: + self.storage.cleanup() + super().teardown_class() + + def steps_TC_MCORE_FS_1_4(self) -> list[TestStep]: + return [ + TestStep(0, "Commission DUT if not done", is_commissioning=True), + TestStep(1, "TH commissions TH_SERVER_NO_UID to TH's fabric.", + "TH verifies that the TH_SERVER_NO_UID does not provide a UniqueID."), + TestStep(2, "TH instructs TH_FSA to commission TH_SERVER_NO_UID to TH_FSA's fabric."), + TestStep(3, "TH instructs TH_FSA to open up commissioning window on it's aggregator."), + TestStep(4, "Follow manufacturer provided instructions to have DUT_FSA commission TH_FSA's aggregator."), + TestStep(5, "Follow manufacturer provided instructions to enable DUT_FSA to synchronize TH_SERVER_NO_UID" + " from TH_FSA onto DUT_FSA's fabric. TH to provide endpoint saved from step 2 in user prompt."), + TestStep(6, "DUT_FSA synchronizes TH_SERVER_NO_UID onto DUT_FSA's fabric and copies the UniqueID presented" + " by TH_FSA's Bridged Device Basic Information Cluster."), + ] + + @async_test_body + async def test_TC_MCORE_FS_1_4(self): + self.is_ci = self.check_pics('PICS_SDK_CI_ONLY') + + # Commissioning - done + self.step(0) + + self.step(1) + + th_server_th_node_id = 1 + + await self.default_controller.CommissionOnNetwork( + nodeId=th_server_th_node_id, + setupPinCode=self.th_server_passcode, + filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, + filter=self.th_server_discriminator, + ) + + await self.read_single_attribute_expect_error( + cluster=Clusters.BasicInformation, + attribute=Clusters.BasicInformation.Attributes.UniqueID, + node_id=th_server_th_node_id, + error=Status.UnsupportedAttribute, + ) + + self.step(2) + + th_fsa_bridge_th_node_id = 2 + # Commissioning TH_FSA_BRIDGE to TH fabric. + await self.default_controller.CommissionOnNetwork( + nodeId=th_fsa_bridge_th_node_id, + setupPinCode=self.th_fsa_bridge_passcode, + filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, + filter=self.th_fsa_bridge_discriminator, + ) + + # Get the list of endpoints on the TH_FSA_BRIDGE before adding the TH_SERVER_NO_UID. + th_fsa_bridge_endpoints = set(await self.read_single_attribute_check_success( + cluster=Clusters.Descriptor, + attribute=Clusters.Descriptor.Attributes.PartsList, + node_id=th_fsa_bridge_th_node_id, + endpoint=0, + )) + + discriminator = random.randint(0, 4095) + # Open commissioning window on TH_SERVER_NO_UID. + params = await self.default_controller.OpenCommissioningWindow( + nodeid=th_server_th_node_id, + option=self.default_controller.CommissioningWindowPasscode.kTokenWithRandomPin, + discriminator=discriminator, + iteration=10000, + timeout=600) + + th_server_th_fsa_node_id = 3 + # Commissioning TH_SERVER_NO_UID to TH_FSA. + self.th_fsa_controller.commission_on_network( + node_id=th_server_th_fsa_node_id, + setup_pin_code=params.setupPinCode, + filter_type=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, + filter=discriminator, + ) + + # Wait some time, so the dynamic endpoint will appear on the TH_FSA_BRIDGE. + await asyncio.sleep(5) + + # Get the list of endpoints on the TH_FSA_BRIDGE after adding the TH_SERVER_NO_UID. + th_fsa_bridge_endpoints_new = set(await self.read_single_attribute_check_success( + cluster=Clusters.Descriptor, + attribute=Clusters.Descriptor.Attributes.PartsList, + node_id=th_fsa_bridge_th_node_id, + endpoint=0, + )) + + # Get the endpoint number for just added TH_SERVER_NO_UID. + logging.info("Endpoints on TH_FSA_BRIDGE: old=%s, new=%s", th_fsa_bridge_endpoints, th_fsa_bridge_endpoints_new) + asserts.assert_true(th_fsa_bridge_endpoints_new.issuperset(th_fsa_bridge_endpoints), + "Expected only new endpoints to be added") + unique_endpoints_set = th_fsa_bridge_endpoints_new - th_fsa_bridge_endpoints + asserts.assert_equal(len(unique_endpoints_set), 1, "Expected only one new endpoint") + th_fsa_bridge_th_server_endpoint = list(unique_endpoints_set)[0] + + # Verify that TH_FSA created a UniqueID for TH_SERVER_NO_UID. + th_fsa_bridge_th_server_unique_id = await self.read_single_attribute_check_success( + cluster=Clusters.BridgedDeviceBasicInformation, + attribute=Clusters.BridgedDeviceBasicInformation.Attributes.UniqueID, + node_id=th_fsa_bridge_th_node_id, + endpoint=th_fsa_bridge_th_server_endpoint) + asserts.assert_true(type_matches(th_fsa_bridge_th_server_unique_id, str), "UniqueID should be a string") + asserts.assert_true(th_fsa_bridge_th_server_unique_id, "UniqueID should not be an empty string") + logging.info("UniqueID generated for TH_SERVER_NO_UID: %s", th_fsa_bridge_th_server_unique_id) + + self.step(3) + + discriminator = random.randint(0, 4095) + # Open commissioning window on TH_FSA_BRIDGE. + params = await self.default_controller.OpenCommissioningWindow( + nodeid=th_fsa_bridge_th_node_id, + option=self.default_controller.CommissioningWindowPasscode.kTokenWithRandomPin, + discriminator=discriminator, + iteration=10000, + timeout=600) + + self.step(4) + + # Commissioning TH_FSA_BRIDGE to DUT_FSA fabric. + if not self.is_ci: + self.wait_for_user_input( + f"Commission TH_FSA's aggregator on DUT using manufacturer specified mechanism.\n" + f"Use the following parameters:\n" + f"- discriminator: {discriminator}\n" + f"- setupPinCode: {params.setupPinCode}\n" + f"- setupQRCode: {params.setupQRCode}\n" + f"- setupManualCode: {params.setupManualCode}\n" + f"If using FabricSync Admin, you may type:\n" + f">>> fabricsync add-bridge {params.setupPinCode} {self.th_fsa_bridge_port}") + else: + self.dut_fsa_stdin.write( + f"fabricsync add-bridge 10 {params.setupPinCode} {self.th_fsa_bridge_address} {self.th_fsa_bridge_port}\n") + self.dut_fsa_stdin.flush() + # Wait for the commissioning to complete. + await asyncio.sleep(5) + + self.step(5) + + # Get the list of endpoints on the DUT_FSA_BRIDGE before synchronization. + dut_fsa_bridge_endpoints = set(await self.read_single_attribute_check_success( + cluster=Clusters.Descriptor, + attribute=Clusters.Descriptor.Attributes.PartsList, + node_id=self.dut_node_id, + endpoint=0, + )) + + # Synchronize TH_SERVER_NO_UID from TH_FSA to DUT_FSA fabric. + if not self.is_ci: + self.wait_for_user_input( + f"Synchronize endpoint from TH_FSA's aggregator to DUT using manufacturer specified mechanism.\n" + f"Use the following parameters:\n" + f"- endpointID: {th_fsa_bridge_th_server_endpoint}\n" + f"If using FabricSync Admin, you may type:\n" + f">>> fabricsync sync-device {th_fsa_bridge_th_server_endpoint}") + else: + self.dut_fsa_stdin.write(f"fabricsync sync-device {th_fsa_bridge_th_server_endpoint}\n") + self.dut_fsa_stdin.flush() + # Wait for the synchronization to complete. + await asyncio.sleep(5) + + self.step(6) + + # Get the list of endpoints on the DUT_FSA_BRIDGE after synchronization + dut_fsa_bridge_endpoints_new = set(await self.read_single_attribute_check_success( + cluster=Clusters.Descriptor, + attribute=Clusters.Descriptor.Attributes.PartsList, + node_id=self.dut_node_id, + endpoint=0, + )) + + # Get the endpoint number for just synced TH_SERVER_NO_UID. + logging.info("Endpoints on DUT_FSA_BRIDGE: old=%s, new=%s", dut_fsa_bridge_endpoints, dut_fsa_bridge_endpoints_new) + asserts.assert_true(dut_fsa_bridge_endpoints_new.issuperset(dut_fsa_bridge_endpoints), + "Expected only new endpoints to be added") + unique_endpoints_set = dut_fsa_bridge_endpoints_new - dut_fsa_bridge_endpoints + asserts.assert_equal(len(unique_endpoints_set), 1, "Expected only one new endpoint on DUT_FSA") + dut_fsa_bridge_th_server_endpoint = list(unique_endpoints_set)[0] + + # Verify that DUT_FSA copied the TH_SERVER_NO_UID UniqueID from TH_FSA. + dut_fsa_bridge_th_server_unique_id = await self.read_single_attribute_check_success( + cluster=Clusters.BridgedDeviceBasicInformation, + attribute=Clusters.BridgedDeviceBasicInformation.Attributes.UniqueID, + endpoint=dut_fsa_bridge_th_server_endpoint) + asserts.assert_true(type_matches(dut_fsa_bridge_th_server_unique_id, str), "UniqueID should be a string") + asserts.assert_true(dut_fsa_bridge_th_server_unique_id, "UniqueID should not be an empty string") + logging.info("UniqueID for TH_SERVER_NO_UID on DUT_FSA: %s", th_fsa_bridge_th_server_unique_id) + + # Make sure that the UniqueID on the DUT_FSA_BRIDGE is the same as the one on the DUT_FSA_BRIDGE. + asserts.assert_equal(dut_fsa_bridge_th_server_unique_id, th_fsa_bridge_th_server_unique_id, + "UniqueID on DUT_FSA and TH_FSA should be the same") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_MCORE_FS_1_5.py b/src/python_testing/TC_MCORE_FS_1_5.py new file mode 100755 index 00000000000000..df80072d5126e3 --- /dev/null +++ b/src/python_testing/TC_MCORE_FS_1_5.py @@ -0,0 +1,290 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# TODO: add to CI. See https://github.com/project-chip/connectedhomeip/issues/34676 + +import hashlib +import logging +import os +import queue +import secrets +import signal +import struct +import subprocess +import time +import uuid +from dataclasses import dataclass + +import chip.clusters as Clusters +from chip import ChipDeviceCtrl +from ecdsa.curves import NIST256p +from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main, type_matches +from mobly import asserts +from TC_SC_3_6 import AttributeChangeAccumulator + +# Length of `w0s` and `w1s` elements +WS_LENGTH = NIST256p.baselen + 8 + + +def _generate_verifier(passcode: int, salt: bytes, iterations: int) -> bytes: + ws = hashlib.pbkdf2_hmac('sha256', struct.pack('>> pairing onnetwork 111 {setup_params.passcode}") + + def steps_TC_MCORE_FS_1_5(self) -> list[TestStep]: + steps = [TestStep(1, "TH subscribes to PartsList attribute of the Descriptor cluster of DUT_FSA endpoint 0."), + TestStep(2, "Follow manufacturer provided instructions to have DUT_FSA commission TH_SERVER"), + TestStep(3, "TH waits up to 30 seconds for subscription report from the PartsList attribute of the Descriptor to contain new endpoint"), + TestStep(4, "TH uses DUT to open commissioning window to TH_SERVER"), + TestStep(5, "TH commissions TH_SERVER"), + TestStep(6, "TH subscribes to AdministratorCommissioning attributes on DUT_FSA for the newly added endpoint identified in step 3"), + TestStep(7, "TH opens commissioning window to TH_SERVER directly (not using DUT)"), + TestStep(8, "TH reads CurrentFabricIndex attributes on OperationalCredentials cluster from TH_SERVER directly (not using DUT_FSA)"), + TestStep(9, "TH reads AdministratorCommissioning from TH_SERVER directly (not using DUT)"), + TestStep(10, "TH waits up to 10 seconds for subscription report from the AdministratorCommissioning attribute (from step 6) to reflect values from previous step")] + return steps + + # This test has some manual steps, so we need a longer timeout. Test typically runs under 1 mins so 3 mins should + # be enough time for test to run + @property + def default_timeout(self) -> int: + return 3*60 + + @async_test_body + async def test_TC_MCORE_FS_1_5(self): + self.is_ci = self.check_pics('PICS_SDK_CI_ONLY') + + min_report_interval_sec = 0 + max_report_interval_sec = 30 + th_server_port = self.user_params.get("th_server_port", 5543) + self._th_server_app_path = self.user_params.get("th_server_app_path", None) + if not self._th_server_app_path: + asserts.fail('This test requires a TH_SERVER app. Specify app path with --string-arg th_server_app_path:') + if not os.path.exists(self._th_server_app_path): + asserts.fail(f'The path {self._th_server_app_path} does not exist') + + self.step(1) + # Subscribe to the PartsList + root_endpoint = 0 + parts_list_subscription_contents = [ + (root_endpoint, Clusters.Descriptor.Attributes.PartsList) + ] + parts_list_sub = await self.default_controller.ReadAttribute( + nodeid=self.dut_node_id, + attributes=parts_list_subscription_contents, + reportInterval=(min_report_interval_sec, max_report_interval_sec), + keepSubscriptions=False + ) + + parts_list_queue = queue.Queue() + parts_list_attribute_handler = AttributeChangeAccumulator( + name=self.default_controller.name, expected_attribute=Clusters.Descriptor.Attributes.PartsList, output=parts_list_queue) + parts_list_sub.SetAttributeUpdateCallback(parts_list_attribute_handler) + parts_list_cached_attributes = parts_list_sub.GetAttributes() + step_1_dut_parts_list = parts_list_cached_attributes[root_endpoint][Clusters.Descriptor][Clusters.Descriptor.Attributes.PartsList] + + asserts.assert_true(type_matches(step_1_dut_parts_list, list), "PartsList is expected to be a list") + + self.step(2) + setup_params = await self._create_th_server(th_server_port) + self._ask_for_vendor_commissioning_ux_operation(setup_params) + + self.step(3) + report_waiting_timeout_delay_sec = 30 + logging.info("Waiting for update to PartsList.") + start_time = time.time() + elapsed = 0 + time_remaining = report_waiting_timeout_delay_sec + + parts_list_endpoint_count_from_step_1 = len(step_1_dut_parts_list) + step_3_dut_parts_list = None + while time_remaining > 0: + try: + item = parts_list_queue.get(block=True, timeout=time_remaining) + endpoint, attribute, value = item['endpoint'], item['attribute'], item['value'] + + # Record arrival of an expected subscription change when seen + if endpoint == root_endpoint and attribute == Clusters.Descriptor.Attributes.PartsList and len(value) > parts_list_endpoint_count_from_step_1: + step_3_dut_parts_list = value + break + + except queue.Empty: + # No error, we update timeouts and keep going + pass + + elapsed = time.time() - start_time + time_remaining = report_waiting_timeout_delay_sec - elapsed + + asserts.assert_not_equal(step_3_dut_parts_list, None, "Timed out getting updated PartsList with new endpoint") + set_of_step_1_parts_list_endpoint = set(step_1_dut_parts_list) + set_of_step_3_parts_list_endpoint = set(step_3_dut_parts_list) + unique_endpoints_set = set_of_step_3_parts_list_endpoint - set_of_step_1_parts_list_endpoint + asserts.assert_equal(len(unique_endpoints_set), 1, "Expected only one new endpoint") + newly_added_endpoint = list(unique_endpoints_set)[0] + + self.step(4) + + discriminator = 3840 + passcode = 20202021 + salt = secrets.token_bytes(16) + iterations = 2000 + verifier = _generate_verifier(passcode, salt, iterations) + + # min commissioning timeout is 3*60 seconds + cmd = Clusters.AdministratorCommissioning.Commands.OpenCommissioningWindow(commissioningTimeout=3*60, + PAKEPasscodeVerifier=verifier, + discriminator=discriminator, + iterations=iterations, + salt=salt) + await self.send_single_cmd(cmd, dev_ctrl=self.default_controller, node_id=self.dut_node_id, endpoint=newly_added_endpoint, timedRequestTimeoutMs=5000) + + self.step(5) + self.th_server_local_nodeid = 1111 + await self.default_controller.CommissionOnNetwork(nodeId=self.th_server_local_nodeid, setupPinCode=passcode, filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, filter=discriminator) + + self.step(6) + cadmin_subscription_contents = [ + (newly_added_endpoint, Clusters.AdministratorCommissioning) + ] + cadmin_sub = await self.default_controller.ReadAttribute( + nodeid=self.dut_node_id, + attributes=cadmin_subscription_contents, + reportInterval=(min_report_interval_sec, max_report_interval_sec), + keepSubscriptions=False + ) + + cadmin_queue = queue.Queue() + # This AttributeChangeAccumulator is really just to let us know when new subscription came in + cadmin_attribute_handler = AttributeChangeAccumulator( + name=self.default_controller.name, expected_attribute=Clusters.AdministratorCommissioning.Attributes.WindowStatus, output=cadmin_queue) + cadmin_sub.SetAttributeUpdateCallback(cadmin_attribute_handler) + time.sleep(1) + + self.step(7) + await self.default_controller.OpenCommissioningWindow(nodeid=self.th_server_local_nodeid, timeout=180, iteration=1000, discriminator=3840, option=1) + + self.step(8) + current_fabric_index = await self.read_single_attribute_check_success(node_id=self.th_server_local_nodeid, cluster=Clusters.OperationalCredentials, attribute=Clusters.OperationalCredentials.Attributes.CurrentFabricIndex) + + self.step(9) + th_server_directly_read_result = await self.default_controller.ReadAttribute(self.th_server_local_nodeid, [(root_endpoint, Clusters.AdministratorCommissioning)]) + th_server_direct_cadmin = th_server_directly_read_result[root_endpoint][Clusters.AdministratorCommissioning] + cadmin_attr = Clusters.AdministratorCommissioning.Attributes + asserts.assert_equal(th_server_direct_cadmin[cadmin_attr.WindowStatus], + Clusters.AdministratorCommissioning.Enums.CommissioningWindowStatusEnum.kEnhancedWindowOpen, "WindowStatus is expected to be EnhancedWindowOpen") + asserts.assert_equal(th_server_direct_cadmin[cadmin_attr.AdminFabricIndex], + current_fabric_index, "AdminFabricIndex is unexpected") + + self.step(10) + report_waiting_timeout_delay_sec = 10 + logging.info("Waiting for update to AdministratorCommissioning attributes.") + start_time = time.time() + elapsed = 0 + time_remaining = report_waiting_timeout_delay_sec + + cadmin_sub_new_data = False + while time_remaining > 0: + try: + item = cadmin_queue.get(block=True, timeout=time_remaining) + endpoint, attribute, value = item['endpoint'], item['attribute'], item['value'] + + # Record arrival of an expected subscription change when seen + if endpoint == newly_added_endpoint and attribute == Clusters.AdministratorCommissioning.Attributes.WindowStatus: + cadmin_sub_new_data = True + break + + except queue.Empty: + # No error, we update timeouts and keep going + pass + + elapsed = time.time() - start_time + time_remaining = report_waiting_timeout_delay_sec - elapsed + + asserts.assert_true(cadmin_sub_new_data, + "Timed out waiting for DUT to reflect AdministratorCommissioning attributes for bridged device") + + dut_read = await self.default_controller.ReadAttribute(self.dut_node_id, [(newly_added_endpoint, Clusters.AdministratorCommissioning)]) + dut_cadmin_for_th_server = dut_read[newly_added_endpoint][Clusters.AdministratorCommissioning] + asserts.assert_equal(th_server_direct_cadmin[cadmin_attr.WindowStatus], + dut_cadmin_for_th_server[cadmin_attr.WindowStatus], "WindowStatus incorrectly reported by DUT") + asserts.assert_equal(th_server_direct_cadmin[cadmin_attr.AdminFabricIndex], + dut_cadmin_for_th_server[cadmin_attr.AdminFabricIndex], "AdminFabricIndex incorrectly reported by DUT") + asserts.assert_equal(th_server_direct_cadmin[cadmin_attr.AdminVendorId], + dut_cadmin_for_th_server[cadmin_attr.AdminVendorId], "AdminVendorId incorrectly reported by DUT") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_OCC_2_1.py b/src/python_testing/TC_OCC_2_1.py index ddbb34cbf0252a..6d135395d4598f 100644 --- a/src/python_testing/TC_OCC_2_1.py +++ b/src/python_testing/TC_OCC_2_1.py @@ -121,25 +121,31 @@ async def test_TC_OCC_2_1(self): hold_time_limits_dut = await self.read_occ_attribute_expect_success(endpoint=endpoint, attribute=attributes.HoldTimeLimits) asserts.assert_less_equal(hold_time_limits_dut.holdTimeMin, hold_time_limits_dut.holdTimeMax, "HoldTimeMin is not in valid range") - asserts.assert_greater_equal(hold_time_limits_dut.holdTimeMin, 0, "HoldTimeMin is not in valid range") - asserts.assert_less_equal(hold_time_limits_dut.holdTimeMax, 0xFFFE, "HoldTimeMin is not in valid range") - asserts.assert_greater_equal(hold_time_limits_dut.holdTimeMax, - hold_time_limits_dut.holdTimeMin, "HoldTimeMin is not in valid range") + asserts.assert_greater_equal(hold_time_limits_dut.holdTimeMin, 1, "HoldTimeMin is less than 1.") + asserts.assert_greater_equal(hold_time_limits_dut.holdTimeMax, 10, "HoldTimeMax is less than 10.") + asserts.assert_less_equal(hold_time_limits_dut.holdTimeMin, 0xFFFE, "HoldTimeMin is not in valid range.") + asserts.assert_less_equal(hold_time_limits_dut.holdTimeMax, 0xFFFE, "HoldTimeMax is not in valid range.") + asserts.assert_greater_equal(hold_time_limits_dut.holdTimeMax, hold_time_limits_dut.holdTimeMin, + "HoldTimeMax is less than HoldTimeMin.") asserts.assert_less_equal(hold_time_limits_dut.holdTimeDefault, - hold_time_limits_dut.holdTimeMax, "HoldTimeMin is not in valid range") + hold_time_limits_dut.holdTimeMax, "HoldTimeDefault is greater than HoldTimeMax.") asserts.assert_greater_equal(hold_time_limits_dut.holdTimeDefault, - hold_time_limits_dut.holdTimeMin, "HoldTimeMin is not in valid range") + hold_time_limits_dut.holdTimeMin, "HoldTimeDefault is less than HoldTimeMin.") else: logging.info("HoldTimeLimits not supported. Test step skipped") self.mark_current_step_skipped() self.step(6) if attributes.HoldTime.attribute_id in attribute_list: + asserts.assert_in(attributes.HoldTimeLimits.attribute_id, attribute_list, + "HoldTimeLimits attribute conformance failed.") hold_time_dut = await self.read_occ_attribute_expect_success(endpoint=endpoint, attribute=attributes.HoldTime) hold_time_limits_dut = await self.read_occ_attribute_expect_success(endpoint=endpoint, attribute=attributes.HoldTimeLimits) - asserts.assert_less_equal(hold_time_dut, hold_time_limits_dut.holdTimeMax, "HoldTime attribute is out of range") - asserts.assert_greater_equal(hold_time_dut, hold_time_limits_dut.holdTimeMin, "HoldTime attribute is out of range") + asserts.assert_less_equal(hold_time_dut, hold_time_limits_dut.holdTimeMax, + "HoldTime attribute is greater than HoldTimeMax.") + asserts.assert_greater_equal(hold_time_dut, hold_time_limits_dut.holdTimeMin, + "HoldTime attribute is less than HoldTimeMin.") else: logging.info("HoldTime not supported. The rest of legacy attribute test can be skipped") self.skip_all_remaining_steps(7) diff --git a/src/python_testing/TC_OCC_2_3.py b/src/python_testing/TC_OCC_2_3.py index 63e973b159ca37..384f5bf63f5388 100644 --- a/src/python_testing/TC_OCC_2_3.py +++ b/src/python_testing/TC_OCC_2_3.py @@ -14,18 +14,18 @@ # See the License for the specific language governing permissions and # limitations under the License. # - -# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments -# for details about the block below. -# # === BEGIN CI TEST ARGUMENTS === # test-runner-runs: run1 # test-runner-run/run1/app: ${ALL_CLUSTERS_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True # test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --endpoint 1 +# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --endpoint 1 --bool-arg simulate_occupancy:true # === END CI TEST ARGUMENTS === +# There are CI issues to be followed up for the test cases below that implements manually controlling sensor device for +# the occupancy state ON/OFF change. +# [TC-OCC-3.1] test procedure step 3, 4 +# [TC-OCC-3.2] test precedure step 3a, 3c import logging @@ -35,9 +35,10 @@ class TC_OCC_2_3(MatterBaseTest): - async def read_occ_attribute_expect_success(self, endpoint, attribute): + async def read_occ_attribute_expect_success(self, attribute): cluster = Clusters.Objects.OccupancySensing - return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + endpoint_id = self.matter_test_config.endpoint + return await self.read_single_attribute_check_success(endpoint=endpoint_id, cluster=cluster, attribute=attribute) def desc_TC_OCC_2_3(self) -> str: return "[TC-OCC-2.3] HoldTime Backward Compatibility Test with server as DUT" @@ -45,11 +46,16 @@ def desc_TC_OCC_2_3(self) -> str: def steps_TC_OCC_2_3(self) -> list[TestStep]: steps = [ TestStep(1, "Commission DUT to TH", is_commissioning=True), - TestStep(2, "DUT supports HoldTime attribute. If DUT doesn’t support it, then stop and exit this test case."), - TestStep(3, "Based on the feature flag value table, read OccupancySensorType attribute from DUT"), - TestStep(4, "If TH reads 0 - PIR, TH reads PIROccupiedToUnoccupiedDelay attribute and its value should be same as HoldTime"), - TestStep(5, "If TH reads 1 - Ultrasonic, TH reads UltrasonicOccupiedToUnoccupiedDelay attribute and its value should be same as HoldTime"), - TestStep(6, "If TH reads 2 - PHY, TH reads PhysicalContactOccupiedToUnoccupiedDelay attribute and its value should be same as HoldTime") + TestStep(2, "TH reads the FeatureMap attribute on the endpoint for use in later steps."), + TestStep(3, "TH checks DUT HoldTime attribute support in the AttributeList attribute. If DUT doesn't support HoldTime attribute, skip the rest of this test case."), + TestStep(4, "TH writes DUT HoldTime attribute with HoldTimeMin and afterwards reads the attribute."), + TestStep(5, "TH writes DUT HoldTime attribute with HoldTimeMax and afterwards reads the attribute."), + TestStep("6a", "If DUT FeatureMap has PIR or (!PIR & !US & !PHY), and PIROccupiedToUnoccupiedDelay is supported, then TH writes HoldTimeMin to DUT's HoldTime attribute, otherwise skip 6a, 6b."), + TestStep("6b", "TH writes DUT's PIROccupiedToUnoccupiedDelay attribute with HoldTimeMax, then TH reads DUT's PIROccupiedToUnoccupiedDelay and HoldTime attributes."), + TestStep("7a", "If DUT FeatureMap has US, and UltrasonicOccupiedToUnoccupiedDelay is supported, then TH writes HoldTimeMin to DUT's HoldTime attribute, otherwise skip 7a, 7b."), + TestStep("7b", "TH writes DUT UltrasonicOccupiedToUnoccupiedDelay attribute with HoldTimeMax, then TH reads DUT UltrasonicOccupiedToUnoccupiedDelay and HoldTime attributes."), + TestStep("8a", "If DUT FeatureMap has PHY, and PhysicalContactOccupiedToUnoccupiedDelay is supported, then TH writes HoldTimeMin to HoldTime attribute, otherwise skip 8a, 8b."), + TestStep("8b", "TH writes DUT PhysicalContactOccupiedToUnoccupiedDelay attribute with HoldTimeMax, then TH reads DUT PhysicalContactOccupiedToUnoccupiedDelay and HoldTime attributes."), ] return steps @@ -61,67 +67,110 @@ def pics_TC_OCC_2_3(self) -> list[str]: @async_test_body async def test_TC_OCC_2_3(self): - endpoint = self.matter_test_config.endpoint - self.step(1) # Already done, immediately go to step 2 + cluster = Clusters.Objects.OccupancySensing + attributes = cluster.Attributes + + self.step(1) # Commissioning already done self.step(2) - attributes = Clusters.OccupancySensing.Attributes - attribute_list = await self.read_occ_attribute_expect_success(endpoint=endpoint, attribute=attributes.AttributeList) + feature_map = await self.read_occ_attribute_expect_success(attribute=attributes.FeatureMap) + has_feature_pir = (feature_map & cluster.Bitmaps.Feature.kPassiveInfrared) != 0 + has_feature_ultrasonic = (feature_map & cluster.Bitmaps.Feature.kUltrasonic) != 0 + has_feature_contact = (feature_map & cluster.Bitmaps.Feature.kPhysicalContact) != 0 + has_no_legacy_features = ((not has_feature_pir) and (not has_feature_ultrasonic) and (not has_feature_contact)) - if attributes.HoldTime.attribute_id in attribute_list: - occupancy_hold_time_dut = await self.read_occ_attribute_expect_success(endpoint=endpoint, attribute=attributes.HoldTime) - else: - logging.info("No HoldTime attribute supports. Terminate this test case") + logging.info( + f"Feature map: 0x{feature_map:x}. PIR: {has_feature_pir}, US:{has_feature_ultrasonic}, PHY:{has_feature_contact}") self.step(3) - if attributes.OccupancySensorType.attribute_id in attribute_list: - occupancy_sensor_type_dut = await self.read_occ_attribute_expect_success(endpoint=endpoint, attribute=attributes.OccupancySensorType) - - asserts.assert_less_equal(occupancy_sensor_type_dut, 3, "OccupancySensorType attribute is out of range") - asserts.assert_greater_equal(occupancy_sensor_type_dut, 0, "OccupancySensorType attribute is out of range") + attribute_list = await self.read_occ_attribute_expect_success(attribute=attributes.AttributeList) + if attributes.HoldTime.attribute_id not in attribute_list: + logging.info("No HoldTime attribute supports. Terminate this test case") + self.skip_all_remaining_steps(4) + holdtime_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTime) + + self.step(4) + hold_time_limits_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTimeLimits) + asserts.assert_greater_equal(hold_time_limits_dut.holdTimeMin, 1, "HoldTimeMin has to be greater or equal to 1.") + await self.write_single_attribute(attributes.HoldTime(hold_time_limits_dut.holdTimeMin)) + holdtime_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTime) + asserts.assert_equal(holdtime_dut, hold_time_limits_dut.holdTimeMin, "HoldTimeMin to HoldTime writing failure") + + self.step(5) + await self.write_single_attribute(attributes.HoldTime(hold_time_limits_dut.holdTimeMax)) + asserts.assert_greater_equal(hold_time_limits_dut.holdTimeMax, 10, "HoldTimeMax has to be greater or equal to 10.") + holdtime_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTime) + asserts.assert_equal(holdtime_dut, hold_time_limits_dut.holdTimeMax, "HoldTimeMax to HoldTime writing failure") + + has_pir_timing_attrib = attributes.PIROccupiedToUnoccupiedDelay.attribute_id in attribute_list + has_no_legacy_features = ((not has_feature_pir) and (not has_feature_ultrasonic) and (not has_feature_contact)) + + if (has_feature_pir or has_no_legacy_features) and has_pir_timing_attrib: + self.step("6a") + await self.write_single_attribute(attributes.HoldTime(hold_time_limits_dut.holdTimeMin)) + holdtime_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTime) + occupancy_pir_otou_delay_dut = await self.read_occ_attribute_expect_success(attribute=attributes.PIROccupiedToUnoccupiedDelay) + asserts.assert_equal(occupancy_pir_otou_delay_dut, holdtime_dut, + "PIROccupiedToUnoccupiedDelay has a different value from HoldTime.") + + self.step("6b") + # perform reverse + await self.write_single_attribute(attributes.PIROccupiedToUnoccupiedDelay(hold_time_limits_dut.holdTimeMax)) + occupancy_pir_otou_delay_dut = await self.read_occ_attribute_expect_success( + attribute=attributes.PIROccupiedToUnoccupiedDelay) + holdtime_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTime) + asserts.assert_equal(occupancy_pir_otou_delay_dut, holdtime_dut, + "PIROccupiedToUnoccupiedDelay has a different value from HoldTime in reverse testing.") + # self.skip_all_remaining_steps("7a") else: - logging.info("OccupancySensorType attribute doesn't exist. Test step skipped") - - if occupancy_sensor_type_dut == Clusters.OccupancySensing.Enums.OccupancySensorTypeEnum.kPir: - self.step(4) - occupancy_pir_otou_delay_dut = await self.read_occ_attribute_expect_success(endpoint=endpoint, attribute=attributes.PIROccupiedToUnoccupiedDelay) - - asserts.assert_equal(occupancy_pir_otou_delay_dut, occupancy_hold_time_dut, - "HoldTime attribute value is not equal to PIROccupiedToUnoccupiedDelay") - self.skip_step(5) - self.skip_step(6) - - elif occupancy_sensor_type_dut == Clusters.OccupancySensing.Enums.OccupancySensorTypeEnum.kUltrasonic: - self.step(4) - occupancy_pir_otou_delay_dut = await self.read_occ_attribute_expect_success(endpoint=endpoint, attribute=attributes.PIROccupiedToUnoccupiedDelay) - - asserts.assert_equal(occupancy_pir_otou_delay_dut, occupancy_hold_time_dut, - "HoldTime attribute value is not equal to PIROccupiedToUnoccupiedDelay") - self.step(5) - occupancy_us_otou_delay_dut = await self.read_occ_attribute_expect_success(endpoint=endpoint, attribute=attributes.UltrasonicOccupiedToUnoccupiedDelay) - - asserts.assert_equal(occupancy_us_otou_delay_dut, occupancy_hold_time_dut, - "HoldTime attribute value is not equal to UltrasonicOccupiedToUnoccupiedDelay") - self.skip_step(6) - - elif occupancy_sensor_type_dut == Clusters.OccupancySensing.Enums.OccupancySensorTypeEnum.kPIRAndUltrasonic: - occupancy_pirus_otou_delay_dut = await self.read_occ_attribute_expect_success(endpoint=endpoint, attribute=attributes.PIROccupiedToUnoccupiedDelay) - - asserts.assert_equal(occupancy_pirus_otou_delay_dut, occupancy_hold_time_dut, - "HoldTime attribute value is not equal to PIROccupiedToUnoccupiedDelay") - - elif occupancy_sensor_type_dut == Clusters.OccupancySensing.Enums.OccupancySensorTypeEnum.kPhysicalContact: - self.skip_step(4) - self.skip_step(5) - self.step(6) - occupancy_phy_otou_delay_dut = await self.read_occ_attribute_expect_success(endpoint=endpoint, attribute=attributes.PhysicalContactOccupiedToUnoccupiedDelay) - - asserts.assert_equal(occupancy_phy_otou_delay_dut, occupancy_hold_time_dut, - "HoldTime attribute value is not equal to PhysicalContactOccupiedToUnoccupiedDelay") + self.skip_step("6a") + self.skip_step("6b") + + has_ultrasonic_timing_attrib = attributes.UltrasonicOccupiedToUnoccupiedDelay.attribute_id in attribute_list + if has_feature_ultrasonic and has_ultrasonic_timing_attrib: + self.step("7a") + await self.write_single_attribute(attributes.HoldTime(hold_time_limits_dut.holdTimeMin)) + holdtime_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTime) + occupancy_us_otou_delay_dut = await self.read_occ_attribute_expect_success(attribute=attributes.UltrasonicOccupiedToUnoccupiedDelay) + asserts.assert_equal(occupancy_us_otou_delay_dut, holdtime_dut, + "UltrasonicOccupiedToUnoccupiedDelay has a different value from HoldTime.") + + self.step("7b") + # perform reverse + await self.write_single_attribute( + attributes.UltrasonicOccupiedToUnoccupiedDelay(hold_time_limits_dut.holdTimeMax)) + occupancy_us_otou_delay_dut = await self.read_occ_attribute_expect_success( + attribute=attributes.UltrasonicOccupiedToUnoccupiedDelay) + holdtime_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTime) + asserts.assert_equal(occupancy_us_otou_delay_dut, holdtime_dut, + "UltrasonicOccupiedToUnoccupiedDelay has a different value from HoldTime in reverse testing.") + else: + self.skip_step("7a") + self.skip_step("7b") + + has_contact_timing_attrib = attributes.PhysicalContactOccupiedToUnoccupiedDelay.attribute_id in attribute_list + if has_feature_contact and has_contact_timing_attrib: + self.step("8a") + await self.write_single_attribute(attributes.HoldTime(hold_time_limits_dut.holdTimeMin)) + holdtime_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTime) + occupancy_phy_otou_delay_dut = await self.read_occ_attribute_expect_success(attribute=attributes.PhysicalContactOccupiedToUnoccupiedDelay) + asserts.assert_equal(occupancy_phy_otou_delay_dut, holdtime_dut, + "PhysicalContactOccupiedToUnoccupiedDelay has a different value from HoldTime.") + + self.step("8b") + # perform reverse + await self.write_single_attribute( + attributes.PhysicalContactOccupiedToUnoccupiedDelay(hold_time_limits_dut.holdTimeMin)) + occupancy_phy_otou_delay_dut = await self.read_occ_attribute_expect_success( + attribute=attributes.PhysicalContactOccupiedToUnoccupiedDelay) + holdtime_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTime) + asserts.assert_equal(occupancy_phy_otou_delay_dut, holdtime_dut, + "PhysicalContactOccupiedToUnoccupiedDelay has a different value from HoldTime in reverse testing.") else: - logging.info("OccupancySensorType attribute value is out of range") + self.skip_step("8a") + self.skip_step("8b") if __name__ == "__main__": diff --git a/src/python_testing/TC_OCC_3_1.py b/src/python_testing/TC_OCC_3_1.py index 246e3a13f2a211..cfec9a86532c18 100644 --- a/src/python_testing/TC_OCC_3_1.py +++ b/src/python_testing/TC_OCC_3_1.py @@ -1,129 +1,203 @@ -# -# Copyright (c) 2024 Project CHIP Authors -# All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# There are CI issues to be followed up for the test cases below that implements manually controlling sensor device for -# the occupancy state ON/OFF change. -# [TC-OCC-3.1] test procedure step 4 -# [TC-OCC-3.2] test precedure step 3c - -import logging -import time -from typing import Any, Optional - -import chip.clusters as Clusters -from chip.interaction_model import Status -from matter_testing_support import MatterBaseTest, TestStep, async_test_body, default_matter_test_main -from mobly import asserts - - -class TC_OCC_3_1(MatterBaseTest): - async def read_occ_attribute_expect_success(self, attribute): - cluster = Clusters.Objects.OccupancySensing - endpoint = self.matter_test_config.endpoint - return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) - - async def write_hold_time(self, hold_time: Optional[Any]) -> Status: - dev_ctrl = self.default_controller - node_id = self.dut_node_id - endpoint = self.matter_test_config.endpoint - - cluster = Clusters.OccupancySensing - write_result = await dev_ctrl.WriteAttribute(node_id, [(endpoint, cluster.Attributes.HoldTime(hold_time))]) - return write_result[0].Status - - def desc_TC_OCC_3_1(self) -> str: - return "[TC-OCC-3.1] Primary functionality with server as DUT" - - def steps_TC_OCC_3_1(self) -> list[TestStep]: - steps = [ - TestStep(1, "Commission DUT to TH and obtain DUT attribute list.", is_commissioning=True), - TestStep(2, "Change DUT HoldTime attribute value to 10 seconds."), - TestStep(3, "Do not trigger DUT occupancy sensing for the period of HoldTime. TH reads Occupancy attribute from DUT."), - TestStep(4, "Trigger DUT occupancy sensing to change the occupancy state and start a timer."), - TestStep(5, "After 10 seconds, TH reads Occupancy attribute from DUT.") - ] - return steps - - def pics_TC_OCC_3_1(self) -> list[str]: - pics = [ - "OCC.S", - ] - return pics - - @async_test_body - async def test_TC_OCC_3_1(self): - hold_time = 10 # 10 seconds for occupancy state hold time - - self.step(1) # Commissioning already done - - self.step(2) - - cluster = Clusters.OccupancySensing - attributes = cluster.Attributes - attribute_list = await self.read_occ_attribute_expect_success(attribute=attributes.AttributeList) - - has_hold_time = attributes.HoldTime.attribute_id in attribute_list - - if has_hold_time: - # write 10 as a HoldTime attribute - await self.write_single_attribute(cluster.Attributes.HoldTime(hold_time)) - else: - logging.info("No HoldTime attribute supports. Will test only occupancy attribute triggering functionality") - - self.step(3) - # check if Occupancy attribute is 0 - occupancy_dut = await self.read_occ_attribute_expect_success(attribute=attributes.Occupancy) - - # if occupancy is on, then wait until the sensor occupancy state is 0. - if occupancy_dut == 1: - # Don't trigger occupancy sensor to render occupancy attribute to 0 - if has_hold_time: - time.sleep(hold_time + 2.0) # add some extra 2 seconds to ensure hold time has passed. - else: # a user wait until a sensor specific time to change occupancy attribute to 0. This is the case where the sensor doesn't support HoldTime. - self.wait_for_user_input( - prompt_msg="Type any letter and press ENTER after the sensor occupancy is detection ready state (occupancy attribute = 0)") - - # check sensor occupancy state is 0 for the next test step - occupancy_dut = await self.read_occ_attribute_expect_success(attribute=attributes.Occupancy) - asserts.assert_equal(occupancy_dut, 0, "Occupancy attribute is still 1.") - - self.step(4) - # Trigger occupancy sensor to change Occupancy attribute value to 1 => TESTER ACTION on DUT - self.wait_for_user_input(prompt_msg="Type any letter and press ENTER after a sensor occupancy is triggered.") - - # And then check if Occupancy attribute has changed. - occupancy_dut = await self.read_occ_attribute_expect_success(attribute=attributes.Occupancy) - asserts.assert_equal(occupancy_dut, 1, "Occupancy state is not changed to 1") - - self.step(5) - # check if Occupancy attribute is back to 0 after HoldTime attribute period - # Tester should not be triggering the sensor for this test step. - if has_hold_time: - - # Start a timer based on HoldTime - time.sleep(hold_time + 2.0) # add some extra 2 seconds to ensure hold time has passed. - - occupancy_dut = await self.read_occ_attribute_expect_success(attribute=attributes.Occupancy) - asserts.assert_equal(occupancy_dut, 0, "Occupancy state is not 0 after HoldTime period") - - else: - logging.info("HoldTime attribute not supported. Skip this return to 0 timing test procedure.") - self.skip_step(5) - - -if __name__ == "__main__": - default_matter_test_main() +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 +# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} +# test-runner-run/run1/factoryreset: True +# test-runner-run/run1/quiet: True +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --endpoint 1 --bool-arg simulate_occupancy:true +# === END CI TEST ARGUMENTS === +# There are CI issues to be followed up for the test cases below that implements manually controlling sensor device for +# the occupancy state ON/OFF change. +# [TC-OCC-3.1] test procedure step 3, 4 +# [TC-OCC-3.2] test precedure step 3a, 3c + +import logging +import time +from typing import Any, Optional + +import chip.clusters as Clusters +from chip.interaction_model import Status +from matter_testing_support import (ClusterAttributeChangeAccumulator, EventChangeCallback, MatterBaseTest, TestStep, + async_test_body, await_sequence_of_reports, default_matter_test_main) +from mobly import asserts + + +class TC_OCC_3_1(MatterBaseTest): + def setup_test(self): + super().setup_test() + self.is_ci = self.matter_test_config.global_test_params.get('simulate_occupancy', False) + + async def read_occ_attribute_expect_success(self, attribute): + cluster = Clusters.Objects.OccupancySensing + endpoint = self.matter_test_config.endpoint + return await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=attribute) + + async def write_hold_time(self, hold_time: Optional[Any]) -> Status: + dev_ctrl = self.default_controller + node_id = self.dut_node_id + endpoint = self.matter_test_config.endpoint + + cluster = Clusters.OccupancySensing + write_result = await dev_ctrl.WriteAttribute(node_id, [(endpoint, cluster.Attributes.HoldTime(hold_time))]) + return write_result[0].Status + + def desc_TC_OCC_3_1(self) -> str: + return "[TC-OCC-3.1] Primary functionality with server as DUT" + + def steps_TC_OCC_3_1(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commission DUT to TH.", is_commissioning=True), + TestStep(2, "If HoldTime is supported, TH writes HoldTime attribute to 10 sec on DUT."), + TestStep(3, "Prompt operator to await until DUT occupancy changes to unoccupied state."), + TestStep(4, "TH subscribes to Occupancy sensor attributes and events."), + TestStep("5a", "Prompt operator to trigger occupancy change."), + TestStep("5b", "TH reads Occupancy attribute from DUT. Verify occupancy changed to occupied and Occupancy attribute was reported as occupied."), + TestStep("5c", "If supported, verify OccupancyChangedEvent was reported as occupied."), + TestStep(6, "If HoldTime is supported, wait for HoldTime, otherwise prompt operator to wait until no longer occupied."), + TestStep("7a", "TH reads Occupancy attribute from DUT. Verify occupancy changed to unoccupied and Occupancy attribute was reported as unoccupied."), + TestStep("7b", "If supported, verify OccupancyChangedEvent was reported as unoccupied."), + ] + return steps + + def pics_TC_OCC_3_1(self) -> list[str]: + pics = [ + "OCC.S", + ] + return pics + + # Sends and out-of-band command to the all-clusters-app + def write_to_app_pipe(self, command): + # CI app pipe id creation + self.app_pipe = "/tmp/chip_all_clusters_fifo_" + if self.is_ci: + app_pid = self.matter_test_config.app_pid + if app_pid == 0: + asserts.fail("The --app-pid flag must be set when using named pipe") + self.app_pipe = self.app_pipe + str(app_pid) + + with open(self.app_pipe, "w") as app_pipe: + app_pipe.write(command + "\n") + # Delay for pipe command to be processed (otherwise tests are flaky) + time.sleep(0.001) + + @async_test_body + async def test_TC_OCC_3_1(self): + hold_time = 10 if not self.is_ci else 1.0 # 10 seconds for occupancy state hold time + + self.step(1) # Commissioning already done + + self.step(2) + + cluster = Clusters.OccupancySensing + attributes = cluster.Attributes + attribute_list = await self.read_occ_attribute_expect_success(attribute=attributes.AttributeList) + + has_hold_time = attributes.HoldTime.attribute_id in attribute_list + occupancy_event_supported = self.check_pics("OCC.M.OccupancyChange") or self.is_ci + + if has_hold_time: + # write HoldTimeLimits HoldtimeMin to be 10 sec. + await self.write_single_attribute(cluster.Attributes.HoldTime(hold_time)) + holdtime_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTime) + asserts.assert_equal(holdtime_dut, hold_time, "Hold time read-back does not match hold time written") + else: + logging.info("No HoldTime attribute supports. Will test only occupancy attribute triggering functionality only.") + + self.step(3) + + if self.is_ci: + # CI call to trigger unoccupied. + self.write_to_app_pipe('{"Name":"SetOccupancy", "EndpointId": 1, "Occupancy": 0}') + else: + self.wait_for_user_input( + prompt_msg="Type any letter and press ENTER after the sensor occupancy is unoccupied state (occupancy attribute = 0)") + + # check sensor occupancy state is 0 for the next test step + occupancy_dut = await self.read_occ_attribute_expect_success(attribute=attributes.Occupancy) + asserts.assert_equal(occupancy_dut, 0, "Occupancy attribute is not unoccupied.") + + self.step(4) + # Setup Occupancy attribute subscription here + endpoint_id = self.matter_test_config.endpoint + node_id = self.dut_node_id + dev_ctrl = self.default_controller + attrib_listener = ClusterAttributeChangeAccumulator(cluster) + await attrib_listener.start(dev_ctrl, node_id, endpoint=endpoint_id, min_interval_sec=0, max_interval_sec=30) + + if occupancy_event_supported: + event_listener = EventChangeCallback(cluster) + await event_listener.start(dev_ctrl, node_id, endpoint=endpoint_id, min_interval_sec=0, max_interval_sec=30) + + self.step("5a") + # CI call to trigger on + if self.is_ci: + self.write_to_app_pipe('{"Name":"SetOccupancy", "EndpointId": 1, "Occupancy": 1}') + else: + # Trigger occupancy sensor to change Occupancy attribute value to 1 => TESTER ACTION on DUT + self.wait_for_user_input(prompt_msg="Type any letter and press ENTER after a sensor occupancy is triggered.") + + # And then check if Occupancy attribute has changed. + self.step("5b") + occupancy_dut = await self.read_occ_attribute_expect_success(attribute=attributes.Occupancy) + asserts.assert_equal(occupancy_dut, 1, "Occupancy state is not changed to 1") + + # subscription verification + post_prompt_settle_delay_seconds = 1.0 if self.is_ci else 10.0 + await_sequence_of_reports(report_queue=attrib_listener.attribute_queue, endpoint_id=endpoint_id, attribute=cluster.Attributes.Occupancy, sequence=[ + 1], timeout_sec=post_prompt_settle_delay_seconds) + + if occupancy_event_supported: + self.step("5c") + event = event_listener.wait_for_event_report( + cluster.Events.OccupancyChanged, timeout_sec=post_prompt_settle_delay_seconds) + asserts.assert_equal(event.occupancy, 1, "Unexpected occupancy on OccupancyChanged") + else: + self.skip_step("5c") + + self.step(6) + if self.is_ci: + # CI call to trigger unoccupied. + self.write_to_app_pipe('{"Name":"SetOccupancy", "EndpointId": 1, "Occupancy": 0}') + + if has_hold_time: + time.sleep(hold_time + 2.0) # add some extra 2 seconds to ensure hold time has passed. + else: + self.wait_for_user_input( + prompt_msg="Type any letter and press ENTER after the sensor occupancy is back to unoccupied state (occupancy attribute = 0)") + + # Check if Occupancy attribute is back to 0 after HoldTime attribute period + # Tester should not be triggering the sensor for this test step. + self.step("7a") + occupancy_dut = await self.read_occ_attribute_expect_success(attribute=attributes.Occupancy) + asserts.assert_equal(occupancy_dut, 0, "Occupancy state is not back to 0 after HoldTime period") + + await_sequence_of_reports(report_queue=attrib_listener.attribute_queue, endpoint_id=endpoint_id, attribute=cluster.Attributes.Occupancy, sequence=[ + 0], timeout_sec=post_prompt_settle_delay_seconds) + + if occupancy_event_supported: + self.step("7b") + event = event_listener.wait_for_event_report( + cluster.Events.OccupancyChanged, timeout_sec=post_prompt_settle_delay_seconds) + asserts.assert_equal(event.occupancy, 0, "Unexpected occupancy on OccupancyChanged") + else: + self.skip_step("7b") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_OCC_3_2.py b/src/python_testing/TC_OCC_3_2.py index 64a588b6eb36e8..c4049104feba68 100644 --- a/src/python_testing/TC_OCC_3_2.py +++ b/src/python_testing/TC_OCC_3_2.py @@ -1,204 +1,198 @@ -# -# Copyright (c) 2024 Project CHIP (Matter) Authors -# All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# TODO: There are CI issues to be followed up for the test cases below that implements manually controlling sensor device for -# the occupancy state ON/OFF change. -# [TC-OCC-3.1] test procedure step 4 -# [TC-OCC-3.2] test precedure step 3a, 3c - -import logging - -import chip.clusters as Clusters -from matter_testing_support import (ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, async_test_body, - await_sequence_of_reports, default_matter_test_main) -from mobly import asserts - - -class TC_OCC_3_2(MatterBaseTest): - async def read_occ_attribute_expect_success(self, attribute): - cluster = Clusters.Objects.OccupancySensing - endpoint_id = self.matter_test_config.endpoint - return await self.read_single_attribute_check_success(endpoint=endpoint_id, cluster=cluster, attribute=attribute) - - def desc_TC_OCC_3_2(self) -> str: - return "[TC-OCC-3.2] Subscription Report Verification with server as DUT" - - def steps_TC_OCC_3_2(self) -> list[TestStep]: - steps = [ - TestStep(1, "Commission DUT to TH if not already done", is_commissioning=True), - TestStep(2, "TH establishes a wildcard subscription to all attributes on Occupancy Sensing Cluster on the endpoint under test. Subscription min interval = 0 and max interval = 30 seconds."), - TestStep("3a", "Do not trigger DUT for occupancy state change."), - TestStep("3b", "TH reads DUT Occupancy attribute and saves the initial value as initial"), - TestStep("3c", "Trigger DUT to change the occupancy state."), - TestStep("3d", "TH awaits a ReportDataMessage containing an attribute report for DUT Occupancy attribute."), - TestStep("4a", "Check if DUT supports HoldTime attribute, If not supported, then stop and skip the rest of test cases."), - TestStep("4b", "TH reads DUT HoldTime attribute and saves the initial value as initial"), - TestStep("4c", "TH writes a different value to DUT HoldTime attribute."), - TestStep("4d", "TH awaits a ReportDataMessage containing an attribute report for DUT HoldTime attribute."), - TestStep("5a", "Check if DUT supports DUT feature flag PIR or (!PIR & !US & !PHY) and has the PIROccupiedToUnoccupiedDelay attribute, If not supported, then skip 5b, 5c, 5d."), - TestStep("5b", "TH reads DUT PIROccupiedToUnoccupiedDelay attribute and saves the initial value as initial"), - TestStep("5c", "TH writes a different value to DUT PIROccupiedToUnoccupiedDelay attribute."), - TestStep("5d", "TH awaits a ReportDataMessage containing an attribute report for DUT PIROccupiedToUnoccupiedDelay attribute."), - TestStep("6a", "Check if DUT supports DUT feature flag US and has the UltrasonicOccupiedToUnoccupiedDelay attribute. If not supported, then skip 6b, 6c, 6d."), - TestStep("6b", "TH reads DUT UltrasonicOccupiedToUnoccupiedDelay attribute and saves the initial value as initial"), - TestStep("6c", "TH writes a different value to DUT UltrasonicOccupiedToUnoccupiedDelay attribute."), - TestStep("6d", "TH awaits a ReportDataMessage containing an attribute report for DUT UltrasonicOccupiedToUnoccupiedDelay attribute."), - TestStep("7a", "Check if DUT supports DUT feature flag PHY and has the PhysicalContactOccupiedToUnoccupiedDelay attribute. If not supported, skip 7b, 7c, 7d."), - TestStep("7b", "TH reads DUT PhysicalContactOccupiedToUnoccupiedDelay attribute and saves the initial value as initial"), - TestStep("7c", "TH writes a different value to DUT PhysicalContactOccupiedToUnoccupiedDelay attribute."), - TestStep("7d", "TH awaits a ReportDataMessage containing an attribute report for DUT PhysicalContactOccupiedToUnoccupiedDelay attribute.") - ] - return steps - - def pics_TC_OCC_3_2(self) -> list[str]: - pics = [ - "OCC.S", - ] - return pics - - @async_test_body - async def test_TC_OCC_3_2(self): - endpoint_id = self.matter_test_config.endpoint - node_id = self.dut_node_id - dev_ctrl = self.default_controller - - post_prompt_settle_delay_seconds = 10.0 - cluster = Clusters.Objects.OccupancySensing - attributes = cluster.Attributes - - self.step(1) # Commissioning already done - - self.step(2) - feature_map = await self.read_occ_attribute_expect_success(attribute=attributes.FeatureMap) - has_feature_pir = (feature_map & cluster.Bitmaps.Feature.kPassiveInfrared) != 0 - has_feature_ultrasonic = (feature_map & cluster.Bitmaps.Feature.kUltrasonic) != 0 - has_feature_contact = (feature_map & cluster.Bitmaps.Feature.kPhysicalContact) != 0 - - logging.info( - f"Feature map: 0x{feature_map:x}. PIR: {has_feature_pir}, US:{has_feature_ultrasonic}, PHY:{has_feature_contact}") - - attribute_list = await self.read_occ_attribute_expect_success(attribute=attributes.AttributeList) - has_pir_timing_attrib = attributes.PIROccupiedToUnoccupiedDelay.attribute_id in attribute_list - has_ultrasonic_timing_attrib = attributes.UltrasonicOccupiedToUnoccupiedDelay.attribute_id in attribute_list - has_contact_timing_attrib = attributes.PhysicalContactOccupiedToUnoccupiedDelay.attribute_id in attribute_list - logging.info(f"Attribute list: {attribute_list}") - logging.info(f"--> Has PIROccupiedToUnoccupiedDelay: {has_pir_timing_attrib}") - logging.info(f"--> Has UltrasonicOccupiedToUnoccupiedDelay: {has_ultrasonic_timing_attrib}") - logging.info(f"--> Has PhysicalContactOccupiedToUnoccupiedDelay: {has_contact_timing_attrib}") - - # min interval = 0, and max interval = 30 seconds - attrib_listener = ClusterAttributeChangeAccumulator(Clusters.Objects.OccupancySensing) - await attrib_listener.start(dev_ctrl, node_id, endpoint=endpoint_id, min_interval_sec=0, max_interval_sec=30) - - # TODO - Will add Namepiped to assimilate the manual sensor untrigger here - self.step("3a") - self.wait_for_user_input(prompt_msg="Type any letter and press ENTER after DUT goes back to unoccupied state.") - - self.step("3b") - if attributes.Occupancy.attribute_id in attribute_list: - initial_dut = await self.read_occ_attribute_expect_success(attribute=attributes.Occupancy) - asserts.assert_equal(initial_dut, 0, "Occupancy attribute is still detected state") - - # TODO - Will add Namepiped to assimilate the manual sensor trigger here - self.step("3c") - self.wait_for_user_input( - prompt_msg="Type any letter and press ENTER after the sensor occupancy is triggered and its occupancy state changed.") - - self.step("3d") - await_sequence_of_reports(report_queue=attrib_listener.attribute_queue, endpoint_id=endpoint_id, attribute=cluster.Attributes.Occupancy, sequence=[ - 1], timeout_sec=post_prompt_settle_delay_seconds) - - self.step("4a") - if attributes.HoldTime.attribute_id not in attribute_list: - logging.info("No HoldTime attribute supports. Terminate this test case") - self.skip_all_remaining_steps("4b") - - self.step("4b") - initial_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTime) - - self.step("4c") - # write a different a HoldTime attribute value - diff_val = 12 - await self.write_single_attribute(attributes.HoldTime(diff_val)) - - self.step("4d") - await_sequence_of_reports(report_queue=attrib_listener.attribute_queue, endpoint_id=endpoint_id, attribute=cluster.Attributes.HoldTime, sequence=[ - diff_val], timeout_sec=post_prompt_settle_delay_seconds) - - self.step("5a") - - has_no_legacy_features = ((not has_feature_pir) and (not has_feature_ultrasonic) and (not has_feature_contact)) - - if has_pir_timing_attrib and (has_feature_pir or has_no_legacy_features): - self.step("5b") - initial_dut = await self.read_occ_attribute_expect_success(attribute=attributes.PIROccupiedToUnoccupiedDelay) - - self.step("5c") - # write the new attribute value - diff_val = 11 - await self.write_single_attribute(attributes.PIROccupiedToUnoccupiedDelay(diff_val)) - - self.step("5d") - await_sequence_of_reports(report_queue=attrib_listener.attribute_queue, endpoint_id=endpoint_id, attribute=cluster.Attributes.PIROccupiedToUnoccupiedDelay, sequence=[ - diff_val], timeout_sec=post_prompt_settle_delay_seconds) - else: - logging.info("No PIR timing attribute support. Skipping steps 5b, 5c, 5d") - self.skip_step("5b") - self.skip_step("5c") - self.skip_step("5d") - - self.step("6a") - if not has_feature_ultrasonic or not has_ultrasonic_timing_attrib: - logging.info("No Ultrasonic timing attribute supports. Skipping steps 6b, 6c, 6d") - self.skip_step("6b") - self.skip_step("6c") - self.skip_step("6d") - else: - self.step("6b") - initial_dut = await self.read_occ_attribute_expect_success(attribute=attributes.UltrasonicOccupiedToUnoccupiedDelay) - - self.step("6c") - # write the new attribute value - diff_val = 14 - await self.write_single_attribute(attributes.UltrasonicOccupiedToUnoccupiedDelay(diff_val)) - - self.step("6d") - await_sequence_of_reports(report_queue=attrib_listener.attribute_queue, endpoint_id=endpoint_id, attribute=cluster.Attributes.UltrasonicOccupiedToUnoccupiedDelay, sequence=[ - diff_val], timeout_sec=post_prompt_settle_delay_seconds) - - self.step("7a") - if not has_feature_contact or not has_contact_timing_attrib: - logging.info("No Physical contact timing attribute supports. Skipping steps 7b, 7c, 7d") - self.skip_step("7b") - self.skip_step("7c") - self.skip_step("7d") - else: - self.step("7b") - initial_dut = await self.read_occ_attribute_expect_success(attribute=attributes.PhysicalContactOccupiedToUnoccupiedDelay) - - self.step("7c") - # write the new attribute value - diff_val = 9 - await self.write_single_attribute(attributes.PhysicalContactOccupiedToUnoccupiedDelay(diff_val)) - - self.step("7d") - await_sequence_of_reports(report_queue=attrib_listener.attribute_queue, endpoint_id=endpoint_id, attribute=cluster.Attributes.PhysicalContactOccupiedToUnoccupiedDelay, sequence=[ - diff_val], timeout_sec=post_prompt_settle_delay_seconds) - - -if __name__ == "__main__": - default_matter_test_main() +# +# Copyright (c) 2024 Project CHIP (Matter) Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# +# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments +# for details about the block below. +# +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 +# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} +# test-runner-run/run1/factoryreset: True +# test-runner-run/run1/quiet: True +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --endpoint 1 --bool-arg simulate_occupancy:true +# === END CI TEST ARGUMENTS === + +# There are CI integration for the test cases below that implements manually controlling sensor device for +# the occupancy state ON/OFF change. +# [TC-OCC-3.1] test procedure step 3, 4 +# [TC-OCC-3.2] test precedure step 3a, 3c + +import logging +import time + +import chip.clusters as Clusters +from matter_testing_support import (AttributeValue, ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, async_test_body, + await_sequence_of_reports, default_matter_test_main) +from mobly import asserts + + +class TC_OCC_3_2(MatterBaseTest): + def setup_test(self): + super().setup_test() + self.is_ci = self.matter_test_config.global_test_params.get('simulate_occupancy', False) + + async def read_occ_attribute_expect_success(self, attribute): + cluster = Clusters.Objects.OccupancySensing + endpoint_id = self.matter_test_config.endpoint + return await self.read_single_attribute_check_success(endpoint=endpoint_id, cluster=cluster, attribute=attribute) + + def desc_TC_OCC_3_2(self) -> str: + return "[TC-OCC-3.2] Subscription Report Verification with server as DUT" + + def steps_TC_OCC_3_2(self) -> list[TestStep]: + steps = [ + TestStep(1, "Commission DUT to TH if not already done", is_commissioning=True), + TestStep(2, "TH establishes a wildcard subscription to all attributes on Occupancy Sensing Cluster on the endpoint under test. Subscription min interval = 0 and max interval = 30 seconds."), + TestStep("3a", "Prepare DUT to be unoccupied state."), + TestStep("3b", "TH reads DUT Occupancy attribute."), + TestStep("3c", "Trigger DUT to change the occupancy state."), + TestStep("3d", "TH awaits a ReportDataMessage containing an attribute report for DUT Occupancy attribute."), + TestStep("4a", "Check if DUT supports HoldTime attribute, If not supported, then stop and skip the rest of test cases."), + TestStep("4b", "TH writes HoldTimeMin to HoldTime attribute."), + TestStep("4c", "TH clears its report history and writes HoldTimeMax to HoldTime attribute."), + TestStep("4d", "TH awaits a ReportDataMessage containing an attribute report for DUT HoldTime attribute and all legacy attributes supported."), + ] + return steps + + def pics_TC_OCC_3_2(self) -> list[str]: + pics = [ + "OCC.S", + ] + return pics + + # Sends and out-of-band command to the all-clusters-app + def write_to_app_pipe(self, command): + # CI app pipe id creation + self.app_pipe = "/tmp/chip_all_clusters_fifo_" + if self.is_ci: + app_pid = self.matter_test_config.app_pid + if app_pid == 0: + asserts.fail("The --app-pid flag must be set when using named pipe") + self.app_pipe = self.app_pipe + str(app_pid) + + with open(self.app_pipe, "w") as app_pipe: + app_pipe.write(command + "\n") + # Delay for pipe command to be processed (otherwise tests are flaky) + time.sleep(0.001) + + @async_test_body + async def test_TC_OCC_3_2(self): + endpoint_id = self.matter_test_config.endpoint + node_id = self.dut_node_id + dev_ctrl = self.default_controller + + post_prompt_settle_delay_seconds = 10.0 + cluster = Clusters.Objects.OccupancySensing + attributes = cluster.Attributes + + self.step(1) # Commissioning already done + + self.step(2) + feature_map = await self.read_occ_attribute_expect_success(attribute=attributes.FeatureMap) + has_feature_pir = (feature_map & cluster.Bitmaps.Feature.kPassiveInfrared) != 0 + has_feature_ultrasonic = (feature_map & cluster.Bitmaps.Feature.kUltrasonic) != 0 + has_feature_contact = (feature_map & cluster.Bitmaps.Feature.kPhysicalContact) != 0 + + logging.info( + f"Feature map: 0x{feature_map:x}. PIR: {has_feature_pir}, US:{has_feature_ultrasonic}, PHY:{has_feature_contact}") + + attribute_list = await self.read_occ_attribute_expect_success(attribute=attributes.AttributeList) + has_pir_timing_attrib = attributes.PIROccupiedToUnoccupiedDelay.attribute_id in attribute_list + has_ultrasonic_timing_attrib = attributes.UltrasonicOccupiedToUnoccupiedDelay.attribute_id in attribute_list + has_contact_timing_attrib = attributes.PhysicalContactOccupiedToUnoccupiedDelay.attribute_id in attribute_list + logging.info(f"Attribute list: {attribute_list}") + logging.info(f"--> Has PIROccupiedToUnoccupiedDelay: {has_pir_timing_attrib}") + logging.info(f"--> Has UltrasonicOccupiedToUnoccupiedDelay: {has_ultrasonic_timing_attrib}") + logging.info(f"--> Has PhysicalContactOccupiedToUnoccupiedDelay: {has_contact_timing_attrib}") + + # min interval = 0, and max interval = 30 seconds + attrib_listener = ClusterAttributeChangeAccumulator(Clusters.Objects.OccupancySensing) + await attrib_listener.start(dev_ctrl, node_id, endpoint=endpoint_id, min_interval_sec=0, max_interval_sec=30) + + # add Namepiped to assimilate the manual sensor untrigger here + self.step("3a") + # CI call to trigger off + if self.is_ci: + self.write_to_app_pipe('{"Name":"SetOccupancy", "EndpointId": 1, "Occupancy": 0}') + else: + self.wait_for_user_input(prompt_msg="Type any letter and press ENTER after DUT goes back to unoccupied state.") + + self.step("3b") + initial_dut = await self.read_occ_attribute_expect_success(attribute=attributes.Occupancy) + asserts.assert_equal(initial_dut, 0, "Occupancy attribute is still detected state") + + # add Namepiped to assimilate the manual sensor trigger here + self.step("3c") + attrib_listener.reset() + + # CI call to trigger on + if self.is_ci: + self.write_to_app_pipe('{"Name":"SetOccupancy", "EndpointId": 1, "Occupancy": 1}') + else: + self.wait_for_user_input( + prompt_msg="Type any letter and press ENTER after the sensor occupancy is triggered and its occupancy state changed.") + + self.step("3d") + await_sequence_of_reports(report_queue=attrib_listener.attribute_queue, endpoint_id=endpoint_id, attribute=cluster.Attributes.Occupancy, sequence=[ + 1], timeout_sec=post_prompt_settle_delay_seconds) + + self.step("4a") + if attributes.HoldTime.attribute_id not in attribute_list: + logging.info("No HoldTime attribute supports. Terminate this test case") + self.skip_all_remaining_steps("4b") + + self.step("4b") + hold_time_limits_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTimeLimits) + hold_time_min = hold_time_limits_dut.holdTimeMin + hold_time_max = hold_time_limits_dut.holdTimeMax + await self.write_single_attribute(attributes.HoldTime(hold_time_min)) + hold_time_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTime) + asserts.assert_equal(hold_time_dut, hold_time_min, "HoldTime did not match written HoldTimeMin") + + # HoldTime may already have been HoldTimeMin, or not. Make sure we look only at subsequent reports. + attrib_listener.reset() + + self.step("4c") + await self.write_single_attribute(attributes.HoldTime(hold_time_max)) + hold_time_dut = await self.read_occ_attribute_expect_success(attribute=attributes.HoldTime) + asserts.assert_equal(hold_time_dut, hold_time_max, "HoldTime did not match written HoldTimeMax") + + self.step("4d") + has_no_legacy_features = ((not has_feature_pir) and (not has_feature_ultrasonic) and (not has_feature_contact)) + + expect_legacy_pir_timing = has_pir_timing_attrib and (has_feature_pir or has_no_legacy_features) + expect_legacy_us_timing = has_ultrasonic_timing_attrib and has_feature_ultrasonic + expect_legacy_phy_timing = has_contact_timing_attrib and has_feature_contact + + # Build list of expectations based on attributes present. + all_expected_final_values = [AttributeValue(endpoint_id, attribute=cluster.Attributes.HoldTime, value=hold_time_max)] + if expect_legacy_pir_timing: + all_expected_final_values.append(AttributeValue( + endpoint_id, attribute=cluster.Attributes.PIROccupiedToUnoccupiedDelay, value=hold_time_max)) + if expect_legacy_us_timing: + all_expected_final_values.append(AttributeValue( + endpoint_id, attribute=cluster.Attributes.UltrasonicOccupiedToUnoccupiedDelay, value=hold_time_max)) + if expect_legacy_phy_timing: + all_expected_final_values.append(AttributeValue( + endpoint_id, attribute=cluster.Attributes.PhysicalContactOccupiedToUnoccupiedDelay, value=hold_time_max)) + + # Wait for the reports to come. + attrib_listener.await_all_final_values_reported(all_expected_final_values, timeout_sec=post_prompt_settle_delay_seconds) + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TC_OpstateCommon.py b/src/python_testing/TC_OpstateCommon.py index 45d5b0918a76f2..e0e252ea180eb0 100644 --- a/src/python_testing/TC_OpstateCommon.py +++ b/src/python_testing/TC_OpstateCommon.py @@ -15,7 +15,6 @@ # limitations under the License. # -import json import logging import queue import time @@ -112,12 +111,7 @@ def init_test(self): asserts.fail("The --app-pid flag must be set when PICS_SDK_CI_ONLY is set") self.app_pipe = self.app_pipe + str(app_pid) - # Sends and out-of-band command to test-app - def write_to_app_pipe(self, command): - with open(self.app_pipe, "w") as app_pipe: - app_pipe.write(command + "\n") - - def send_raw_manual_or_pipe_command(self, command): + def send_raw_manual_or_pipe_command(self, command: dict): if self.is_ci: self.write_to_app_pipe(command) time.sleep(0.1) @@ -134,7 +128,7 @@ def send_manual_or_pipe_command(self, device: str, name: str, operation: str, pa if param is not None: command["Param"] = param - self.send_raw_manual_or_pipe_command(json.dumps(command)) + self.send_raw_manual_or_pipe_command(command) async def send_cmd(self, endpoint, cmd, timedRequestTimeoutMs=None): logging.info(f"##### Command {cmd}") diff --git a/src/python_testing/TC_PWRTL_2_1.py b/src/python_testing/TC_PWRTL_2_1.py index 7216031a9374f4..579398642a5320 100644 --- a/src/python_testing/TC_PWRTL_2_1.py +++ b/src/python_testing/TC_PWRTL_2_1.py @@ -30,7 +30,6 @@ import logging import chip.clusters as Clusters -from chip.clusters.Types import NullValue from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main from mobly import asserts @@ -56,13 +55,8 @@ async def test_TC_PWRTL_2_1(self): self.print_step(2, "Read AvailableAttributes attribute") available_endpoints = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=Clusters.Objects.PowerTopology, attribute=attributes.AvailableEndpoints) - if available_endpoints == NullValue: - logging.info("AvailableEndpoints is null") - else: - logging.info("AvailableEndpoints: %s" % (available_endpoints)) - - asserts.assert_less_equal(len(available_endpoints), 21, - "AvailableEndpoints length %d must be less than 21!" % len(available_endpoints)) + asserts.assert_less_equal(len(available_endpoints), 20, + "AvailableEndpoints length %d must be less than 21!" % len(available_endpoints)) if not self.check_pics("PWRTL.S.A0001"): logging.info("Test skipped because PICS PWRTL.S.A0001 is not set") @@ -71,10 +65,11 @@ async def test_TC_PWRTL_2_1(self): self.print_step(3, "Read ActiveEndpoints attribute") active_endpoints = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=Clusters.Objects.PowerTopology, attribute=attributes.ActiveEndpoints) logging.info("ActiveEndpoints: %s" % (active_endpoints)) - - if available_endpoints == NullValue: - asserts.assert_true(active_endpoints == NullValue, - "ActiveEndpoints should be null when AvailableEndpoints is null: %s" % active_endpoints) + asserts.assert_less_equal(len(active_endpoints), 20, + "ActiveEndpoints length %d must be less than 21!" % len(active_endpoints)) + # Verify that ActiveEndpoints is a subset of AvailableEndpoints + asserts.assert_true(set(active_endpoints).issubset(set(available_endpoints)), + "ActiveEndpoints should be a subset of AvailableEndpoints") if __name__ == "__main__": diff --git a/src/python_testing/TC_RVCCLEANM_2_1.py b/src/python_testing/TC_RVCCLEANM_2_1.py index cac18f9601f6ff..8e5013ad4c2dbd 100644 --- a/src/python_testing/TC_RVCCLEANM_2_1.py +++ b/src/python_testing/TC_RVCCLEANM_2_1.py @@ -28,7 +28,6 @@ # === END CI TEST ARGUMENTS === import logging -from time import sleep import chip.clusters as Clusters from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches @@ -65,14 +64,6 @@ async def send_run_change_to_mode_cmd(self, newMode) -> Clusters.Objects.RvcRunM "Unexpected return type for RVC Run Mode ChangeToMode") return ret - # Sends and out-of-band command to the rvc-app - def write_to_app_pipe(self, command): - with open(self.app_pipe, "w") as app_pipe: - app_pipe.write(command + "\n") - # Delay for pipe command to be processed (otherwise tests are flaky) - # TODO(#31239): centralize pipe write logic and remove the need of sleep - sleep(0.001) - def pics_TC_RVCCLEANM_2_1(self) -> list[str]: return ["RVCCLEANM.S"] @@ -107,7 +98,7 @@ async def test_TC_RVCCLEANM_2_1(self): # Ensure that the device is in the correct state if self.is_ci: - self.write_to_app_pipe('{"Name": "Reset"}') + self.write_to_app_pipe({"Name": "Reset"}) self.print_step(2, "Read SupportedModes attribute") supported_modes = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) diff --git a/src/python_testing/TC_RVCCLEANM_2_2.py b/src/python_testing/TC_RVCCLEANM_2_2.py index e3a92033b3bdf4..ed63dd09c34400 100644 --- a/src/python_testing/TC_RVCCLEANM_2_2.py +++ b/src/python_testing/TC_RVCCLEANM_2_2.py @@ -28,7 +28,6 @@ # === END CI TEST ARGUMENTS === import enum -from time import sleep import chip.clusters as Clusters from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches @@ -94,19 +93,9 @@ def print_instruction(self, step_number, instruction): def pics_TC_RVCCLEANM_2_2(self) -> list[str]: return ["RVCCLEANM.S"] - # Sends and out-of-band command to the rvc-app - def write_to_app_pipe(self, command): - with open(self.app_pipe, "w") as app_pipe: - app_pipe.write(command + "\n") - # Delay for pipe command to be processed (otherwise tests are flaky) - # TODO(#31239): centralize pipe write logic and remove the need of sleep - sleep(0.001) - @async_test_body async def test_TC_RVCCLEANM_2_2(self): - # TODO Replace 0x8000 with python object of RVCCLEAN FEATURE bit map when implemented - # 0x8000 corresponds to 16 bit DIRECTMODECH Feature map - self.directmodech_bit_mask = 0x8000 + self.directmodech_bit_mask = Clusters.RvcCleanMode.Bitmaps.Feature.kDirectModeChange self.endpoint = self.matter_test_config.endpoint self.is_ci = self.check_pics("PICS_SDK_CI_ONLY") if self.is_ci: @@ -123,7 +112,7 @@ async def test_TC_RVCCLEANM_2_2(self): # Ensure that the device is in the correct state if self.is_ci: - self.write_to_app_pipe('{"Name": "Reset"}') + self.write_to_app_pipe({"Name": "Reset"}) self.print_step( 2, "Manually put the device in a state in which the RVC Run Mode cluster’s CurrentMode attribute is set to a mode without the Idle mode tag.") diff --git a/src/python_testing/TC_RVCOPSTATE_2_1.py b/src/python_testing/TC_RVCOPSTATE_2_1.py index 42a2d02d6fae9c..b15fc927430374 100644 --- a/src/python_testing/TC_RVCOPSTATE_2_1.py +++ b/src/python_testing/TC_RVCOPSTATE_2_1.py @@ -28,7 +28,6 @@ # === END CI TEST ARGUMENTS === import logging -from time import sleep import chip.clusters as Clusters from chip.clusters.Types import NullValue @@ -72,14 +71,6 @@ async def send_pause_cmd(self) -> Clusters.Objects.RvcOperationalState.Commands. ret = await self.send_single_cmd(cmd=Clusters.Objects.RvcOperationalState.Commands.Pause(), endpoint=self.endpoint) return ret - # Sends and out-of-band command to the rvc-app - def write_to_app_pipe(self, command): - with open(self.app_pipe, "w") as app_pipe: - app_pipe.write(command + "\n") - # Allow some time for the command to take effect. - # This removes the test flakyness which is very annoying for everyone in CI. - sleep(0.001) - def TC_RVCOPSTATE_2_1(self) -> list[str]: return ["RVCOPSTATE.S"] @@ -100,7 +91,7 @@ async def test_TC_RVCOPSTATE_2_1(self): # Ensure that the device is in the correct state if self.is_ci: - self.write_to_app_pipe('{"Name": "Reset"}') + self.write_to_app_pipe({"Name": "Reset"}) if self.check_pics("RVCOPSTATE.S.A0000"): self.print_step(2, "Read PhaseList attribute") @@ -195,7 +186,7 @@ async def test_TC_RVCOPSTATE_2_1(self): test_step = "Manually put the device in the error state" self.print_step("6g", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "UnableToStartOrResume"}') + self.write_to_app_pipe({"Name": "ErrorEvent", "Error": "UnableToStartOrResume"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") await self.read_and_validate_opstate(step="6h", expected_state=Clusters.OperationalState.Enums.OperationalStateEnum.kError) @@ -203,7 +194,7 @@ async def test_TC_RVCOPSTATE_2_1(self): test_step = "Manually put the device in the seeking charger state" self.print_step("6i", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "Reset"}') + self.write_to_app_pipe({"Name": "Reset"}) await self.send_run_change_to_mode_cmd(1) await self.send_run_change_to_mode_cmd(0) else: @@ -213,7 +204,7 @@ async def test_TC_RVCOPSTATE_2_1(self): test_step = "Manually put the device in the charging state" self.print_step("6k", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "ChargerFound"}') + self.write_to_app_pipe({"Name": "ChargerFound"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") await self.read_and_validate_opstate(step="6l", expected_state=Clusters.RvcOperationalState.Enums.OperationalStateEnum.kCharging) @@ -221,7 +212,7 @@ async def test_TC_RVCOPSTATE_2_1(self): test_step = "Manually put the device in the docked state" self.print_step("6m", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "Charged"}') + self.write_to_app_pipe({"Name": "Charged"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") await self.read_and_validate_opstate(step="6n", expected_state=Clusters.RvcOperationalState.Enums.OperationalStateEnum.kDocked) @@ -254,7 +245,7 @@ async def test_TC_RVCOPSTATE_2_1(self): test_step = "Manually put the device in the unable to start or resume error state" self.print_step("7c", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "UnableToStartOrResume"}') + self.write_to_app_pipe({"Name": "ErrorEvent", "Error": "UnableToStartOrResume"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") await self.read_and_validate_operror(step="7d", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kUnableToStartOrResume) @@ -262,7 +253,7 @@ async def test_TC_RVCOPSTATE_2_1(self): test_step = "Manually put the device in the unable to complete operation error state" self.print_step("7e", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "UnableToCompleteOperation"}') + self.write_to_app_pipe({"Name": "ErrorEvent", "Error": "UnableToCompleteOperation"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") await self.read_and_validate_operror(step="7f", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kUnableToCompleteOperation) @@ -270,7 +261,7 @@ async def test_TC_RVCOPSTATE_2_1(self): test_step = "Manually put the device in the command invalid error state" self.print_step("7g", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "CommandInvalidInState"}') + self.write_to_app_pipe({"Name": "ErrorEvent", "Error": "CommandInvalidInState"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") await self.read_and_validate_operror(step="7h", expected_error=Clusters.OperationalState.Enums.ErrorStateEnum.kCommandInvalidInState) @@ -278,7 +269,7 @@ async def test_TC_RVCOPSTATE_2_1(self): test_step = "Manually put the device in the failed to find dock error state" self.print_step("7i", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "FailedToFindChargingDock"}') + self.write_to_app_pipe({"Name": "ErrorEvent", "Error": "FailedToFindChargingDock"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") await self.read_and_validate_operror(step="7j", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kFailedToFindChargingDock) @@ -286,7 +277,7 @@ async def test_TC_RVCOPSTATE_2_1(self): test_step = "Manually put the device in the stuck error state" self.print_step("7k", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "Stuck"}') + self.write_to_app_pipe({"Name": "ErrorEvent", "Error": "Stuck"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") await self.read_and_validate_operror(step="7l", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kStuck) @@ -294,7 +285,7 @@ async def test_TC_RVCOPSTATE_2_1(self): test_step = "Manually put the device in the dust bin missing error state" self.print_step("7m", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "DustBinMissing"}') + self.write_to_app_pipe({"Name": "ErrorEvent", "Error": "DustBinMissing"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") await self.read_and_validate_operror(step="7n", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kDustBinMissing) @@ -302,7 +293,7 @@ async def test_TC_RVCOPSTATE_2_1(self): test_step = "Manually put the device in the dust bin full error state" self.print_step("7o", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "DustBinFull"}') + self.write_to_app_pipe({"Name": "ErrorEvent", "Error": "DustBinFull"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") await self.read_and_validate_operror(step="7p", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kDustBinFull) @@ -310,7 +301,7 @@ async def test_TC_RVCOPSTATE_2_1(self): test_step = "Manually put the device in the water tank empty error state" self.print_step("7q", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "WaterTankEmpty"}') + self.write_to_app_pipe({"Name": "ErrorEvent", "Error": "WaterTankEmpty"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") await self.read_and_validate_operror(step="7r", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kWaterTankEmpty) @@ -318,7 +309,7 @@ async def test_TC_RVCOPSTATE_2_1(self): test_step = "Manually put the device in the water tank missing error state" self.print_step("7s", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "WaterTankMissing"}') + self.write_to_app_pipe({"Name": "ErrorEvent", "Error": "WaterTankMissing"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") await self.read_and_validate_operror(step="7t", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kWaterTankMissing) @@ -326,7 +317,7 @@ async def test_TC_RVCOPSTATE_2_1(self): test_step = "Manually put the device in the water tank lid open error state" self.print_step("7u", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "WaterTankLidOpen"}') + self.write_to_app_pipe({"Name": "ErrorEvent", "Error": "WaterTankLidOpen"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") await self.read_and_validate_operror(step="7v", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kWaterTankLidOpen) @@ -334,7 +325,7 @@ async def test_TC_RVCOPSTATE_2_1(self): test_step = "Manually put the device in the mop cleaning pad missing error state" self.print_step("7w", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "MopCleaningPadMissing"}') + self.write_to_app_pipe({"Name": "ErrorEvent", "Error": "MopCleaningPadMissing"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") await self.read_and_validate_operror(step="7x", expected_error=Clusters.RvcOperationalState.Enums.ErrorStateEnum.kMopCleaningPadMissing) diff --git a/src/python_testing/TC_RVCOPSTATE_2_3.py b/src/python_testing/TC_RVCOPSTATE_2_3.py index 1d915641260d3b..e9dc801cc11071 100644 --- a/src/python_testing/TC_RVCOPSTATE_2_3.py +++ b/src/python_testing/TC_RVCOPSTATE_2_3.py @@ -138,14 +138,6 @@ async def send_run_change_to_mode_cmd(self, new_mode) -> Clusters.Objects.RvcRun endpoint=self.endpoint) return ret - # Sends and out-of-band command to the rvc-app - def write_to_app_pipe(self, command): - with open(self.app_pipe, "w") as app_pipe: - app_pipe.write(command + "\n") - # Delay for pipe command to be processed (otherwise tests are flaky) - # TODO(#31239): centralize pipe write logic and remove the need of sleep - sleep(0.001) - # Prints the instruction and waits for a user input to continue def print_instruction(self, step_number, instruction): self.print_step(step_number, instruction) @@ -182,7 +174,7 @@ async def test_TC_RVCOPSTATE_2_3(self): # Ensure that the device is in the correct state if self.is_ci: - self.write_to_app_pipe('{"Name": "Reset"}') + self.write_to_app_pipe({"Name": "Reset"}) test_step = "Manually put the device in a state where it can receive a Pause command" self.print_step(2, test_step) @@ -269,7 +261,7 @@ async def test_TC_RVCOPSTATE_2_3(self): test_step = "Manually put the device in the Stopped(0x00) operational state" self.print_step(24, test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "Reset"}') + self.write_to_app_pipe({"Name": "Reset"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") @@ -283,7 +275,7 @@ async def test_TC_RVCOPSTATE_2_3(self): test_step = "Manually put the device in the Error(0x03) operational state" self.print_step(28, test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "Stuck"}') + self.write_to_app_pipe({"Name": "ErrorEvent", "Error": "Stuck"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") @@ -297,10 +289,10 @@ async def test_TC_RVCOPSTATE_2_3(self): test_step = "Manually put the device in the Charging(0x41) operational state" self.print_step(32, test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "Reset"}') + self.write_to_app_pipe({"Name": "Reset"}) await self.send_run_change_to_mode_cmd(1) await self.send_run_change_to_mode_cmd(0) - self.write_to_app_pipe('{"Name": "ChargerFound"}') + self.write_to_app_pipe({"Name": "ChargerFound"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") @@ -320,7 +312,7 @@ async def test_TC_RVCOPSTATE_2_3(self): test_step = "Manually put the device in the Docked(0x42) operational state" self.print_step(38, test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "Charged"}') + self.write_to_app_pipe({"Name": "Charged"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") diff --git a/src/python_testing/TC_RVCOPSTATE_2_4.py b/src/python_testing/TC_RVCOPSTATE_2_4.py index 7f03d33b196833..8180cb696296e9 100644 --- a/src/python_testing/TC_RVCOPSTATE_2_4.py +++ b/src/python_testing/TC_RVCOPSTATE_2_4.py @@ -28,7 +28,6 @@ # === END CI TEST ARGUMENTS === import logging -from time import sleep import chip.clusters as Clusters from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches @@ -90,14 +89,6 @@ async def send_run_change_to_mode_cmd(self, new_mode): await self.send_single_cmd(cmd=Clusters.Objects.RvcRunMode.Commands.ChangeToMode(newMode=new_mode), endpoint=self.endpoint) - # Sends an out-of-band command to the rvc-app - def write_to_app_pipe(self, command): - with open(self.app_pipe, "w") as app_pipe: - app_pipe.write(command + "\n") - # Delay for pipe command to be processed (otherwise tests are flaky) - # TODO(#31239): centralize pipe write logic and remove the need of sleep - sleep(0.001) - def pics_TC_RVCOPSTATE_2_4(self) -> list[str]: return ["RVCOPSTATE.S"] @@ -128,13 +119,13 @@ async def test_TC_RVCOPSTATE_2_4(self): # Ensure that the device is in the correct state if self.is_ci: - self.write_to_app_pipe('{"Name": "Reset"}') + self.write_to_app_pipe({"Name": "Reset"}) if self.check_pics("RVCOPSTATE.S.M.ST_ERROR"): step_name = "Manually put the device in the ERROR operational state" self.print_step(2, step_name) if self.is_ci: - self.write_to_app_pipe('{"Name": "ErrorEvent", "Error": "UnableToStartOrResume"}') + self.write_to_app_pipe({"Name": "ErrorEvent", "Error": "UnableToStartOrResume"}) else: self.wait_for_user_input(prompt_msg=f"{step_name}, and press Enter when ready.") @@ -146,9 +137,9 @@ async def test_TC_RVCOPSTATE_2_4(self): step_name = "Manually put the device in the CHARGING operational state" self.print_step(5, step_name) if self.is_ci: - self.write_to_app_pipe('{"Name": "Reset"}') - self.write_to_app_pipe('{"Name": "Docked"}') - self.write_to_app_pipe('{"Name": "Charging"}') + self.write_to_app_pipe({"Name": "Reset"}) + self.write_to_app_pipe({"Name": "Docked"}) + self.write_to_app_pipe({"Name": "Charging"}) else: self.wait_for_user_input(prompt_msg=f"{step_name}, and press Enter when ready.") @@ -160,7 +151,7 @@ async def test_TC_RVCOPSTATE_2_4(self): step_name = "Manually put the device in the DOCKED operational state" self.print_step(8, step_name) if self.is_ci: - self.write_to_app_pipe('{"Name": "Charged"}') + self.write_to_app_pipe({"Name": "Charged"}) else: self.wait_for_user_input(prompt_msg=f"{step_name}, and press Enter when ready.") diff --git a/src/python_testing/TC_RVCRUNM_2_1.py b/src/python_testing/TC_RVCRUNM_2_1.py index e98a1840629864..2693cb041a16b9 100644 --- a/src/python_testing/TC_RVCRUNM_2_1.py +++ b/src/python_testing/TC_RVCRUNM_2_1.py @@ -28,7 +28,6 @@ # === END CI TEST ARGUMENTS === import logging -from time import sleep import chip.clusters as Clusters from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main, type_matches @@ -60,14 +59,6 @@ async def send_change_to_mode_cmd(self, newMode) -> Clusters.Objects.RvcRunMode. "Unexpected return type for ChangeToMode") return ret - # Sends and out-of-band command to the rvc-app - def write_to_app_pipe(self, command): - with open(self.app_pipe, "w") as app_pipe: - app_pipe.write(command + "\n") - # Delay for pipe command to be processed (otherwise tests are flaky) - # TODO(#31239): centralize pipe write logic and remove the need of sleep - sleep(0.001) - def pics_TC_RVCRUNM_2_1(self) -> list[str]: return ["RVCRUNM.S"] @@ -102,7 +93,7 @@ async def test_TC_RVCRUNM_2_1(self): # Ensure that the device is in the correct state if self.is_ci: - self.write_to_app_pipe('{"Name": "Reset"}') + self.write_to_app_pipe({"Name": "Reset"}) self.print_step(2, "Read SupportedModes attribute") supported_modes = await self.read_mod_attribute_expect_success(endpoint=self.endpoint, attribute=attributes.SupportedModes) diff --git a/src/python_testing/TC_RVCRUNM_2_2.py b/src/python_testing/TC_RVCRUNM_2_2.py index b0d1233010f932..3a2ce23ea2ef20 100644 --- a/src/python_testing/TC_RVCRUNM_2_2.py +++ b/src/python_testing/TC_RVCRUNM_2_2.py @@ -28,7 +28,6 @@ # === END CI TEST ARGUMENTS === import enum -from time import sleep import chip.clusters as Clusters from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main @@ -110,14 +109,6 @@ async def read_op_state_operational_state(self) -> Clusters.Objects.RvcOperation Clusters.RvcOperationalState.Attributes.OperationalState) return ret - # Sends and out-of-band command to the rvc-app - def write_to_app_pipe(self, command): - with open(self.app_pipe, "w") as app_pipe: - app_pipe.write(command + "\n") - # Delay for pipe command to be processed (otherwise tests are flaky) - # TODO(#31239): centralize pipe write logic and remove the need of sleep - sleep(0.001) - def pics_TC_RVCRUNM_2_2(self) -> list[str]: return ["RVCRUNM.S"] @@ -131,9 +122,7 @@ async def test_TC_RVCRUNM_2_2(self): "PIXIT.RVCRUNM.MODE_A: \n" "PIXIT.RVCRUNM.MODE_B:") - # TODO Replace 0x8000 with python object of RVCRUN FEATURE bit when implemented - # 0x8000 corresponds to 16 bit DIRECTMODECH Feature map - self.directmodech_bit_mask = 0x8000 + self.directmodech_bit_mask = Clusters.RvcRunMode.Bitmaps.Feature.kDirectModeChange self.endpoint = self.matter_test_config.endpoint self.is_ci = self.check_pics("PICS_SDK_CI_ONLY") self.mode_a = self.matter_test_config.global_test_params['PIXIT.RVCRUNM.MODE_A'] @@ -158,7 +147,7 @@ async def test_TC_RVCRUNM_2_2(self): # Ensure that the device is in the correct state if self.is_ci: - self.write_to_app_pipe('{"Name": "Reset"}') + self.write_to_app_pipe({"Name": "Reset"}) test_step = ("Manually put the device in a RVC Run Mode cluster mode with " "the Idle(0x4000) mode tag and in a device state that allows changing to either " "of these modes: %i, %i" % (self.mode_a, self.mode_b)) @@ -237,7 +226,7 @@ async def test_TC_RVCRUNM_2_2(self): if op_state not in valid_op_states: self.print_step(9, "Manually put the device in one of Stopped(0x00), Paused(0x02), Charging(0x41) or Docked(0x42)") if self.is_ci: - self.write_to_app_pipe('{"Name": "ChargerFound"}') + self.write_to_app_pipe({"Name": "ChargerFound"}) else: self.wait_for_user_input( prompt_msg="Manually put the device in one of Stopped(0x00), Paused(0x02), Charging(0x41) or Docked(0x42), and press Enter when ready.\n") diff --git a/src/python_testing/TC_SEAR_1_2.py b/src/python_testing/TC_SEAR_1_2.py index c21e831464557e..2c253efa860038 100644 --- a/src/python_testing/TC_SEAR_1_2.py +++ b/src/python_testing/TC_SEAR_1_2.py @@ -29,7 +29,6 @@ # === END CI TEST ARGUMENTS === import logging -from time import sleep import chip.clusters as Clusters from chip.clusters.Types import NullValue @@ -140,10 +139,10 @@ async def read_and_validate_current_area(self, step): endpoint=self.endpoint, attribute=Clusters.ServiceArea.Attributes.CurrentArea) logging.info(f"CurrentArea {current_area}") - asserts.assert_true((len(self.selareaid_list) == 0 and current_area is NullValue) - or - current_area in self.selareaid_list, - f"CurrentArea {current_area} is invalid. SelectedAreas is {self.selareaid_list}.") + if current_area is not NullValue: + asserts.assert_true(current_area in self.areaid_list, + f"CurrentArea {current_area} is not in SupportedAreas: {self.areaid_list}.") + # save so other methods can use this if needed self.current_area = current_area @@ -158,7 +157,8 @@ async def read_and_validate_estimated_end_time(self, step): if self.current_area is NullValue: asserts.assert_true(estimated_end_time is NullValue, "EstimatedEndTime should be null if CurrentArea is null.") - else: + + if estimated_end_time is not NullValue: # allow for some clock skew asserts.assert_true(estimated_end_time >= read_time - 3*60, f"EstimatedEndTime({estimated_end_time}) should be greater than the time when it was read({read_time})") @@ -190,14 +190,6 @@ async def read_and_validate_progress(self, step): f"Progress entry should have a null TotalOperationalTime value (Status is {p.status})") # TODO how to check that InitialTimeEstimate is either null or uint32? - # Sends and out-of-band command to the rvc-app - def write_to_app_pipe(self, command): - with open(self.app_pipe, "w") as app_pipe: - app_pipe.write(command + "\n") - # Allow some time for the command to take effect. - # This removes the test flakyness which is very annoying for everyone in CI. - sleep(0.001) - def TC_SEAR_1_2(self) -> list[str]: return ["SEAR.S"] @@ -216,7 +208,7 @@ async def test_TC_SEAR_1_2(self): # Ensure that the device is in the correct state if self.is_ci: - self.write_to_app_pipe('{"Name": "Reset"}') + self.write_to_app_pipe({"Name": "Reset"}) if self.check_pics("SEAR.S.F02"): await self.read_and_validate_supported_maps(step=2) @@ -246,7 +238,7 @@ async def test_TC_SEAR_1_2(self): test_step = "Manually intervene to remove one or more entries in the SupportedMaps list" self.print_step("10", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "RemoveMap", "MapId": 3}') + self.write_to_app_pipe({"Name": "RemoveMap", "MapId": 3}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") @@ -281,7 +273,7 @@ async def test_TC_SEAR_1_2(self): test_step = "Manually intervene to add one or more entries to the SupportedMaps list" self.print_step("14", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "AddMap", "MapId": 1, "MapName": "NewTestMap1"}') + self.write_to_app_pipe({"Name": "AddMap", "MapId": 1, "MapName": "NewTestMap1"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") @@ -316,7 +308,7 @@ async def test_TC_SEAR_1_2(self): test_step = "Manually intervene to remove one or more entries from the SupportedAreas list" self.print_step("18", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "RemoveArea", "AreaId": 10050}') + self.write_to_app_pipe({"Name": "RemoveArea", "AreaId": 10050}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") @@ -350,7 +342,7 @@ async def test_TC_SEAR_1_2(self): test_step = "Manually intervene to add one or more entries to the SupportedAreas list" self.print_step("22", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "AddArea", "AreaId": 42, "MapId": 1, "LocationName": "NewTestArea1"}') + self.write_to_app_pipe({"Name": "AddArea", "AreaId": 42, "MapId": 1, "LocationName": "NewTestArea1"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") diff --git a/src/python_testing/TC_SEAR_1_3.py b/src/python_testing/TC_SEAR_1_3.py index 867cdcbe234353..df4a1ddb5123ba 100644 --- a/src/python_testing/TC_SEAR_1_3.py +++ b/src/python_testing/TC_SEAR_1_3.py @@ -25,11 +25,10 @@ # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True # test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS examples/rvc-app/rvc-common/pics/rvc-app-pics-values --endpoint 1 --json-arg PIXIT.SEAR.VALID_AREAS:'[7, 1234567]' --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === import logging -from time import sleep import chip.clusters as Clusters from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main @@ -74,14 +73,6 @@ async def send_cmd_select_areas_expect_response(self, step, new_areas, expected_ expected_response, f"Command response ({ret.status}) doesn't match the expected one") - # Sends and out-of-band command to the rvc-app - def write_to_app_pipe(self, command): - with open(self.app_pipe, "w") as app_pipe: - app_pipe.write(command + "\n") - # Allow some time for the command to take effect. - # This removes the test flakiness which is very annoying for everyone in CI. - sleep(0.001) - def TC_SEAR_1_3(self) -> list[str]: return ["SEAR.S"] @@ -100,7 +91,7 @@ async def test_TC_SEAR_1_3(self): # Ensure that the device is in the correct state if self.is_ci: - self.write_to_app_pipe('{"Name": "Reset"}') + self.write_to_app_pipe({"Name": "Reset"}) supported_area_ids = await self.read_supported_areas(step=2) asserts.assert_true(len(self.supported_areas) > 0, "SupportedAreas is empty") @@ -119,47 +110,53 @@ async def test_TC_SEAR_1_3(self): selected_areas = await self.read_selected_areas(step=6) asserts.assert_true(len(selected_areas) == 0, "SelectedAreas should be empty") - await self.send_cmd_select_areas_expect_response(step=8, new_areas=[invalid_area_id], expected_response=Clusters.ServiceArea.Enums.SelectAreasStatus.kUnsupportedArea) + await self.send_cmd_select_areas_expect_response(step=7, new_areas=[invalid_area_id], expected_response=Clusters.ServiceArea.Enums.SelectAreasStatus.kUnsupportedArea) + + if "PIXIT.SEAR.VALID_AREAS" not in self.matter_test_config.global_test_params: + # All the remaining tests require the PIXIT.SEAR.VALID_AREAS + return + + valid_areas = self.matter_test_config.global_test_params['PIXIT.SEAR.VALID_AREAS'] if self.check_pics("SEAR.S.M.INVALID_STATE_FOR_SELECT_AREAS") and self.check_pics("SEAR.S.M.HAS_MANUAL_SELAREA_STATE_CONTROL"): test_step = "Manually intervene to put the device in a state that prevents it from executing the SelectAreas command" - self.print_step("7", test_step) + self.print_step("8", test_step) if self.is_ci: await self.send_single_cmd(cmd=Clusters.Objects.RvcRunMode.Commands.ChangeToMode(newMode=1), endpoint=self.endpoint) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") - await self.send_cmd_select_areas_expect_response(step=10, new_areas=[valid_area_id], expected_response=Clusters.ServiceArea.Enums.SelectAreasStatus.kInvalidInMode) + await self.send_cmd_select_areas_expect_response(step=9, new_areas=valid_areas, expected_response=Clusters.ServiceArea.Enums.SelectAreasStatus.kInvalidInMode) if self.check_pics("SEAR.S.M.VALID_STATE_FOR_SELECT_AREAS") and self.check_pics("SEAR.S.M.HAS_MANUAL_SELAREA_STATE_CONTROL"): - test_step = f"Manually intervene to put the device in a state that allows it to execute the SelectAreas({supported_area_ids}) command" - self.print_step("9", test_step) + test_step = f"Manually intervene to put the device in a state that allows it to execute the SelectAreas({valid_areas}) command" + self.print_step("10", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "Reset"}') + self.write_to_app_pipe({"Name": "Reset"}) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") - await self.send_cmd_select_areas_expect_response(step=11, new_areas=supported_area_ids, expected_response=Clusters.ServiceArea.Enums.SelectAreasStatus.kSuccess) + await self.send_cmd_select_areas_expect_response(step=11, new_areas=valid_areas, expected_response=Clusters.ServiceArea.Enums.SelectAreasStatus.kSuccess) selected_areas = await self.read_selected_areas(step=12) - asserts.assert_true(len(selected_areas) == len(supported_area_ids), - f"SelectedAreas({selected_areas}) should match SupportedAreas({supported_area_ids})") + asserts.assert_true(selected_areas == valid_areas, + f"SelectedAreas({selected_areas}) should match SupportedAreas({valid_areas})") - await self.send_cmd_select_areas_expect_response(step=13, new_areas=supported_area_ids, expected_response=Clusters.ServiceArea.Enums.SelectAreasStatus.kSuccess) + await self.send_cmd_select_areas_expect_response(step=13, new_areas=valid_areas, expected_response=Clusters.ServiceArea.Enums.SelectAreasStatus.kSuccess) if self.check_pics("SEAR.S.M.VALID_STATE_FOR_SELECT_AREAS") and self.check_pics("SEAR.S.M.HAS_MANUAL_SELAREA_STATE_CONTROL") and self.check_pics("SEAR.S.M.SELECT_AREAS_WHILE_NON_IDLE"): - test_step = f"Manually intervene to put the device in a state that allows it to execute the SelectAreas({valid_area_id}) command, and put the device in a non-idle state" + test_step = f"Manually intervene to put the device in a state that allows it to execute the SelectAreas({valid_areas}) command, and put the device in a non-idle state" self.print_step("14", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "Reset"}') + self.write_to_app_pipe({"Name": "Reset"}) await self.send_single_cmd(cmd=Clusters.Objects.RvcRunMode.Commands.ChangeToMode(newMode=1), endpoint=self.endpoint) else: self.wait_for_user_input(prompt_msg=f"{test_step}, and press Enter when done.\n") if self.check_pics("SEAR.S.F00"): - await self.send_cmd_select_areas_expect_response(step=15, new_areas=[valid_area_id], expected_response=Clusters.ServiceArea.Enums.SelectAreasStatus.kSuccess) + await self.send_cmd_select_areas_expect_response(step=15, new_areas=valid_areas, expected_response=Clusters.ServiceArea.Enums.SelectAreasStatus.kSuccess) else: - await self.send_cmd_select_areas_expect_response(step=15, new_areas=[valid_area_id], expected_response=Clusters.ServiceArea.Enums.SelectAreasStatus.kInvalidInMode) + await self.send_cmd_select_areas_expect_response(step=15, new_areas=valid_areas, expected_response=Clusters.ServiceArea.Enums.SelectAreasStatus.kInvalidInMode) if __name__ == "__main__": diff --git a/src/python_testing/TC_SEAR_1_5.py b/src/python_testing/TC_SEAR_1_5.py index a90c1feaf9c329..50b9080dff08c2 100644 --- a/src/python_testing/TC_SEAR_1_5.py +++ b/src/python_testing/TC_SEAR_1_5.py @@ -29,7 +29,6 @@ # === END CI TEST ARGUMENTS === import logging -from time import sleep import chip.clusters as Clusters from chip.clusters.Types import NullValue @@ -89,15 +88,6 @@ async def send_cmd_skip_area_expect_response(self, step, skipped_area, expected_ expected_response, f"Command response ({ret.status}) doesn't match the expected one") - # Sends and out-of-band command to the rvc-app - - def write_to_app_pipe(self, command): - with open(self.app_pipe, "w") as app_pipe: - app_pipe.write(command + "\n") - # Allow some time for the command to take effect. - # This removes the test flakiness which is very annoying for everyone in CI. - sleep(0.001) - def TC_SEAR_1_5(self) -> list[str]: return ["SEAR.S", "SEAR.S.C02.Rsp"] @@ -116,7 +106,7 @@ async def test_TC_SEAR_1_5(self): # Ensure that the device is in the correct state if self.is_ci: - self.write_to_app_pipe('{"Name": "Reset"}') + self.write_to_app_pipe({"Name": "Reset"}) supported_area_ids = await self.read_supported_areas(step=2) asserts.assert_true(len(supported_area_ids) > 0, "SupportedAreas is empty") @@ -150,7 +140,7 @@ async def test_TC_SEAR_1_5(self): test_step = "Manually intervene to put the device in a state that allows it to execute the SkipArea command" self.print_step("7", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "Reset"}') + self.write_to_app_pipe({"Name": "Reset"}) await self.send_single_cmd(cmd=Clusters.Objects.ServiceArea.Commands.SelectAreas(newAreas=[7, 1234567]), endpoint=self.endpoint) await self.send_single_cmd(cmd=Clusters.Objects.RvcRunMode.Commands.ChangeToMode(newMode=1), @@ -234,7 +224,7 @@ async def test_TC_SEAR_1_5(self): test_step = "Manually intervene to put the device in a state that allows it to execute the SkipArea command" self.print_step("18", test_step) if self.is_ci: - self.write_to_app_pipe('{"Name": "Reset"}') + self.write_to_app_pipe({"Name": "Reset"}) await self.send_single_cmd(cmd=Clusters.Objects.ServiceArea.Commands.SelectAreas(newAreas=[7, 1234567]), endpoint=self.endpoint) await self.send_single_cmd(cmd=Clusters.Objects.RvcRunMode.Commands.ChangeToMode(newMode=1), diff --git a/src/python_testing/TC_SEAR_1_6.py b/src/python_testing/TC_SEAR_1_6.py index aaa6ac788dd427..8e94971c8bc599 100644 --- a/src/python_testing/TC_SEAR_1_6.py +++ b/src/python_testing/TC_SEAR_1_6.py @@ -29,7 +29,6 @@ # === END CI TEST ARGUMENTS === import logging -from time import sleep import chip.clusters as Clusters from chip.clusters.Types import NullValue @@ -72,14 +71,6 @@ async def read_progress(self, step): return progress - # Sends and out-of-band command to the rvc-app - def write_to_app_pipe(self, command): - with open(self.app_pipe, "w") as app_pipe: - app_pipe.write(command + "\n") - # Allow some time for the command to take effect. - # This removes the test flakiness which is very annoying for everyone in CI. - sleep(0.001) - def TC_SEAR_1_6(self) -> list[str]: return ["SEAR.S", "SEAR.S.A0005", "SEAR.S.A0000", "SEAR.S.A0002", "SEAR.S.M.HAS_MANUAL_OPERATING_STATE_CONTROL"] @@ -98,7 +89,7 @@ async def test_TC_SEAR_1_6(self): # Ensure that the device is in the correct state if self.is_ci: - self.write_to_app_pipe('{"Name": "Reset"}') + self.write_to_app_pipe({"Name": "Reset"}) test_step = "Manually intervene to put the device in the idle state and ensure SupportedAreas and SelectedAreas are not empty" self.print_step("2", test_step) diff --git a/src/python_testing/TC_SWTCH.py b/src/python_testing/TC_SWTCH.py index d6c4694560b16d..3d369be456962d 100644 --- a/src/python_testing/TC_SWTCH.py +++ b/src/python_testing/TC_SWTCH.py @@ -18,13 +18,35 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 +# test-runner-runs: run1 run2 run3 run4 +# # test-runner-run/run1/app: ${ALL_CLUSTERS_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True # test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --PICS src/app/tests/suites/certification/ci-pics-values +# test-runner-run/run1/script-args: --endpoint 1 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --PICS src/app/tests/suites/certification/ci-pics-values +# +# test-runner-run/run2/app: ${ALL_CLUSTERS_APP} +# test-runner-run/run2/factoryreset: True +# test-runner-run/run2/quiet: True +# test-runner-run/run2/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# test-runner-run/run2/script-args: --endpoint 2 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --PICS src/app/tests/suites/certification/ci-pics-values +# +# test-runner-run/run3/app: ${ALL_CLUSTERS_APP} +# test-runner-run/run3/factoryreset: True +# test-runner-run/run3/quiet: True +# test-runner-run/run3/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# test-runner-run/run3/script-args: --endpoint 3 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --PICS src/app/tests/suites/certification/ci-pics-values +# +# test-runner-run/run4/app: ${ALL_CLUSTERS_APP} +# test-runner-run/run4/factoryreset: True +# test-runner-run/run4/quiet: True +# test-runner-run/run4/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# test-runner-run/run4/script-args: --endpoint 4 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto --PICS src/app/tests/suites/certification/ci-pics-values +# # === END CI TEST ARGUMENTS === +# +# These tests run on every endpoint regardless of whether a switch is present because they are set up to auto-select. import json import logging @@ -38,12 +60,15 @@ from chip.clusters import ClusterObjects as ClusterObjects from chip.clusters.Attribute import EventReadResult from chip.tlv import uint -from matter_testing_support import (ClusterAttributeChangeAccumulator, EventChangeCallback, MatterBaseTest, TestStep, - await_sequence_of_reports, default_matter_test_main, has_feature, per_endpoint_test) +from matter_testing_support import (AttributeValue, ClusterAttributeChangeAccumulator, EventChangeCallback, MatterBaseTest, + TestStep, await_sequence_of_reports, default_matter_test_main, has_feature, + run_if_endpoint_matches) from mobly import asserts logger = logging.getLogger(__name__) +SIMULATED_LONG_PRESS_LENGTH_SECONDS = 2.0 + def bump_substep(step: str) -> str: """Given a string like "5a", bump it to "5b", or "6c" to "6d" """ @@ -68,6 +93,10 @@ def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self._default_pressed_position = self.user_params.get("default_pressed_position", 1) + def setup_test(self): + super().setup_test() + self.is_ci = self._use_button_simulator() + def _send_named_pipe_command(self, command_dict: dict[str, Any]): app_pid = self.matter_test_config.app_pid if app_pid == 0: @@ -94,16 +123,23 @@ def _send_multi_press_named_pipe_command(self, endpoint_id: int, number_of_press def _send_long_press_named_pipe_command(self, endpoint_id: int, pressed_position: int, feature_map: int): command_dict = {"Name": "SimulateLongPress", "EndpointId": endpoint_id, - "ButtonId": pressed_position, "LongPressDelayMillis": 5000, "LongPressDurationMillis": 5500, "FeatureMap": feature_map} + "ButtonId": pressed_position, "LongPressDelayMillis": int(1000 * (SIMULATED_LONG_PRESS_LENGTH_SECONDS - 0.5)), + "LongPressDurationMillis": int(1000 * SIMULATED_LONG_PRESS_LENGTH_SECONDS), "FeatureMap": feature_map} self._send_named_pipe_command(command_dict) def _send_latching_switch_named_pipe_command(self, endpoint_id: int, new_position: int): command_dict = {"Name": "SimulateLatchPosition", "EndpointId": endpoint_id, "PositionId": new_position} self._send_named_pipe_command(command_dict) - def _ask_for_switch_idle(self): + def _send_switch_idle_named_pipe_command(self, endpoint_id: int): + command_dict = {"Name": "SimulateSwitchIdle", "EndpointId": endpoint_id} + self._send_named_pipe_command(command_dict) + + def _ask_for_switch_idle(self, endpoint_id: int, omit_for_simulator: bool = False): if not self._use_button_simulator(): self.wait_for_user_input(prompt_msg="Ensure switch is idle") + elif not omit_for_simulator: + self._send_switch_idle_named_pipe_command(endpoint_id) def _ask_for_switch_position(self, endpoint_id: int, new_position: int): if not self._use_button_simulator(): @@ -168,7 +204,9 @@ def _ask_for_release(self): prompt_msg="Release the button." ) else: - time.sleep(self.keep_pressed_delay/1000) + # This will await for the events to be generated properly. Note that there is a bit of a + # race here for the button simulator, but this race is extremely unlikely to be lost. + time.sleep(SIMULATED_LONG_PRESS_LENGTH_SECONDS + 0.5) def _await_sequence_of_events(self, event_queue: queue.Queue, endpoint_id: int, sequence: list[ClusterObjects.ClusterEvent], timeout_sec: float): start_time = time.time() @@ -248,37 +286,43 @@ def _received_event(self, event_listener: EventChangeCallback, target_event: Clu def steps_TC_SWTCH_2_2(self): return [TestStep(1, test_plan_support.commission_if_required(), "", is_commissioning=True), - TestStep(2, "Set up subscription to all events of Switch cluster on the endpoint"), + TestStep(2, "Set up subscription to all events and attributes of Switch cluster on the endpoint"), TestStep(3, "Operator sets switch to first position on the DUT"), - TestStep(4, "TH reads the CurrentPosition attribute from the DUT", "Verify that the value is 0"), + TestStep(4, "TH reads the CurrentPosition attribute from the DUT.", "Verify that the value is 0."), TestStep(5, "Operator sets switch to second position (one) on the DUT", - "Verify that the TH receives SwitchLatched event with NewPosition set to 1 from the DUT"), - TestStep(6, "TH reads the CurrentPosition attribute from the DUT", "Verify that the value is 1"), + "Verify that the TH receives SwitchLatched event with NewPosition set to 1 from the DUT."), + TestStep(6, "TH reads the CurrentPosition attribute from the DUT", + "Verify that the value is 1, and that a subscription report was received for that change."), TestStep(7, "If there are more than 2 positions, test subsequent positions of the DUT"), TestStep(8, "Operator sets switch to first position on the DUT."), TestStep(9, "Wait 10 seconds for event reports stable." "Verify that last SwitchLatched event received is for NewPosition 0."), - TestStep(10, "TH reads the CurrentPosition attribute from the DUT", "Verify that the value is 0"), + TestStep(10, "TH reads the CurrentPosition attribute from the DUT", + "Verify that the value is 0, and that a subscription report was received for that change."), ] - @per_endpoint_test(has_feature(Clusters.Switch, Clusters.Switch.Bitmaps.Feature.kLatchingSwitch)) + @run_if_endpoint_matches(has_feature(Clusters.Switch, Clusters.Switch.Bitmaps.Feature.kLatchingSwitch)) async def test_TC_SWTCH_2_2(self): post_prompt_settle_delay_seconds = 10.0 + cluster = Clusters.Switch + endpoint_id = self.matter_test_config.endpoint # Step 1: Commissioning - already done self.step(1) - cluster = Clusters.Switch - endpoint_id = self.matter_test_config.endpoint - # Step 2: Set up subscription to all events of Switch cluster on the endpoint. self.step(2) event_listener = EventChangeCallback(cluster) await event_listener.start(self.default_controller, self.dut_node_id, endpoint=endpoint_id) + attrib_listener = ClusterAttributeChangeAccumulator(cluster) + await attrib_listener.start(self.default_controller, self.dut_node_id, endpoint=endpoint_id) + + # Pre-get number of positions for step 7 later. + num_positions = await self.read_single_attribute_check_success(cluster=cluster, attribute=cluster.Attributes.NumberOfPositions) + asserts.assert_greater(num_positions, 1, "Latching switch has only 1 position, this is impossible.") # Step 3: Operator sets switch to first position on the DUT. self.step(3) self._ask_for_switch_position(endpoint_id, new_position=0) - event_listener.flush_events() # Step 4: TH reads the CurrentPosition attribute from the DUT. # Verify that the value is 0. @@ -286,25 +330,39 @@ async def test_TC_SWTCH_2_2(self): button_val = await self.read_single_attribute_check_success(cluster=cluster, attribute=cluster.Attributes.CurrentPosition) asserts.assert_equal(button_val, 0, "Switch position value is not 0") - # Step 5: Operator sets switch to second position (one) on the DUT", - # Verify that the TH receives SwitchLatched event with NewPosition set to 1 from the DUT - self.step(5) - expected_switch_position = 1 - self._ask_for_switch_position(endpoint_id, expected_switch_position) - - data = event_listener.wait_for_event_report(cluster.Events.SwitchLatched, timeout_sec=post_prompt_settle_delay_seconds) - logging.info(f"-> SwitchLatched event last received: {data}") - asserts.assert_equal(data, cluster.Events.SwitchLatched( - newPosition=expected_switch_position), "Did not get expected switch position") - - # Step 6: TH reads the CurrentPosition attribute from the DUT", "Verify that the value is 1 - self.step(6) - button_val = await self.read_single_attribute_check_success(cluster=cluster, attribute=cluster.Attributes.CurrentPosition) - asserts.assert_equal(button_val, expected_switch_position, f"Switch position is not {expected_switch_position}") - - # Step 7: If there are more than 2 positions, test subsequent positions of the DUT - # # TODO(#34656): Implement loop for > 2 total positions - self.skip_step(7) + attrib_listener.reset() + event_listener.reset() + + for expected_switch_position in range(1, num_positions): + # Step 5: Operator sets switch to second position (one) on the DUT", + # Verify that the TH receives SwitchLatched event with NewPosition set to 1 from the DUT + if expected_switch_position == 1: + self.step(5) + self._ask_for_switch_position(endpoint_id, expected_switch_position) + + data = event_listener.wait_for_event_report(cluster.Events.SwitchLatched, timeout_sec=post_prompt_settle_delay_seconds) + logging.info(f"-> SwitchLatched event last received: {data}") + asserts.assert_equal(data, cluster.Events.SwitchLatched( + newPosition=expected_switch_position), "Did not get expected switch position") + + # Step 6: TH reads the CurrentPosition attribute from the DUT", "Verify that the value is 1 + if expected_switch_position == 1: # Indicate step 7 only once + self.step(6) + button_val = await self.read_single_attribute_check_success(cluster=cluster, attribute=cluster.Attributes.CurrentPosition) + asserts.assert_equal(button_val, expected_switch_position, f"Switch position is not {expected_switch_position}") + logging.info(f"Checking to see if a report for {expected_switch_position} is received") + attrib_listener.await_sequence_of_reports(attribute=cluster.Attributes.CurrentPosition, sequence=[ + expected_switch_position], timeout_sec=post_prompt_settle_delay_seconds) + + # Step 7: If there are more than 2 positions, test subsequent positions of the DUT + if expected_switch_position == 1: + if num_positions > 2: # Indicate step 7 only once + self.step(7) + else: + self.skip_step(7) + + if num_positions > 2: + logging.info("Looping for the other positions") # Step 8: Operator sets switch to first position on the DUT. self.step(8) @@ -314,7 +372,7 @@ async def test_TC_SWTCH_2_2(self): # Step 9: Wait 10 seconds for event reports stable. # Verify that last SwitchLatched event received is for NewPosition 0. self.step(9) - time.sleep(10.0) + time.sleep(10.0 if not self.is_ci else 1.0) expected_switch_position = 0 last_event = event_listener.get_last_event() @@ -327,15 +385,21 @@ async def test_TC_SWTCH_2_2(self): # Step 10: TH reads the CurrentPosition attribute from the DUT. # Verify that the value is 0 self.step(10) + button_val = await self.read_single_attribute_check_success(cluster=cluster, attribute=cluster.Attributes.CurrentPosition) asserts.assert_equal(button_val, 0, "Button value is not 0") + logging.info(f"Checking to see if a report for {expected_switch_position} is received") + expected_final_value = [AttributeValue( + endpoint_id, attribute=cluster.Attributes.CurrentPosition, value=expected_switch_position)] + attrib_listener.await_all_final_values_reported(expected_final_value, timeout_sec=post_prompt_settle_delay_seconds) + def steps_TC_SWTCH_2_3(self): return [TestStep(1, test_plan_support.commission_if_required(), "", is_commissioning=True), TestStep(2, "Set up subscription to all events of Switch cluster on the endpoint"), TestStep(3, "Operator does not operate switch on the DUT"), TestStep(4, "TH reads the CurrentPosition attribute from the DUT", "Verify that the value is 0"), - TestStep(5, "Operator operates switch (keep it pressed)", + TestStep(5, "Operator operates switch (keep it pressed, and wait at least 5 seconds)", "Verify that the TH receives InitialPress event with NewPosition set to 1 on the DUT"), TestStep(6, "TH reads the CurrentPosition attribute from the DUT", "Verify that the value is 1"), TestStep(7, "Operator releases switch on the DUT"), @@ -346,7 +410,7 @@ def steps_TC_SWTCH_2_3(self): TestStep(9, "TH reads the CurrentPosition attribute from the DUT", "Verify that the value is 0"), ] - @per_endpoint_test(has_feature(Clusters.Switch, Clusters.Switch.Bitmaps.Feature.kMomentarySwitch)) + @run_if_endpoint_matches(has_feature(Clusters.Switch, Clusters.Switch.Bitmaps.Feature.kMomentarySwitch)) async def test_TC_SWTCH_2_3(self): # Commissioning - already done self.step(1) @@ -364,7 +428,7 @@ async def test_TC_SWTCH_2_3(self): await event_listener.start(self.default_controller, self.dut_node_id, endpoint=endpoint_id) self.step(3) - self._ask_for_switch_idle() + self._ask_for_switch_idle(endpoint_id) self.step(4) button_val = await self.read_single_attribute_check_success(cluster=cluster, attribute=cluster.Attributes.CurrentPosition) @@ -373,7 +437,6 @@ async def test_TC_SWTCH_2_3(self): self.step(5) # We're using a long press here with a very long duration (in computer-land). This will let us check the intermediate values. # This is 1s larger than the subscription ceiling - self.keep_pressed_delay = 6000 self.pressed_position = 1 self._ask_for_keep_pressed(endpoint_id, self.pressed_position, feature_map) event_listener.wait_for_event_report(cluster.Events.InitialPress) @@ -412,20 +475,20 @@ def desc_TC_SWTCH_2_4(self) -> str: def steps_TC_SWTCH_2_4(self): return [TestStep(1, test_plan_support.commission_if_required(), "", is_commissioning=True), - TestStep(2, "Set up subscription to all events of Switch cluster on the endpoint"), + TestStep(2, "Set up subscription to all events and attributes of Switch cluster on the endpoint"), TestStep(3, "Operator does not operate switch on the DUT"), TestStep(4, "TH reads the CurrentPosition attribute from the DUT", "Verify that the value is 0"), - TestStep(5, "Operator operates switch (keep pressed for long time, e.g. 5 seconds) on the DUT, the release it", + TestStep(5, "Operator operates switch (keep pressed for long time, e.g. 5 seconds) on the DUT, then release it", """ * TH expects receiving a subscription report of CurrentPosition 1, followed by a report of Current Position 0. * TH expects receiving at InitialPress event with NewPosition = 1. - * if MSL or AS feature is supported, TH expect receiving LongPress/LongRelease in that order. - * if MS & (!MSL & !AS & !MSR) features present, TH expects receiving no further events for 10 seconds after release. + * if MSL feature is supported, TH expect receiving LongPress/LongRelease in that order. + * if MS & (!MSL & !AS & !MSR & !MSM) features present, TH expects receiving no further events for 10 seconds after release. * if (MSR & !MSL) features present, TH expects receiving ShortRelease event. """) ] - @per_endpoint_test(has_feature(Clusters.Switch, Clusters.Switch.Bitmaps.Feature.kMomentarySwitch)) + @run_if_endpoint_matches(has_feature(Clusters.Switch, Clusters.Switch.Bitmaps.Feature.kMomentarySwitch)) async def test_TC_SWTCH_2_4(self): switch_pressed_position = self._default_pressed_position post_prompt_settle_delay_seconds = 10.0 @@ -442,22 +505,23 @@ async def test_TC_SWTCH_2_4(self): has_ms_feature = (feature_map & cluster.Bitmaps.Feature.kMomentarySwitch) != 0 has_msr_feature = (feature_map & cluster.Bitmaps.Feature.kMomentarySwitchRelease) != 0 has_msl_feature = (feature_map & cluster.Bitmaps.Feature.kMomentarySwitchLongPress) != 0 + has_msm_feature = (feature_map & cluster.Bitmaps.Feature.kMomentarySwitchMultiPress) != 0 has_as_feature = (feature_map & cluster.Bitmaps.Feature.kActionSwitch) != 0 if not has_ms_feature: logging.info("Skipping rest of test: SWTCH.S.F01(MS) feature not present") self.skip_all_remaining_steps("2") - # Step 2: Set up subscription to all events of Switch cluster on the endpoint + # Step 2: Set up subscription to all events and attributes of Switch cluster on the endpoint self.step(2) event_listener = EventChangeCallback(cluster) - attrib_listener = ClusterAttributeChangeAccumulator(cluster) await event_listener.start(self.default_controller, self.dut_node_id, endpoint=endpoint_id) + attrib_listener = ClusterAttributeChangeAccumulator(cluster) await attrib_listener.start(self.default_controller, self.dut_node_id, endpoint=endpoint_id) # Step 3: Operator does not operate switch on the DUT self.step(3) - self._ask_for_switch_idle() + self._ask_for_switch_idle(endpoint_id) # Step 4: TH reads the CurrentPosition attribute from the DUT self.step(4) @@ -482,9 +546,9 @@ async def test_TC_SWTCH_2_4(self): self._await_sequence_of_events(event_queue=event_listener.event_queue, endpoint_id=endpoint_id, sequence=expected_events, timeout_sec=post_prompt_settle_delay_seconds) - # - if MSL or AS feature is supported, expect to see LongPress/LongRelease in that order. - if not has_msl_feature and not has_as_feature: - logging.info("Since MSL and AS features both unsupported, skipping check for LongPress/LongRelease") + # - if MSL feature is supported, expect to see LongPress/LongRelease in that order. + if not has_msl_feature: + logging.info("Since MSL feature unsupported, skipping check for LongPress/LongRelease") else: # - TH expects report of LongPress, LongRelease in that order. logging.info(f"Starting to wait for {post_prompt_settle_delay_seconds:.1f} seconds for LongPress then LongRelease.") @@ -494,8 +558,8 @@ async def test_TC_SWTCH_2_4(self): self._await_sequence_of_events(event_queue=event_listener.event_queue, endpoint_id=endpoint_id, sequence=expected_events, timeout_sec=post_prompt_settle_delay_seconds) - # - if MS & (!MSL & !AS & !MSR) features present, expect no further events for 10 seconds after release. - if not has_msl_feature and not has_as_feature and not has_msr_feature: + # - if MS & (!MSL & !AS & !MSR & !MSM) features present, expect no further events for 10 seconds after release. + if not has_msl_feature and not has_as_feature and not has_msr_feature and not has_msm_feature: self._expect_no_events_for_cluster(event_queue=event_listener.event_queue, endpoint_id=endpoint_id, expected_cluster=cluster, timeout_sec=10.0) @@ -534,13 +598,13 @@ def steps_TC_SWTCH_2_5(self): TestStep("6b", "Operator repeat step 4a 3 times quickly", """ * Verify that the TH receives InitialPress event with NewPosition set to 1 from the DUT - * Verify that the TH receives ShortRelease event with PreviousPosition set to 1 from the DUT + * If MSR supported, Verify that the TH receives ShortRelease event with PreviousPosition set to 1 from the DUT * Verify that the TH receives InitialPress event with NewPosition set to 1 from the DUT * Verify that the TH receives MultiPressOngoing event with NewPosition set to 1 and CurrentNumberOfPressesCounted set to 2 from the DUT - * Verify that the TH receives ShortRelease event with PreviousPosition set to 1 from the DUT + * If MSR supported, Verify that the TH receives ShortRelease event with PreviousPosition set to 1 from the DUT * Verify that the TH receives InitialPress event with NewPosition set to 1 from the DUT * Verify that the TH receives MultiPressOngoing event with NewPosition set to 1 and CurrentNumberOfPressesCounted set to 3 from the DUT - * Verify that the TH receives ShortRelease event with PreviousPosition set to 1 from the DUT + + * If MSR supported, Verify that the TH receives ShortRelease event with PreviousPosition set to 1 from the DUT + The events sequence from the subscription SHALL follow the same sequence as expressed above, in the exact order of events specified. """), @@ -557,11 +621,11 @@ def steps_TC_SWTCH_2_5(self): """ * Verify that the TH receives InitialPress event with NewPosition set to 1 from the DUT - * Verify that the TH receives ShortRelease event with PreviousPosition set to 1 from the DUT + * If MSR supported, Verify that the TH receives ShortRelease event with PreviousPosition set to 1 from the DUT * Verify that the TH receives InitialPress event with NewPosition set to 1 from the DUT * Verify that the TH receives MultiPressOngoing event with NewPosition set to 1 and CurrentNumberOfPressesCounted set to 2 from the DUT - * Verify that the TH receives ShortRelease event with PreviousPosition set to 1 from the DUT + * If MSR supported, verify that the TH receives ShortRelease event with PreviousPosition set to 1 from the DUT * Verify that the TH does not receive LongPress event from the DUT * Verify that the TH does not receive LongRelease event from the DUT @@ -582,7 +646,7 @@ def steps_TC_SWTCH_2_5(self): * Verify that the TH receives (one, not more than one) LongPress event with NewPosition set to 1 from the DUT * Verify that the TH receives LongRelease event with PreviousPosition set to 1 from the DUT * Verify that the TH receives InitialPress event with NewPosition set to 1 from the DUT - * Verify that the TH receives ShortRelease event with PreviousPosition set to 1 from the DUT + * If MSR supported, verify that the TH receives ShortRelease event with PreviousPosition set to 1 from the DUT * Verify that the TH does not receive MultiPressOngoing event from the DUT The events sequence from the subscription SHALL follow the same sequence as expressed above, in the exact order of events specified. @@ -595,10 +659,10 @@ def steps_TC_SWTCH_2_5(self): @staticmethod def should_run_SWTCH_2_5(wildcard, endpoint): msm = has_feature(Clusters.Switch, Clusters.Switch.Bitmaps.Feature.kMomentarySwitchMultiPress) - asf = has_feature(Clusters.Switch, 0x20) + asf = has_feature(Clusters.Switch, Clusters.Switch.Bitmaps.Feature.kActionSwitch) return msm(wildcard, endpoint) and not asf(wildcard, endpoint) - @per_endpoint_test(should_run_SWTCH_2_5) + @run_if_endpoint_matches(should_run_SWTCH_2_5) async def test_TC_SWTCH_2_5(self): # Commissioning - already done self.step(1) @@ -606,6 +670,7 @@ async def test_TC_SWTCH_2_5(self): cluster = Clusters.Switch feature_map = await self.read_single_attribute_check_success(cluster, attribute=cluster.Attributes.FeatureMap) has_msl_feature = (feature_map & cluster.Bitmaps.Feature.kMomentarySwitchLongPress) + has_msr_feature = (feature_map & cluster.Bitmaps.Feature.kMomentarySwitchRelease) multi_press_max = await self.read_single_attribute_check_success(cluster, attribute=cluster.Attributes.MultiPressMax) endpoint_id = self.matter_test_config.endpoint @@ -616,7 +681,7 @@ async def test_TC_SWTCH_2_5(self): await event_listener.start(self.default_controller, self.dut_node_id, endpoint=endpoint_id) self.step(3) - self._ask_for_switch_idle() + self._ask_for_switch_idle(endpoint_id) def test_multi_press_sequence(starting_step: str, count: int, short_long: bool = False): step = starting_step @@ -636,12 +701,13 @@ def test_multi_press_sequence(starting_step: str, count: int, short_long: bool = asserts.assert_equal(event.newPosition, pressed_position, "Unexpected NewPosition on MultiPressOngoing") asserts.assert_equal(event.currentNumberOfPressesCounted, pos_idx + 1, "Unexpected CurrentNumberOfPressesCounted on MultiPressOngoing") - event = event_listener.wait_for_event_report(cluster.Events.ShortRelease) - asserts.assert_equal(event.previousPosition, pressed_position, "Unexpected PreviousPosition on ShortRelease") + if has_msr_feature: + event = event_listener.wait_for_event_report(cluster.Events.ShortRelease) + asserts.assert_equal(event.previousPosition, pressed_position, "Unexpected PreviousPosition on ShortRelease") step = bump_substep(step) self.step(step) - self._ask_for_switch_idle() + self._ask_for_switch_idle(endpoint_id, omit_for_simulator=True) event = event_listener.wait_for_event_report(cluster.Events.MultiPressComplete) asserts.assert_equal(event.previousPosition, pressed_position, "Unexpected PreviousPosition on MultiPressComplete") asserts.assert_equal(event.totalNumberOfPressesCounted, count, "Unexpected count on MultiPressComplete") @@ -683,13 +749,15 @@ def test_multi_press_sequence(starting_step: str, count: int, short_long: bool = event = event_listener.wait_for_event_report(cluster.Events.InitialPress) asserts.assert_equal(event.newPosition, pressed_position, "Unexpected NewPosition on InitialEvent") - event = event_listener.wait_for_event_report(cluster.Events.ShortRelease) - asserts.assert_equal(event.previousPosition, pressed_position, "Unexpected PreviousPosition on ShortRelease") + + if has_msr_feature: + event = event_listener.wait_for_event_report(cluster.Events.ShortRelease) + asserts.assert_equal(event.previousPosition, pressed_position, "Unexpected PreviousPosition on ShortRelease") # Because this is a queue, we verify that no multipress ongoing is received by verifying that the next event is the multipress complete self.step("9b") - self._ask_for_switch_idle() + self._ask_for_switch_idle(endpoint_id, omit_for_simulator=True) event = event_listener.wait_for_event_report(cluster.Events.MultiPressComplete) asserts.assert_equal(event.previousPosition, pressed_position, "Unexpected PreviousPosition on MultiPressComplete") asserts.assert_equal(event.totalNumberOfPressesCounted, 1, "Unexpected count on MultiPressComplete") @@ -773,7 +841,7 @@ def should_run_SWTCH_2_6(wildcard, endpoint): asf = has_feature(Clusters.Switch, 0x20) return msm(wildcard, endpoint) and asf(wildcard, endpoint) - @per_endpoint_test(should_run_SWTCH_2_6) + @run_if_endpoint_matches(should_run_SWTCH_2_6) async def test_TC_SWTCH_2_6(self): # Commissioning - already done self.step(1) @@ -791,7 +859,7 @@ async def test_TC_SWTCH_2_6(self): await event_listener.start(self.default_controller, self.dut_node_id, endpoint=endpoint_id) self.step(3) - self._ask_for_switch_idle() + self._ask_for_switch_idle(endpoint_id) def test_multi_press_sequence(starting_step: str, count: int, short_long: bool = False): step = starting_step @@ -809,7 +877,7 @@ def test_multi_press_sequence(starting_step: str, count: int, short_long: bool = step = bump_substep(step) self.step(step) - self._ask_for_switch_idle() + self._ask_for_switch_idle(endpoint_id, omit_for_simulator=True) event = event_listener.wait_for_event_report(cluster.Events.MultiPressComplete) asserts.assert_equal(event.previousPosition, pressed_position, "Unexpected PreviousPosition on MultiPressComplete") expected_count = 0 if count > multi_press_max else count @@ -849,7 +917,7 @@ def test_multi_press_sequence(starting_step: str, count: int, short_long: bool = # Verify that we don't receive the multi-press ongoing or short release by verifying that the next event in the sequence is the multi-press complete self.step("9b") - self._ask_for_switch_idle() + self._ask_for_switch_idle(endpoint_id, omit_for_simulator=True) event = event_listener.wait_for_event_report(cluster.Events.MultiPressComplete) asserts.assert_equal(event.previousPosition, pressed_position, "Unexpected PreviousPosition on MultiPressComplete") asserts.assert_equal(event.totalNumberOfPressesCounted, 1, "Unexpected count on MultiPressComplete") diff --git a/src/python_testing/TC_TIMESYNC_2_1.py b/src/python_testing/TC_TIMESYNC_2_1.py index 1cfb22e17c7fc8..0f2fdba4d603f5 100644 --- a/src/python_testing/TC_TIMESYNC_2_1.py +++ b/src/python_testing/TC_TIMESYNC_2_1.py @@ -24,7 +24,7 @@ # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True # test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json -# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# test-runner-run/run1/script-args: --endpoint 0 --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --PICS src/app/tests/suites/certification/ci-pics-values --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === import ipaddress @@ -32,7 +32,7 @@ import chip.clusters as Clusters from chip.clusters.Types import NullValue -from matter_testing_support import (MatterBaseTest, default_matter_test_main, has_attribute, has_cluster, per_endpoint_test, +from matter_testing_support import (MatterBaseTest, default_matter_test_main, has_attribute, has_cluster, run_if_endpoint_matches, utc_time_in_matter_epoch) from mobly import asserts @@ -42,7 +42,7 @@ async def read_ts_attribute_expect_success(self, attribute): cluster = Clusters.Objects.TimeSynchronization return await self.read_single_attribute_check_success(endpoint=None, cluster=cluster, attribute=attribute) - @per_endpoint_test(has_cluster(Clusters.TimeSynchronization) and has_attribute(Clusters.TimeSynchronization.Attributes.TimeSource)) + @run_if_endpoint_matches(has_cluster(Clusters.TimeSynchronization) and has_attribute(Clusters.TimeSynchronization.Attributes.TimeSource)) async def test_TC_TIMESYNC_2_1(self): attributes = Clusters.TimeSynchronization.Attributes features = await self.read_ts_attribute_expect_success(attribute=attributes.FeatureMap) diff --git a/src/python_testing/TC_TSTAT_4_2.py b/src/python_testing/TC_TSTAT_4_2.py index 563d6f3f2eddfc..67a7a16ea5290d 100644 --- a/src/python_testing/TC_TSTAT_4_2.py +++ b/src/python_testing/TC_TSTAT_4_2.py @@ -28,6 +28,7 @@ import copy import logging +import random import chip.clusters as Clusters from chip import ChipDeviceCtrl # Needed before chip.FabricAdmin @@ -42,21 +43,6 @@ cluster = Clusters.Thermostat -initial_presets = [] -initial_presets.append(cluster.Structs.PresetStruct(presetHandle=b'\x01', presetScenario=cluster.Enums.PresetScenarioEnum.kOccupied, - name=None, coolingSetpoint=2500, heatingSetpoint=2100, builtIn=True)) -initial_presets.append(cluster.Structs.PresetStruct(presetHandle=b'\x02', presetScenario=cluster.Enums.PresetScenarioEnum.kUnoccupied, - name=None, coolingSetpoint=2600, heatingSetpoint=2000, builtIn=True)) - -new_presets = initial_presets.copy() -new_presets.append(cluster.Structs.PresetStruct(presetHandle=NullValue, presetScenario=cluster.Enums.PresetScenarioEnum.kSleep, - name="Sleep", coolingSetpoint=2700, heatingSetpoint=1900, builtIn=False)) - -new_presets_with_handle = initial_presets.copy() -new_presets_with_handle.append(cluster.Structs.PresetStruct( - presetHandle=b'\x03', presetScenario=cluster.Enums.PresetScenarioEnum.kSleep, name="Sleep", coolingSetpoint=2700, heatingSetpoint=1900, builtIn=False)) - - class TC_TSTAT_4_2(MatterBaseTest): def check_atomic_response(self, response: object, expected_status: Status = Status.Success, @@ -87,6 +73,34 @@ def check_atomic_response(self, response: object, expected_status: Status = Stat "Schedules attribute should have the right status") asserts.assert_true(found_preset_status, "Preset attribute should have a status") + def check_returned_presets(self, sent_presets: list, returned_presets: list): + asserts.assert_true(len(sent_presets) == len(returned_presets), "Returned presets are a different length than sent presets") + for i, sent_preset in enumerate(sent_presets): + returned_preset = returned_presets[i] + if sent_preset.presetHandle is NullValue: + sent_preset = copy.copy(sent_preset) + sent_preset.presetHandle = returned_preset.presetHandle + if sent_preset.builtIn is NullValue: + sent_preset.builtIn = returned_preset.builtIn + asserts.assert_equal(sent_preset, returned_preset, + "Returned preset is not the same as sent preset") + + def count_preset_scenarios(self, presets: list): + presetScenarios = {} + for preset in presets: + if preset.presetScenario not in presetScenarios: + presetScenarios[preset.presetScenario] = 1 + else: + presetScenarios[preset.presetScenario] += 1 + return presetScenarios + + def get_available_scenario(self, presetTypes: list, presetScenarioCounts: map): + availableScenarios = list(presetType.presetScenario for presetType in presetTypes if presetScenarioCounts.get( + presetType.presetScenario, 0) < presetType.numberOfPresets) + if len(availableScenarios) > 0: + return availableScenarios[0] + return None + async def write_presets(self, endpoint, presets, @@ -210,6 +224,10 @@ def steps_TC_TSTAT_4_2(self) -> list[TestStep]: "Verify that the write request is rejected"), TestStep("16", "TH starts an atomic write, and before it's complete, TH2 removes TH's fabric; TH2 then opens an atomic write", "Verify that the atomic request is successful"), + TestStep("17", "TH writes to the Presets attribute with a preset that has a presetScenario not present in PresetTypes attribute", + "Verify that the write request returned CONSTRAINT_ERROR (0x87)."), + TestStep("18", "TH writes to the Presets attribute such that the total number of presets is greater than the number of presets supported", + "Verify that the write request returned RESOURCE_EXHAUSTED (0x89)."), ] return steps @@ -233,118 +251,221 @@ async def test_TC_TSTAT_4_2(self): nodeId=self.dut_node_id, setupPinCode=params.setupPinCode, filterType=ChipDeviceCtrl.DiscoveryFilterType.LONG_DISCRIMINATOR, filter=1234) + current_presets = [] + presetTypes = [] + presetScenarioCounts = {} + numberOfPresetsSupported = 0 + minHeatSetpointLimit = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.MinHeatSetpointLimit) + maxHeatSetpointLimit = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.MaxHeatSetpointLimit) + minCoolSetpointLimit = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.MinCoolSetpointLimit) + maxCoolSetpointLimit = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.MaxCoolSetpointLimit) + + asserts.assert_true(minHeatSetpointLimit < maxHeatSetpointLimit, "Heat setpoint range invalid") + asserts.assert_true(minCoolSetpointLimit < maxCoolSetpointLimit, "Cool setpoint range invalid") + + heatSetpoint = minHeatSetpointLimit + ((maxHeatSetpointLimit - minHeatSetpointLimit) / 2) + coolSetpoint = minCoolSetpointLimit + ((maxCoolSetpointLimit - minCoolSetpointLimit) / 2) + self.step("2") if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050")): - presets = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.Presets) - logger.info(f"Rx'd Presets: {presets}") - asserts.assert_equal(presets, initial_presets, "Presets do not match initial value") + + # Read the numberOfPresets supported. + numberOfPresetsSupported = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.NumberOfPresets) + + # Read the PresetTypes to get the preset scenarios supported by the Thermostat. + presetTypes = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.PresetTypes) + logger.info(f"Rx'd Preset Types: {presetTypes}") + + current_presets = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.Presets) + logger.info(f"Rx'd Presets: {current_presets}") + + presetScenarioCounts = self.count_preset_scenarios(current_presets) # Write to the presets attribute without calling AtomicRequest command - await self.write_presets(endpoint=endpoint, presets=new_presets, expected_status=Status.InvalidInState) + await self.write_presets(endpoint=endpoint, presets=current_presets, expected_status=Status.InvalidInState) self.step("3") if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): - await self.send_atomic_request_begin_command() - # Write to the presets attribute after calling AtomicRequest command - status = await self.write_presets(endpoint=endpoint, presets=new_presets) - status_ok = (status == Status.Success) - asserts.assert_true(status_ok, "Presets write did not return Success as expected") + availableScenario = self.get_available_scenario(presetTypes=presetTypes, presetScenarioCounts=presetScenarioCounts) - # Read the presets attribute and verify it was updated by the write - presets = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.Presets) - logger.info(f"Rx'd Presets: {presets}") - asserts.assert_equal(presets, new_presets_with_handle, "Presets were updated, as expected") + if availableScenario is not None and len(current_presets) < numberOfPresetsSupported: - await self.send_atomic_request_rollback_command() + # Set the preset builtIn fields to a null built-in value + test_presets = copy.deepcopy(current_presets) + for preset in test_presets: + preset.builtIn = NullValue + + test_presets.append(cluster.Structs.PresetStruct(presetHandle=NullValue, presetScenario=availableScenario, + coolingSetpoint=coolSetpoint, heatingSetpoint=heatSetpoint, builtIn=False)) + + await self.send_atomic_request_begin_command() + + # Write to the presets attribute after calling AtomicRequest command + status = await self.write_presets(endpoint=endpoint, presets=test_presets) + status_ok = (status == Status.Success) + asserts.assert_true(status_ok, "Presets write did not return Success as expected") + + # Read the presets attribute and verify it was updated by the write + saved_presets = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.Presets) + logger.info(f"Rx'd Presets: {saved_presets}") + self.check_returned_presets(test_presets, saved_presets) - # Read the presets attribute and verify it has been properly rolled back - presets = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.Presets) - asserts.assert_equal(presets, initial_presets, "Presets were updated which is not expected") + await self.send_atomic_request_rollback_command() + + # Read the presets attribute and verify it has been properly rolled back + presets = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.Presets) + asserts.assert_equal(presets, current_presets, "Presets were updated which is not expected") + else: + logger.info( + "Couldn't run test step 3 since there was no available preset scenario to append") self.step("4") if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): - # Send the AtomicRequest begin command - await self.send_atomic_request_begin_command() + availableScenario = self.get_available_scenario(presetTypes=presetTypes, presetScenarioCounts=presetScenarioCounts) + + # Set the existing preset to a null built-in value; will be replaced with true on reading + test_presets = copy.deepcopy(current_presets) + + if availableScenario is not None: + builtInPresets = list(preset for preset in test_presets if preset.builtIn) + + if len(builtInPresets) > 0: + builtInPresets[0].builtIn = NullValue - # Write to the presets attribute after calling AtomicRequest command - await self.write_presets(endpoint=endpoint, presets=new_presets) + test_presets.append(cluster.Structs.PresetStruct(presetHandle=NullValue, presetScenario=availableScenario, + coolingSetpoint=coolSetpoint, heatingSetpoint=heatSetpoint, builtIn=False)) - # Send the AtomicRequest commit command - await self.send_atomic_request_commit_command() + # Send the AtomicRequest begin command + await self.send_atomic_request_begin_command() - # Read the presets attribute and verify it was updated since AtomicRequest commit was called after writing presets - presets = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.Presets) - logger.info(f"Rx'd Presets: {presets}") - asserts.assert_equal(presets, new_presets_with_handle, "Presets were not updated which is not expected") + # Write to the presets attribute after calling AtomicRequest command + await self.write_presets(endpoint=endpoint, presets=test_presets) + + # Send the AtomicRequest commit command + await self.send_atomic_request_commit_command() + + # Read the presets attribute and verify it was updated since AtomicRequest commit was called after writing presets + current_presets = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.Presets) + logger.info(f"Rx'd Presets: {current_presets}") + self.check_returned_presets(test_presets, current_presets) + + presetScenarioCounts = self.count_preset_scenarios(current_presets) + else: + logger.info( + "Couldn't run test step 4 since there were no built-in presets") + + # Send the SetActivePresetRequest command + await self.send_set_active_preset_handle_request_command(value=b'\x03') + + activePresetHandle = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.ActivePresetHandle) self.step("5") if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): - # Send the AtomicRequest begin command - await self.send_atomic_request_begin_command(timeout=5000, expected_timeout=3000) - # Write to the presets attribute after removing a built in preset from the list. Remove the first entry. - test_presets = new_presets_with_handle.copy() - test_presets.pop(0) - await self.write_presets(endpoint=endpoint, presets=test_presets) + test_presets = current_presets.copy() + + builtInPresets = list(preset for preset in test_presets if preset.builtIn) + if len(builtInPresets) > 0: + builtInPreset = builtInPresets[0] + test_presets.remove(builtInPreset) + + # Send the AtomicRequest begin command + await self.send_atomic_request_begin_command(timeout=5000, expected_timeout=3000) - # Send the AtomicRequest commit command and expect ConstraintError for presets. - await self.send_atomic_request_commit_command(expected_overall_status=Status.Failure, expected_preset_status=Status.ConstraintError) + # Write to the presets attribute after calling AtomicRequest command + await self.write_presets(endpoint=endpoint, presets=test_presets) + + # Send the AtomicRequest commit command and expect ConstraintError for presets. + await self.send_atomic_request_commit_command(expected_overall_status=Status.Failure, expected_preset_status=Status.ConstraintError) + else: + logger.info( + "Couldn't run test step 5 since there were no built-in presets") self.step("6") if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.C06.Rsp") and self.check_pics("TSTAT.S.Cfe.Rsp")): - # Send the SetActivePresetRequest command - await self.send_set_active_preset_handle_request_command(value=b'\x03') + notBuiltInPresets = list(preset for preset in current_presets if preset.builtIn is False) + if len(notBuiltInPresets) > 0: + activePreset = notBuiltInPresets[0] - # Read the active preset handle attribute and verify it was updated to preset handle - activePresetHandle = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.ActivePresetHandle) - logger.info(f"Rx'd ActivePresetHandle: {activePresetHandle}") - asserts.assert_equal(activePresetHandle, b'\x03', "Active preset handle was not updated as expected") + # Send the SetActivePresetRequest command + await self.send_set_active_preset_handle_request_command(value=activePreset.presetHandle) - # Send the AtomicRequest begin command - await self.send_atomic_request_begin_command() + # Read the active preset handle attribute and verify it was updated to preset handle + activePresetHandle = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.ActivePresetHandle) + logger.info(f"Rx'd ActivePresetHandle: {activePresetHandle}") + asserts.assert_equal(activePresetHandle, activePreset.presetHandle, + "Active preset handle was not updated as expected") + + # Send the AtomicRequest begin command + await self.send_atomic_request_begin_command() + + # Write to the presets attribute after removing the preset that was set as the active preset handle. + test_presets = list(preset for preset in current_presets if preset.presetHandle is not activePresetHandle) + logger.info(f"Sending Presets: {test_presets}") + await self.write_presets(endpoint=endpoint, presets=test_presets) - # Write to the presets attribute after removing the preset that was set as the active preset handle. Remove the last entry with preset handle (b'\x03') - test_presets = new_presets_with_handle.copy() - del test_presets[-1] - await self.write_presets(endpoint=endpoint, presets=test_presets) + # Send the AtomicRequest commit command and expect InvalidInState for presets. + await self.send_atomic_request_commit_command(expected_overall_status=Status.Failure, expected_preset_status=Status.InvalidInState) + else: + logger.info( + "Couldn't run test step 6 since there were no non-built-in presets to activate and delete") - # Send the AtomicRequest commit command and expect InvalidInState for presets. - await self.send_atomic_request_commit_command(expected_overall_status=Status.Failure, expected_preset_status=Status.InvalidInState) + # Write the occupied cooling setpoint to a different value + await self.write_single_attribute(attribute_value=cluster.Attributes.OccupiedCoolingSetpoint(2300), endpoint_id=endpoint) + + activePresetHandle = await self.read_single_attribute_check_success(endpoint=endpoint, cluster=cluster, attribute=cluster.Attributes.ActivePresetHandle) + logger.info(f"Rx'd ActivePresetHandle: {activePresetHandle}") + asserts.assert_equal(activePresetHandle, NullValue, "Active preset handle was not cleared as expected") self.step("7") if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): - # Send the AtomicRequest begin command - await self.send_atomic_request_begin_command() + # Write to the presets attribute after setting the builtIn flag to False for a built-in preset. + test_presets = copy.deepcopy(current_presets) - # Write to the presets attribute after setting the builtIn flag to False for preset with handle (b'\x01') - test_presets = copy.deepcopy(new_presets_with_handle) - test_presets[0].builtIn = False + builtInPresets = list(preset for preset in test_presets if preset.builtIn is True) + if len(builtInPresets) > 0: - await self.write_presets(endpoint=endpoint, presets=test_presets, expected_status=Status.ConstraintError) + # Send the AtomicRequest begin command + await self.send_atomic_request_begin_command() - # Clear state for next test. - await self.send_atomic_request_rollback_command() + builtInPresets[0].builtIn = False + + await self.write_presets(endpoint=endpoint, presets=test_presets, expected_status=Status.ConstraintError) + + # Clear state for next test. + await self.send_atomic_request_rollback_command() + else: + logger.info( + "Couldn't run test step 7 since there was no built-in presets") self.step("8") if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): - # Send the AtomicRequest begin command - await self.send_atomic_request_begin_command() + availableScenario = self.get_available_scenario(presetTypes=presetTypes, presetScenarioCounts=presetScenarioCounts) - # Write to the presets attribute after adding a preset with builtIn set to True - test_presets = copy.deepcopy(new_presets_with_handle) - test_presets.append(cluster.Structs.PresetStruct(presetHandle=NullValue, presetScenario=cluster.Enums.PresetScenarioEnum.kWake, - name="Wake", coolingSetpoint=2800, heatingSetpoint=1800, builtIn=True)) + if len(current_presets) < numberOfPresetsSupported and availableScenario is not None: - status = await self.write_presets(endpoint=endpoint, presets=test_presets, expected_status=Status.ConstraintError) + test_presets = copy.deepcopy(current_presets) - # Clear state for next test. - await self.send_atomic_request_rollback_command() + # Send the AtomicRequest begin command + await self.send_atomic_request_begin_command() + + # Write to the presets attribute after adding a preset with builtIn set to True + test_presets.append(cluster.Structs.PresetStruct(presetHandle=NullValue, presetScenario=availableScenario, + coolingSetpoint=coolSetpoint, heatingSetpoint=heatSetpoint, builtIn=True)) + + status = await self.write_presets(endpoint=endpoint, presets=test_presets, expected_status=Status.ConstraintError) + + # Clear state for next test. + await self.send_atomic_request_rollback_command() + else: + logger.info( + "Couldn't run test step 8 since there was no available preset scenario to append") self.step("9") if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): @@ -353,9 +474,9 @@ async def test_TC_TSTAT_4_2(self): await self.send_atomic_request_begin_command() # Write to the presets attribute after adding a preset with a preset handle that doesn't exist in Presets attribute - test_presets = copy.deepcopy(new_presets_with_handle) - test_presets.append(cluster.Structs.PresetStruct(presetHandle=b'\x08', presetScenario=cluster.Enums.PresetScenarioEnum.kWake, - name="Wake", coolingSetpoint=2800, heatingSetpoint=1800, builtIn=True)) + test_presets = copy.deepcopy(current_presets) + test_presets.append(cluster.Structs.PresetStruct(presetHandle=random.randbytes(16), presetScenario=cluster.Enums.PresetScenarioEnum.kWake, + name="Wake", coolingSetpoint=coolSetpoint, heatingSetpoint=heatSetpoint, builtIn=True)) status = await self.write_presets(endpoint=endpoint, presets=test_presets, expected_status=Status.NotFound) @@ -365,67 +486,106 @@ async def test_TC_TSTAT_4_2(self): self.step("10") if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): - # Send the AtomicRequest begin command - await self.send_atomic_request_begin_command() + availableScenario = self.get_available_scenario(presetTypes=presetTypes, presetScenarioCounts=presetScenarioCounts) - # Write to the presets attribute after adding a duplicate preset with handle (b'\x03') - test_presets = copy.deepcopy(new_presets_with_handle) - test_presets.append(cluster.Structs.PresetStruct( - presetHandle=b'\x03', presetScenario=cluster.Enums.PresetScenarioEnum.kSleep, name="Sleep", coolingSetpoint=2700, heatingSetpoint=1900, builtIn=False)) + if len(current_presets) < numberOfPresetsSupported and availableScenario is not None: - await self.write_presets(endpoint=endpoint, presets=test_presets, expected_status=Status.ConstraintError) + test_presets = copy.deepcopy(current_presets) + duplicatePreset = test_presets[0] - # Clear state for next test. - await self.send_atomic_request_rollback_command() + # Send the AtomicRequest begin command + await self.send_atomic_request_begin_command() + + # Write to the presets attribute after adding a duplicate preset + test_presets.append(cluster.Structs.PresetStruct( + presetHandle=duplicatePreset.presetHandle, presetScenario=availableScenario, coolingSetpoint=coolSetpoint, heatingSetpoint=heatSetpoint, builtIn=False)) + + await self.write_presets(endpoint=endpoint, presets=test_presets, expected_status=Status.ConstraintError) + + # Clear state for next test. + await self.send_atomic_request_rollback_command() + else: + logger.info( + "Couldn't run test step 10 since there was no available preset scenario to duplicate") self.step("11") if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): - # Send the AtomicRequest begin command - await self.send_atomic_request_begin_command() + test_presets = copy.deepcopy(current_presets) - # Write to the presets attribute after setting the builtIn flag to True for preset with handle (b'\x03') - test_presets = copy.deepcopy(new_presets_with_handle) - test_presets[2].builtIn = True + notBuiltInPresets = list(preset for preset in test_presets if preset.builtIn is False) - await self.write_presets(endpoint=endpoint, presets=test_presets, expected_status=Status.ConstraintError) + if len(notBuiltInPresets) > 0: + # Write to the presets attribute after setting the builtIn flag to True for a non-built-in preset. + notBuiltInPresets[0].builtIn = True - # Clear state for next test. - await self.send_atomic_request_rollback_command() + # Send the AtomicRequest begin command + await self.send_atomic_request_begin_command() + + await self.write_presets(endpoint=endpoint, presets=test_presets, expected_status=Status.ConstraintError) + + # Clear state for next test. + await self.send_atomic_request_rollback_command() + else: + logger.info( + "Couldn't run test step 11 since there were no presets that were not built-in") self.step("12") if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): - # Send the AtomicRequest begin command - await self.send_atomic_request_begin_command() + availableScenarios = list(presetType.presetScenario for presetType in presetTypes if (presetType.presetTypeFeatures & cluster.Bitmaps.PresetTypeFeaturesBitmap.kSupportsNames) == 0 and presetScenarioCounts.get( + presetType.presetScenario, 0) <= presetType.numberOfPresets) - # Write to the presets attribute after setting a name for preset with handle (b'\x01') that doesn't support names - test_presets = copy.deepcopy(new_presets_with_handle) - test_presets[0].name = "Occupied" + test_presets = copy.deepcopy(current_presets) + presets_without_name_support = list(preset for preset in test_presets if preset.presetScenario in availableScenarios) - await self.write_presets(endpoint=endpoint, presets=test_presets, expected_status=Status.ConstraintError) + if len(presets_without_name_support) == 0 and len(availableScenarios) > 0: + new_preset = cluster.Structs.PresetStruct(presetHandle=NullValue, presetScenario=availableScenarios[0], + coolingSetpoint=coolSetpoint, heatingSetpoint=heatSetpoint, builtIn=True) + test_presets.append(new_preset) + presets_without_name_support = [new_preset] - # Clear state for next test. - await self.send_atomic_request_rollback_command() + if len(availableScenarios) > 0: + + # Write to the presets attribute after setting a name for preset with handle (b'\x01') that doesn't support names + presets_without_name_support[0].name = "Name" + + # Send the AtomicRequest begin command + await self.send_atomic_request_begin_command() + + await self.write_presets(endpoint=endpoint, presets=test_presets, expected_status=Status.ConstraintError) + + # Clear state for next test. + await self.send_atomic_request_rollback_command() + else: + logger.info( + "Couldn't run test step 12 since there was no available preset scenario without name support") self.step("13") if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): - # Send the AtomicRequest begin command - await self.send_atomic_request_begin_command() + availableScenario = self.get_available_scenario(presetTypes=presetTypes, presetScenarioCounts=presetScenarioCounts) - # Write to the presets attribute with a new valid preset added - test_presets = copy.deepcopy(new_presets_with_handle) - test_presets.append(cluster.Structs.PresetStruct(presetHandle=NullValue, presetScenario=cluster.Enums.PresetScenarioEnum.kWake, - name="Wake", coolingSetpoint=2800, heatingSetpoint=1800, builtIn=False)) + if len(current_presets) < numberOfPresetsSupported and availableScenario is not None: - await self.write_presets(endpoint=endpoint, presets=test_presets) + # Write to the presets attribute with a new valid preset added + test_presets = copy.deepcopy(current_presets) + test_presets.append(cluster.Structs.PresetStruct(presetHandle=NullValue, presetScenario=availableScenario, + coolingSetpoint=coolSetpoint, heatingSetpoint=heatSetpoint, builtIn=False)) - # Roll back - await self.send_atomic_request_rollback_command() + # Send the AtomicRequest begin command + await self.send_atomic_request_begin_command() + + await self.write_presets(endpoint=endpoint, presets=test_presets) - # Send the AtomicRequest commit command and expect InvalidInState as the previous edit request was cancelled - await self.send_atomic_request_commit_command(expected_status=Status.InvalidInState) + # Roll back + await self.send_atomic_request_rollback_command() + + # Send the AtomicRequest commit command and expect InvalidInState as the previous edit request was cancelled + await self.send_atomic_request_commit_command(expected_status=Status.InvalidInState) + else: + logger.info( + "Couldn't run test step 13 since there was no available preset scenario to add") self.step("14") if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): @@ -441,7 +601,7 @@ async def test_TC_TSTAT_4_2(self): # Send the AtomicRequest begin command from the secondary controller await self.send_atomic_request_begin_command() - await self.write_presets(endpoint=endpoint, presets=test_presets, dev_ctrl=secondary_controller, expected_status=Status.Busy) + await self.write_presets(endpoint=endpoint, presets=current_presets, dev_ctrl=secondary_controller, expected_status=Status.Busy) # Roll back await self.send_atomic_request_rollback_command() @@ -461,7 +621,63 @@ async def test_TC_TSTAT_4_2(self): # Roll back await self.send_atomic_request_rollback_command() - # TODO: Add tests for the total number of Presets exceeds the NumberOfPresets supported. Also Add tests for adding presets with preset scenario not present in PresetTypes. + self.step("17") + if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): + + # Find a preset scenario not present in PresetTypes to run this test. + supportedScenarios = set(presetType.presetScenario for presetType in presetTypes) + unavailableScenarios = list( + presetScenario for presetScenario in cluster.Enums.PresetScenarioEnum if presetScenario not in supportedScenarios) + if len(unavailableScenarios) > 0: + test_presets = current_presets.copy() + test_presets.append(cluster.Structs.PresetStruct(presetHandle=NullValue, presetScenario=unavailableScenarios[0], + name="Preset", coolingSetpoint=coolSetpoint, heatingSetpoint=heatSetpoint, builtIn=False)) + + # Send the AtomicRequest begin command + await self.send_atomic_request_begin_command() + + await self.write_presets(endpoint=endpoint, presets=test_presets, expected_status=Status.ConstraintError) + + # Clear state for next test. + await self.send_atomic_request_rollback_command() + else: + logger.info( + "Couldn't run test step 17 since all preset scenarios in PresetScenarioEnum are supported by this Thermostat") + + self.step("18") + if self.pics_guard(self.check_pics("TSTAT.S.F08") and self.check_pics("TSTAT.S.A0050") and self.check_pics("TSTAT.S.Cfe.Rsp")): + + # Calculate the length of the Presets list that could be created using the preset scenarios in PresetTypes and numberOfPresets supported for each scenario. + totalExpectedPresetsLength = sum(presetType.numberOfPresets for presetType in presetTypes) + + if totalExpectedPresetsLength > numberOfPresetsSupported: + testPresets = [] + for presetType in presetTypes: + scenario = presetType.presetScenario + + # For each supported scenario, copy all the existing presets that match it, then add more presets + # until we hit the cap on the number of presets for that scenario. + presetsAddedForScenario = 0 + for preset in current_presets: + if scenario == preset.presetScenario: + testPresets.append(preset) + presetsAddedForScenario = presetsAddedForScenario + 1 + + while presetsAddedForScenario < presetType.numberOfPresets: + testPresets.append(cluster.Structs.PresetStruct(presetHandle=NullValue, presetScenario=scenario, + coolingSetpoint=coolSetpoint, heatingSetpoint=heatSetpoint, builtIn=False)) + presetsAddedForScenario = presetsAddedForScenario + 1 + + # Send the AtomicRequest begin command + await self.send_atomic_request_begin_command() + + await self.write_presets(endpoint=endpoint, presets=testPresets, expected_status=Status.ResourceExhausted) + + # Clear state for next test. + await self.send_atomic_request_rollback_command() + else: + logger.info( + "Couldn't run test step 18 since there are not enough preset types to build a Presets list that exceeds the number of presets supported") if __name__ == "__main__": diff --git a/src/python_testing/TC_WHM_1_2.py b/src/python_testing/TC_WHM_1_2.py index aaa8d30002bb71..b8727671d1e869 100644 --- a/src/python_testing/TC_WHM_1_2.py +++ b/src/python_testing/TC_WHM_1_2.py @@ -17,10 +17,10 @@ # === BEGIN CI TEST ARGUMENTS === # test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} +# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --enable-key 000102030405060708090a0b0c0d0e0f --application water-heater # test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --hex-arg enableKey:000102030405060708090a0b0c0d0e0f --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === diff --git a/src/python_testing/TC_WHM_2_1.py b/src/python_testing/TC_WHM_2_1.py index 0d39d23cc2e1ea..3ed57876cd79c8 100644 --- a/src/python_testing/TC_WHM_2_1.py +++ b/src/python_testing/TC_WHM_2_1.py @@ -20,10 +20,10 @@ # # === BEGIN CI TEST ARGUMENTS === # test-runner-runs: run1 -# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} +# test-runner-run/run1/app: ${ENERGY_MANAGEMENT_APP} # test-runner-run/run1/factoryreset: True # test-runner-run/run1/quiet: True -# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json --application evse # test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --endpoint 1 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto # === END CI TEST ARGUMENTS === diff --git a/src/python_testing/TestConformanceTest.py b/src/python_testing/TestConformanceTest.py new file mode 100644 index 00000000000000..f0ff8032eab519 --- /dev/null +++ b/src/python_testing/TestConformanceTest.py @@ -0,0 +1,284 @@ +# +# Copyright (c) 2024 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +from typing import Any + +import chip.clusters as Clusters +from basic_composition_support import arls_populated +from conformance_support import ConformanceDecision +from global_attribute_ids import GlobalAttributeIds +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from mobly import asserts +from spec_parsing_support import build_xml_clusters, build_xml_device_types +from TC_DeviceConformance import DeviceConformanceTests + + +def create_onoff_endpoint(endpoint: int) -> dict[int, dict[int, dict[int, Any]]]: + # Really simple device with one endpoint that includes scenes management, which is provisional + # I'm ONLY populating the global attributes since the conformance test only uses these. + endpoint_tlv = {endpoint: {}} + + on_off_device_type_id = 0x0100 + on_off_device_type_revision = 3 + descriptor_cluster_revision = 3 + identify_cluster_revision = 5 + on_off_cluster_revision = 6 + scenes_cluster_revision = 1 + + # Descriptor + attr = Clusters.Descriptor.Attributes + attrs = {} + attrs[attr.FeatureMap.attribute_id] = 0 + attrs[attr.AcceptedCommandList.attribute_id] = [] + attrs[attr.GeneratedCommandList.attribute_id] = [] + attrs[attr.ClusterRevision.attribute_id] = descriptor_cluster_revision + attrs[attr.DeviceTypeList.attribute_id] = [Clusters.Descriptor.Structs.DeviceTypeStruct( + deviceType=on_off_device_type_id, revision=on_off_device_type_revision)] + attrs[attr.ServerList.attribute_id] = [Clusters.Identify.id, + Clusters.Groups.id, Clusters.ScenesManagement.id, Clusters.OnOff.id] + attrs[attr.ClientList.attribute_id] = [] + attrs[attr.PartsList.attribute_id] = [] + attrs[attr.AttributeList.attribute_id] = [] + attrs[attr.AttributeList.attribute_id] = list[attrs.keys()] + + endpoint_tlv[endpoint][Clusters.Descriptor.id] = attrs + + # Identify + attr = Clusters.Identify.Attributes + attrs = {} + attrs[attr.FeatureMap.attribute_id] = 0 + attrs[attr.AcceptedCommandList.attribute_id] = [Clusters.Identify.Commands.Identify.command_id] + attrs[attr.GeneratedCommandList.attribute_id] = [] + attrs[attr.ClusterRevision.attribute_id] = identify_cluster_revision + attrs[attr.IdentifyTime.attribute_id] = 0 + attrs[attr.IdentifyType.attribute_id] = Clusters.Identify.Enums.IdentifyTypeEnum.kNone + attrs[attr.AttributeList.attribute_id] = [] + attrs[attr.AttributeList.attribute_id] = list[attrs.keys()] + + endpoint_tlv[endpoint][Clusters.Identify.id] = attrs + + # OnOff + attr = Clusters.OnOff.Attributes + attrs = {} + # device type requires LT feature + attrs[attr.FeatureMap.attribute_id] = Clusters.OnOff.Bitmaps.Feature.kLighting + cmd = Clusters.OnOff.Commands + attrs[attr.AcceptedCommandList.attribute_id] = [cmd.Off.command_id, cmd.On.command_id, cmd.Toggle.command_id, + cmd.OffWithEffect.command_id, cmd.OnWithRecallGlobalScene.command_id, cmd.OnWithTimedOff.command_id] + attrs[attr.GeneratedCommandList.attribute_id] = [] + attrs[attr.ClusterRevision.attribute_id] = on_off_cluster_revision + attrs[attr.OnOff.attribute_id] = False + attrs[attr.GlobalSceneControl.attribute_id] = False + attrs[attr.OnTime.attribute_id] = 0 + attrs[attr.OffWaitTime.attribute_id] = 0 + attrs[attr.StartUpOnOff.attribute_id] = Clusters.OnOff.Enums.StartUpOnOffEnum.kOff + attrs[attr.AttributeList.attribute_id] = [] + attrs[attr.AttributeList.attribute_id] = list[attrs.keys()] + + endpoint_tlv[endpoint][Clusters.OnOff.id] = attrs + + # Scenes + attr = Clusters.ScenesManagement.Attributes + attrs = {} + attrs[attr.FeatureMap.attribute_id] = 0 + cmd = Clusters.ScenesManagement.Commands + attrs[attr.AcceptedCommandList.attribute_id] = [cmd.AddScene.command_id, cmd.ViewScene.command_id, cmd.RemoveScene.command_id, + cmd.RemoveAllScenes.command_id, cmd.StoreScene.command_id, cmd.RecallScene.command_id, cmd.GetSceneMembership.command_id] + attrs[attr.GeneratedCommandList.attribute_id] = [cmd.AddSceneResponse.command_id, cmd.ViewSceneResponse.command_id, + cmd.RemoveSceneResponse.command_id, cmd.RemoveAllScenesResponse.command_id, + cmd.StoreSceneResponse.command_id, cmd.GetSceneMembershipResponse.command_id] + attrs[attr.ClusterRevision.attribute_id] = scenes_cluster_revision + attrs[attr.SceneTableSize.attribute_id] = 16 + attrs[attr.FabricSceneInfo.attribute_id] = [] + attrs[attr.AttributeList.attribute_id] = [] + attrs[attr.AttributeList.attribute_id] = list[attrs.keys()] + + endpoint_tlv[endpoint][Clusters.ScenesManagement.id] = attrs + + return endpoint_tlv + + +def is_mandatory(conformance): + return conformance(0, [], []).decision == ConformanceDecision.MANDATORY + + +class TestConformanceSupport(MatterBaseTest, DeviceConformanceTests): + def setup_class(self): + self.xml_clusters, self.problems = build_xml_clusters() + self.xml_device_types, problems = build_xml_device_types() + self.problems.extend(problems) + + @async_test_body + async def test_provisional_cluster(self): + # NOTE: I'm actually FORCING scenes to provisional in this test because it will not be provisional + # forever. + self.xml_clusters[Clusters.ScenesManagement.id].is_provisional = True + + self.endpoints_tlv = create_onoff_endpoint(1) + + # The CI flag here is to deal with example code that improperly implements the network commissioning cluster. + # It does not apply here. + success, problems = self.check_conformance(ignore_in_progress=False, is_ci=False, allow_provisional=False) + asserts.assert_false(success, "Unexpected success parsing endpoint with provisional cluster") + + success, problems = self.check_conformance(ignore_in_progress=False, is_ci=False, allow_provisional=True) + asserts.assert_true(success, "Unexpected failure parsing endpoint with provisional cluster and allow_provisional enabled") + + self.xml_clusters[Clusters.ScenesManagement.id].is_provisional = False + success, problems = self.check_conformance(ignore_in_progress=False, is_ci=False, allow_provisional=False) + asserts.assert_true(success, "Unexpected failure parsing endpoint with no clusters marked as provisional") + + def _create_minimal_cluster(self, cluster_id: int) -> dict[int, Any]: + attrs = {} + attrs[GlobalAttributeIds.FEATURE_MAP_ID] = 0 + + mandatory_attributes = [id for id, a in self.xml_clusters[cluster_id].attributes.items() if is_mandatory(a.conformance)] + for m in mandatory_attributes: + # dummy versions - we're not using the values in this test + attrs[m] = 0 + attrs[GlobalAttributeIds.ATTRIBUTE_LIST_ID] = mandatory_attributes + mandatory_accepted_commands = [id for id, a in self.xml_clusters[cluster_id].accepted_commands.items() + if is_mandatory(a.conformance)] + attrs[GlobalAttributeIds.ACCEPTED_COMMAND_LIST_ID] = mandatory_accepted_commands + mandatory_generated_commands = [id for id, a in self.xml_clusters[cluster_id].generated_commands.items() + if is_mandatory(a.conformance)] + attrs[GlobalAttributeIds.GENERATED_COMMAND_LIST_ID] = mandatory_generated_commands + attrs[GlobalAttributeIds.CLUSTER_REVISION_ID] = self.xml_clusters[cluster_id].revision + return attrs + + def _create_minimal_dt(self, device_type_id: int) -> dict[int, dict[int, Any]]: + ''' Creates the internals of an endpoint_tlv with the minimal set of clusters, with the minimal set of attributes and commands. Global attributes only. + Does NOT take into account overrides yet. + ''' + endpoint_tlv = {} + required_servers = [id for id, c in self.xml_device_types[device_type_id].server_clusters.items() + if is_mandatory(c.conformance)] + required_clients = [id for id, c in self.xml_device_types[device_type_id].client_clusters.items() + if is_mandatory(c.conformance)] + device_type_revision = self.xml_device_types[device_type_id].revision + + for s in required_servers: + endpoint_tlv[s] = self._create_minimal_cluster(s) + + # Descriptor + attr = Clusters.Descriptor.Attributes + attrs = {} + attrs[attr.FeatureMap.attribute_id] = 0 + attrs[attr.AcceptedCommandList.attribute_id] = [] + attrs[attr.GeneratedCommandList.attribute_id] = [] + attrs[attr.ClusterRevision.attribute_id] = self.xml_clusters[Clusters.Descriptor.id].revision + attrs[attr.DeviceTypeList.attribute_id] = [ + Clusters.Descriptor.Structs.DeviceTypeStruct(deviceType=device_type_id, revision=device_type_revision)] + attrs[attr.ServerList.attribute_id] = required_servers + attrs[attr.ClientList.attribute_id] = required_clients + attrs[attr.PartsList.attribute_id] = [] + attrs[attr.AttributeList.attribute_id] = [] + attrs[attr.AttributeList.attribute_id] = list(attrs.keys()) + + endpoint_tlv[Clusters.Descriptor.id] = attrs + return endpoint_tlv + + def add_macl(self, root_endpoint: dict[int, dict[int, Any]], populate_arl: bool = False, populate_commissioning_arl: bool = False): + ac = Clusters.AccessControl + root_endpoint[ac.id][ac.Attributes.FeatureMap.attribute_id] = ac.Bitmaps.Feature.kManagedDevice + root_endpoint[ac.id][ac.Attributes.Arl.attribute_id] = [] + root_endpoint[ac.id][ac.Attributes.CommissioningARL.attribute_id] = [] + root_endpoint[ac.id][ac.Attributes.AttributeList.attribute_id].extend([ + ac.Attributes.Arl.attribute_id, ac.Attributes.CommissioningARL.attribute_id]) + root_endpoint[ac.id][ac.Attributes.AcceptedCommandList.attribute_id].append(ac.Commands.ReviewFabricRestrictions.command_id) + root_endpoint[ac.id][ac.Attributes.GeneratedCommandList.attribute_id].append( + ac.Commands.ReviewFabricRestrictionsResponse.command_id) + + generic_restriction = ac.Structs.AccessRestrictionStruct( + type=ac.Enums.AccessRestrictionTypeEnum.kAttributeAccessForbidden, id=1) + entry = ac.Structs.CommissioningAccessRestrictionEntryStruct(endpoint=1, cluster=2, restrictions=generic_restriction) + if populate_arl: + root_endpoint[ac.id][ac.Attributes.Arl.attribute_id] = [entry] + if populate_commissioning_arl: + root_endpoint[ac.id][ac.Attributes.CommissioningARL.attribute_id] = [entry] + + @async_test_body + async def test_macl_handling(self): + nim_id = self._get_device_type_id('network infrastructure manager') + root_node_id = self._get_device_type_id('root node') + on_off_id = self._get_device_type_id('On/Off Light') + + root = self._create_minimal_dt(device_type_id=root_node_id) + nim = self._create_minimal_dt(device_type_id=nim_id) + self.endpoints_tlv = {0: root, 1: nim} + asserts.assert_true(self._has_device_type_supporting_macl(), "Did not find supported device in generated device") + + success, problems = self.check_conformance(ignore_in_progress=False, is_ci=False, allow_provisional=True) + self.problems.extend(problems) + asserts.assert_true(success, "Unexpected failure parsing minimal dt") + + self.add_macl(root) + # A MACL is allowed when there is a NIM, so this should succeed as well + success, problems = self.check_conformance(ignore_in_progress=False, is_ci=False, allow_provisional=True) + self.problems.extend(problems) + asserts.assert_true(success, "Unexpected failure with NIM and MACL") + + # A MACL is not allowed when there is no NIM + self.endpoints_tlv[1] = self._create_minimal_dt(device_type_id=on_off_id) + success, problems = self.check_conformance(ignore_in_progress=False, is_ci=False, allow_provisional=True) + self.problems.extend(problems) + asserts.assert_false(success, "Unexpected success with On/Off and MACL") + + # TODO: what happens if there is a NIM and a non-NIM endpoint? + + @async_test_body + async def test_macl_restrictions(self): + + nim_id = self._get_device_type_id('network infrastructure manager') + root_node_id = self._get_device_type_id('root node') + + root = self._create_minimal_dt(device_type_id=root_node_id) + nim = self._create_minimal_dt(device_type_id=nim_id) + self.endpoints_tlv = {0: root, 1: nim} + + # device with no macl + arl_data = arls_populated(self.endpoints_tlv) + asserts.assert_false(arl_data.have_arl, "Unexpected ARL found") + asserts.assert_false(arl_data.have_carl, "Unexpected CommissioningARL found") + + # device with unpopulated macl + self.add_macl(root) + arl_data = arls_populated(self.endpoints_tlv) + asserts.assert_false(arl_data.have_arl, "Unexpected ARL found") + asserts.assert_false(arl_data.have_carl, "Unexpected CommissioningARL found") + + # device with populated ARL + self.add_macl(root, populate_arl=True) + arl_data = arls_populated(self.endpoints_tlv) + asserts.assert_true(arl_data.have_arl, "Did not find expected ARL") + asserts.assert_false(arl_data.have_carl, "Unexpected CommissioningARL found") + + # device with populated commissioning ARL + self.add_macl(root, populate_commissioning_arl=True) + arl_data = arls_populated(self.endpoints_tlv) + asserts.assert_false(arl_data.have_arl, "Unexpected ARL found") + asserts.assert_true(arl_data.have_carl, "Did not find expected Commissioning ARL") + + # device with both + self.add_macl(root, populate_arl=True, populate_commissioning_arl=True) + arl_data = arls_populated(self.endpoints_tlv) + asserts.assert_true(arl_data.have_arl, "Did not find expected ARL") + asserts.assert_true(arl_data.have_carl, "Did not find expected Commissioning ARL") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/TestSpecParsingSupport.py b/src/python_testing/TestSpecParsingSupport.py index 0523ebbcd6a6df..aa2a68427607e4 100644 --- a/src/python_testing/TestSpecParsingSupport.py +++ b/src/python_testing/TestSpecParsingSupport.py @@ -19,6 +19,7 @@ import xml.etree.ElementTree as ElementTree import chip.clusters as Clusters +import jinja2 from global_attribute_ids import GlobalAttributeIds from matter_testing_support import MatterBaseTest, ProblemNotice, default_matter_test_main from mobly import asserts @@ -225,6 +226,28 @@ def get_access_enum_from_string(access_str: str) -> Clusters.AccessControl.Enums '' ) +PROVISIONAL_CLUSTER_TEMPLATE = """ + + + + + + + {% if provisional %} + + {% endif %} + + + + + + + + + + +""" + class TestSpecParsingSupport(MatterBaseTest): def setup_class(self): @@ -236,11 +259,18 @@ def test_build_xml_override(self): # checks that the 1.3 spec (default) does not contain in-progress clusters and the TOT does tot_xml_clusters, problems = build_xml_clusters(PrebuiltDataModelDirectory.kMaster) one_three_clusters, problems = build_xml_clusters(PrebuiltDataModelDirectory.k1_3) + in_progress, problems = build_xml_clusters(PrebuiltDataModelDirectory.kInProgress) asserts.assert_greater(len(set(tot_xml_clusters.keys()) - set(one_three_clusters.keys())), - 0, "In progress dir does not contain any clusters not in 1.3") + 0, "Master dir does not contain any clusters not in 1.3") + asserts.assert_greater(len(set(tot_xml_clusters.keys()) - set(in_progress.keys())), + 0, "Master dir does not contain any clusters not in in_progress") + asserts.assert_greater(len(set(in_progress.keys()) - set(one_three_clusters.keys())), + 0, "in_progress dir does not contain any clusters not in 1.3") # only the pulse width modulation cluster was removed post 1.3 asserts.assert_equal(set(one_three_clusters.keys()) - set(tot_xml_clusters.keys()), set([Clusters.PulseWidthModulation.id]), "There are some 1.3 clusters that are not included in the TOT spec") + asserts.assert_equal(set(in_progress.keys())-set(tot_xml_clusters.keys()), + set(), "There are some in_progress clusters that are not included in the TOT spec") str_path = str(os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'data_model', 'master', 'clusters')) string_override_check, problems = build_xml_clusters(str_path) @@ -406,6 +436,32 @@ def test_known_derived_clusters(self): for d in known_derived_clusters: asserts.assert_true(self.spec_xml_clusters is not None, "Derived cluster with no base cluster marker") + def test_provisional_clusters(self): + clusters: dict[int, XmlCluster] = {} + pure_base_clusters: dict[str, XmlCluster] = {} + ids_by_name: dict[str, int] = {} + problems: list[ProblemNotice] = [] + id = 0x0001 + + environment = jinja2.Environment() + template = environment.from_string(PROVISIONAL_CLUSTER_TEMPLATE) + + provisional = template.render(provisional=True, id=id) + cluster_xml = ElementTree.fromstring(provisional) + add_cluster_data_from_xml(cluster_xml, clusters, pure_base_clusters, ids_by_name, problems) + + asserts.assert_equal(len(problems), 0, "Unexpected problems parsing provisional cluster") + asserts.assert_in(id, clusters.keys(), "Provisional cluster not parsed") + asserts.assert_true(clusters[id].is_provisional, "Provisional cluster not marked as provisional") + + non_provisional = template.render(provisional=False, id=id) + cluster_xml = ElementTree.fromstring(non_provisional) + add_cluster_data_from_xml(cluster_xml, clusters, pure_base_clusters, ids_by_name, problems) + + asserts.assert_equal(len(problems), 0, "Unexpected problems parsing non-provisional cluster") + asserts.assert_in(id, clusters.keys(), "Non-provisional cluster not parsed") + asserts.assert_false(clusters[id].is_provisional, "Non-provisional cluster marked as provisional") + if __name__ == "__main__": default_matter_test_main() diff --git a/src/python_testing/TestUnitTestingErrorPath.py b/src/python_testing/TestUnitTestingErrorPath.py new file mode 100644 index 00000000000000..c26e6afc13229b --- /dev/null +++ b/src/python_testing/TestUnitTestingErrorPath.py @@ -0,0 +1,102 @@ +# +# Copyright (c) 2023 Project CHIP Authors +# All rights reserved. +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +# See https://github.com/project-chip/connectedhomeip/blob/master/docs/testing/python.md#defining-the-ci-test-arguments +# for details about the block below. +# +# === BEGIN CI TEST ARGUMENTS === +# test-runner-runs: run1 +# test-runner-run/run1/app: ${ALL_CLUSTERS_APP} +# test-runner-run/run1/factoryreset: True +# test-runner-run/run1/quiet: True +# test-runner-run/run1/app-args: --discriminator 1234 --KVS kvs1 --trace-to json:${TRACE_APP}.json +# test-runner-run/run1/script-args: --storage-path admin_storage.json --commissioning-method on-network --discriminator 1234 --passcode 20202021 --trace-to json:${TRACE_TEST_JSON}.json --trace-to perfetto:${TRACE_TEST_PERFETTO}.perfetto +# === END CI TEST ARGUMENTS === + +import logging + +import chip.clusters as Clusters +from chip.interaction_model import InteractionModelError, Status +from matter_testing_support import MatterBaseTest, async_test_body, default_matter_test_main +from mobly import asserts + +""" Integration test for error path returns via the UnitTesting cluster. +""" + + +class TestUnitTestingErrorPath(MatterBaseTest): + + @async_test_body + async def test_unit_test_error_read(self): + endpoint_id = 1 + attributes = Clusters.UnitTesting.Attributes + + self.print_step(0, "Commissioning - already done") + + self.print_step(1, "Set error to 'Failure' for all subsequent reads of FailureInt32U.") + await self.default_controller.WriteAttribute( + nodeid=self.dut_node_id, + attributes=[(endpoint_id, attributes.ReadFailureCode(int(Status.Failure)))], + ) + + self.print_step(2, "Expect that reading FailureInt32U returns the previously set 'Failure' code.") + try: + data = await self.default_controller.ReadAttribute( + self.dut_node_id, [(endpoint_id, attributes.FailureInt32U)] + ) + result = data[endpoint_id][Clusters.UnitTesting][attributes.FailureInt32U] + + asserts.assert_true( + isinstance(result, Clusters.Attribute.ValueDecodeFailure), + "Expect a decode error for reading the failure attribute" + ) + asserts.assert_equal(result.Reason.status, Status.Failure, "Failure state is the default for the failure read.") + except InteractionModelError: + asserts.fail("Failure reading") + + self.print_step(3, "Set error to 'ResourceExhausted' for all subsequent reads of FailureInt32U.") + await self.default_controller.WriteAttribute( + nodeid=self.dut_node_id, + attributes=[(endpoint_id, attributes.ReadFailureCode(int(Status.ResourceExhausted)))], + ) + + self.print_step(4, "Expect that reading FailureInt32U returns the previously set 'ResourceExhausted' code.") + try: + data = await self.default_controller.ReadAttribute( + self.dut_node_id, [(endpoint_id, attributes.FailureInt32U)] + ) + result = data[endpoint_id][Clusters.UnitTesting][attributes.FailureInt32U] + + asserts.assert_true( + isinstance(result, Clusters.Attribute.ValueDecodeFailure), + "Expect a decode error for reading the failure attribute" + ) + asserts.assert_true(result.Reason.status, Status.ResourceExhausted, "Set failure is ResourceExhausted") + except InteractionModelError: + asserts.fail("Failure reading") + + self.print_step(5, "Reset ReadFailureCode error to default 'Failure' code.") + await self.default_controller.WriteAttribute( + nodeid=self.dut_node_id, + attributes=[(1, attributes.ReadFailureCode(int(Status.Failure)))], + ) + + logging.info("Test completed") + + +if __name__ == "__main__": + default_matter_test_main() diff --git a/src/python_testing/basic_composition_support.py b/src/python_testing/basic_composition_support.py index e25de55c0441a9..debf902e76a414 100644 --- a/src/python_testing/basic_composition_support.py +++ b/src/python_testing/basic_composition_support.py @@ -15,7 +15,7 @@ # limitations under the License. # - +import asyncio import base64 import copy import json @@ -23,15 +23,40 @@ import pathlib import sys import typing +from dataclasses import dataclass from pprint import pformat, pprint from typing import Any, Optional +import chip.clusters as Clusters import chip.clusters.ClusterObjects import chip.tlv from chip.clusters.Attribute import ValueDecodeFailure from mobly import asserts +@dataclass +class ArlData: + have_arl: bool + have_carl: bool + + +def arls_populated(tlv_data: dict[int, Any]) -> ArlData: + """ Returns a tuple indicating if the ARL and CommissioningARL are populated. + Requires a wildcard read of the device TLV. + """ + # ACL is always on endpoint 0 + if 0 not in tlv_data or Clusters.AccessControl.id not in tlv_data[0]: + return ArlData(have_arl=False, have_carl=False) + # Both attributes are mandatory for this feature, so if one doesn't exist, neither should the other. + if Clusters.AccessControl.Attributes.Arl.attribute_id not in tlv_data[0][Clusters.AccessControl.id][Clusters.AccessControl.Attributes.AttributeList.attribute_id]: + return ArlData(have_arl=False, have_carl=False) + + have_arl = tlv_data[0][Clusters.AccessControl.id][Clusters.AccessControl.Attributes.Arl.attribute_id] + have_carl = tlv_data[0][Clusters.AccessControl.id][Clusters.AccessControl.Attributes.CommissioningARL.attribute_id] + + return ArlData(have_arl=have_arl, have_carl=have_carl) + + def MatterTlvToJson(tlv_data: dict[int, Any]) -> dict[str, Any]: """Given TLV data for a specific cluster instance, convert to the Matter JSON format.""" @@ -98,12 +123,17 @@ def ConvertValue(value) -> Any: class BasicCompositionTests: - async def connect_over_pase(self, dev_ctrl): - asserts.assert_true(self.matter_test_config.qr_code_content == [] or self.matter_test_config.manual_code == [], - "Cannot have both QR and manual code specified") - setupCode = self.matter_test_config.qr_code_content + self.matter_test_config.manual_code - asserts.assert_equal(len(setupCode), 1, "Require one of either --qr-code or --manual-code.") - await dev_ctrl.FindOrEstablishPASESession(setupCode[0], self.dut_node_id) + def get_code(self, dev_ctrl): + created_codes = [] + for idx, discriminator in enumerate(self.matter_test_config.discriminators): + created_codes.append(dev_ctrl.CreateManualCode(discriminator, self.matter_test_config.setup_passcodes[idx])) + + setup_codes = self.matter_test_config.qr_code_content + self.matter_test_config.manual_code + created_codes + if not setup_codes: + return None + asserts.assert_equal(len(setup_codes), 1, + "Require exactly one of either --qr-code, --manual-code or (--discriminator and --passcode).") + return setup_codes[0] def dump_wildcard(self, dump_device_composition_path: typing.Optional[str]) -> tuple[str, str]: """ Dumps a json and a txt file of the attribute wildcard for this device if the dump_device_composition_path is supplied. @@ -120,19 +150,34 @@ def dump_wildcard(self, dump_device_composition_path: typing.Optional[str]) -> t pprint(self.endpoints, outfile, indent=1, width=200, compact=True) return (json_dump_string, pformat(self.endpoints, indent=1, width=200, compact=True)) - async def setup_class_helper(self, default_to_pase: bool = True): + async def setup_class_helper(self, allow_pase: bool = True): dev_ctrl = self.default_controller self.problems = [] - do_test_over_pase = self.user_params.get("use_pase_only", default_to_pase) dump_device_composition_path: Optional[str] = self.user_params.get("dump_device_composition_path", None) - if do_test_over_pase: - await self.connect_over_pase(dev_ctrl) - node_id = self.dut_node_id - else: - # Using the already commissioned node - node_id = self.dut_node_id + node_id = self.dut_node_id + + task_list = [] + if allow_pase and self.get_code(dev_ctrl): + setup_code = self.get_code(dev_ctrl) + pase_future = dev_ctrl.EstablishPASESession(setup_code, self.dut_node_id) + task_list.append(asyncio.create_task(pase_future)) + + case_future = dev_ctrl.GetConnectedDevice(nodeid=node_id, allowPASE=False) + task_list.append(asyncio.create_task(case_future)) + + for task in task_list: + asyncio.ensure_future(task) + + done, pending = await asyncio.wait(task_list, return_when=asyncio.FIRST_COMPLETED) + + for task in pending: + try: + task.cancel() + await task + except asyncio.CancelledError: + pass wildcard_read = (await dev_ctrl.Read(node_id, [()])) @@ -149,6 +194,12 @@ async def setup_class_helper(self, default_to_pase: bool = True): logging.info("Start of actual tests") logging.info("###########################################################") + arl_data = arls_populated(self.endpoints_tlv) + asserts.assert_false( + arl_data.have_arl, "ARL cannot be populated for this test - Please follow manufacturer-specific steps to remove the access restrictions and re-run this test") + asserts.assert_false( + arl_data.have_carl, "CommissioningARL cannot be populated for this test - Please follow manufacturer-specific steps to remove the access restrictions and re-run this test") + def get_test_name(self) -> str: """Return the function name of the caller. Used to create logging entries.""" return sys._getframe().f_back.f_code.co_name diff --git a/src/python_testing/drlk_2_x_common.py b/src/python_testing/drlk_2_x_common.py index a8368c5cc96507..c25365bf993d8f 100644 --- a/src/python_testing/drlk_2_x_common.py +++ b/src/python_testing/drlk_2_x_common.py @@ -73,33 +73,60 @@ async def send_clear_credential_cmd(self, credential) -> None: await self.send_single_cmd(cmd=Clusters.Objects.DoorLock.Commands.ClearCredential(credential=credential), endpoint=self.endpoint, timedRequestTimeoutMs=1000) - ret = await self.send_single_cmd(cmd=Clusters.Objects.DoorLock.Commands.GetCredentialStatus(credential=self.createdCredential), + ret = await self.send_single_cmd(cmd=Clusters.Objects.DoorLock.Commands.GetCredentialStatus(credential=credential), endpoint=self.endpoint) asserts.assert_true(type_matches(ret, Clusters.Objects.DoorLock.Commands.GetCredentialStatusResponse), "Unexpected return type for GetCredentialStatus") asserts.assert_false(ret.credentialExists, "Error clearing Credential (credentialExists==True)") - async def cleanup_users_and_credentials(self): - self.print_step("Cleanup", "Clear created User and Credential on the DUT") - if self.createdCredential: - await self.send_clear_credential_cmd(self.createdCredential) - logging.info("Credential cleared at CredentialIndex %d" % (self.createdCredential.credentialIndex)) - self.createdCredential = None - - async def generate_pincode(self, maxPincodeLength): - return ''.join(random.choices(string.digits, k=maxPincodeLength)) + async def cleanup_users_and_credentials(self, user_clear_step, clear_credential_step, credentials, userIndex): + if (self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F08") + and self.check_pics("DRLK.S.C26.Rsp")): + if clear_credential_step: + self.print_step(clear_credential_step, "TH sends ClearCredential Command to DUT") + await self.send_clear_credential_cmd(credentials) + if self.check_pics("DRLK.S.C1d.Rsp") and self.check_pics("DRLK.S.F08"): + if user_clear_step: + self.print_step(user_clear_step, "TH sends ClearUser Command to DUT with the UserIndex as 1") + await self.send_drlk_cmd_expect_success( + command=Clusters.Objects.DoorLock.Commands.ClearUser(userIndex=userIndex)) + self.clear_credential_and_user_flag = False + + async def set_user_command(self): + await self.send_single_cmd(cmd=Clusters.Objects.DoorLock.Commands.SetUser( + operationType=Clusters.DoorLock.Enums.DataOperationTypeEnum.kAdd, + userIndex=self.user_index, + userName="xxx", + userUniqueID=6452, + userStatus=Clusters.DoorLock.Enums.UserStatusEnum.kOccupiedEnabled, + credentialRule=Clusters.DoorLock.Enums.CredentialRuleEnum.kSingle + ), + endpoint=self.endpoint, + timedRequestTimeoutMs=1000 + ) + + async def read_and_verify_pincode_length(self, attribute, failure_message: str, min_range=0, max_range=255): + pin_code_length = await self.read_drlk_attribute_expect_success(attribute=attribute) + verify_pin_code_length = True if min_range <= pin_code_length <= max_range else False + asserts.assert_true(verify_pin_code_length, f"{failure_message}, got value {pin_code_length}") + return pin_code_length + + async def generate_pincode(self, maxPincodeLength, minPincodeLength): + length_of_pincode = random.randint(minPincodeLength, maxPincodeLength) + return ''.join(random.choices(string.digits, k=length_of_pincode)) async def teardown(self): - await self.cleanup_users_and_credentials() + if self.clear_credential_and_user_flag: + await self.cleanup_users_and_credentials(user_clear_step=None, clear_credential_step=None, + credentials=self.createdCredential, userIndex=self.user_index) async def run_drlk_test_common(self, lockUnlockCommand, lockUnlockCmdRspPICS, lockUnlockText, doAutoRelockTest): is_ci = self.check_pics('PICS_SDK_CI_ONLY') - - self.createdCredential = None - - self.endpoint = self.user_params.get("endpoint", 1) + self.clear_credential_and_user_flag = True # Allow for user overrides of these values + self.user_index = self.user_params.get("user_index", 1) + self.endpoint = self.user_params.get("endpoint", 1) credentialIndex = self.user_params.get("credential_index", 1) userCodeTemporaryDisableTime = self.user_params.get("user_code_temporary_disable_time", 15) wrongCodeEntryLimit = self.user_params.get("wrong_code_entry_limit", 3) @@ -110,40 +137,12 @@ async def run_drlk_test_common(self, lockUnlockCommand, lockUnlockCmdRspPICS, lo cluster = Clusters.Objects.DoorLock attributes = Clusters.DoorLock.Attributes - validPincode = None + pin_code = None invalidPincode = None - + credential = cluster.Structs.CredentialStruct(credentialIndex=credentialIndex, + credentialType=Clusters.DoorLock.Enums.CredentialTypeEnum.kPin) + self.createdCredential = credential self.print_step(0, "Commissioning, already done") - - if self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F07"): - self.print_step("Preconditions.1a", - "TH reads MaxPINCodeLength attribute from DUT and generates a valid PINCode") - maxPincodeLength_dut = await self.read_drlk_attribute_expect_success(attribute=attributes.MaxPINCodeLength) - logging.info("MaxPINCodeLength value is %s" % (maxPincodeLength_dut)) - - validPincodeString = await self.generate_pincode(maxPincodeLength_dut) - while True: - invalidPincodeString = await self.generate_pincode(maxPincodeLength_dut) - if invalidPincodeString != validPincodeString: - break - logging.info("Valid PinCode=%s, Invalid PinCode=%s" % (validPincodeString, invalidPincodeString)) - - validPincode = bytes(validPincodeString, 'ascii') - invalidPincode = bytes(invalidPincodeString, 'ascii') - - self.print_step("Preconditions.1b", - "TH sends SetCredential command to DUT to set up User and Credential at CredentialIndex {}".format(str(credentialIndex))) - credential = cluster.Structs.CredentialStruct(credentialIndex=credentialIndex, - credentialType=Clusters.DoorLock.Enums.CredentialTypeEnum.kPin) - ret = await self.send_set_credential_cmd(Clusters.DoorLock.Enums.DataOperationTypeEnum.kAdd, - credential, - validPincode, - NullValue, - NullValue, - NullValue) - logging.info("Credential created at CredentialIndex %d, UserIndex %d." % (credentialIndex, ret.userIndex)) - self.createdCredential = credential - requirePinForRemoteOperation_dut = False if self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F07"): self.print_step("1", "TH writes the RequirePINforRemoteOperation attribute value as false on the DUT") @@ -174,13 +173,44 @@ async def run_drlk_test_common(self, lockUnlockCommand, lockUnlockCmdRspPICS, lo await self.send_drlk_cmd_expect_error(command=command, error=Status.Failure) else: await self.send_drlk_cmd_expect_success(command=command) - - self.print_step("4", "TH sends %s Command to the DUT with valid PINCode" % lockUnlockText) - command = lockUnlockCommand(PINCode=validPincode) - await self.send_drlk_cmd_expect_success(command=command) else: asserts.assert_true(False, "%sResponse is a mandatory command response and must be supported in PICS" % lockUnlockText) + if self.check_pics("DRLK.S.F08"): + if self.check_pics("DRLK.S.C1a.Rsp"): + self.print_step("4a", "TH writes the RequirePINforRemoteOperation attribute value as true on the DUT") + await self.set_user_command() + if self.check_pics("DRLK.S.F00"): + self.print_step("4b", "TH reads MinPINCodeLength attribute and saves the value") + min_pin_code_length = await self.read_and_verify_pincode_length( + attribute=Clusters.DoorLock.Attributes.MinPINCodeLength, + failure_message="MinPINCodeLength attribute must be between 0 to 255" + ) + self.print_step("4c", "TH reads MaxPINCodeLength attribute and saves the value") + max_pin_code_length = await self.read_and_verify_pincode_length( + attribute=Clusters.DoorLock.Attributes.MaxPINCodeLength, + failure_message="MinPINCodeLength attribute must be between 0 to 255" + ) + self.print_step("4d", "Generate credential data and store as pin_code,Th sends SetCredential command" + "using pin_code") + credential_data_generated = await self.generate_pincode(max_pin_code_length, min_pin_code_length) + pin_code = bytes(credential_data_generated, "ascii") + if self.check_pics("DRLK.S.C22.Rsp") and self.check_pics("DRLK.S.C23.Tx"): + set_cred_response = await self.send_set_credential_cmd(userIndex=self.user_index, + operationType=Clusters.DoorLock.Enums.DataOperationTypeEnum.kAdd, + credential=credential, + credentialData=pin_code, + userStatus=NullValue, + userType=NullValue + ) + asserts.assert_true( + type_matches(set_cred_response, Clusters.Objects.DoorLock.Commands.SetCredentialResponse), + "Unexpected return type for SetCredential") + self.print_step("4e", f"TH sends {lockUnlockText} Command to the DUT with PINCode as pin_code.") + if self.check_pics(lockUnlockCmdRspPICS): + command = lockUnlockCommand(PINCode=pin_code) + await self.send_drlk_cmd_expect_success(command=command) + if self.check_pics("DRLK.S.F00") and self.check_pics("DRLK.S.F07"): self.print_step("5", "TH writes the RequirePINforRemoteOperation attribute value as true on the DUT") attribute = attributes.RequirePINforRemoteOperation(True) @@ -197,7 +227,13 @@ async def run_drlk_test_common(self, lockUnlockCommand, lockUnlockCmdRspPICS, lo if self.check_pics("DRLK.S.M.RequirePINForRemoteOperationAttributeWritable"): self.print_step("6a", "TH verifies that RequirePINforRemoteOperation is TRUE") asserts.assert_true(requirePinForRemoteOperation_dut, "RequirePINforRemoteOperation is expected to be TRUE") - + # generate InvalidPincode + while True: + invalidPincodeString = await self.generate_pincode(max_pin_code_length, min_pin_code_length) + invalidPincode = bytes(invalidPincodeString, "ascii") + if invalidPincodeString != pin_code: + break + logging.info(" pin_code=%s, Invalid PinCode=%s" % (pin_code, invalidPincodeString)) if self.check_pics("DRLK.S.F00") and self.check_pics(lockUnlockCmdRspPICS) and self.check_pics("DRLK.S.A0033"): self.print_step("7", "TH sends %s Command to the DUT with an invalid PINCode" % lockUnlockText) command = lockUnlockCommand(PINCode=invalidPincode) @@ -212,7 +248,7 @@ async def run_drlk_test_common(self, lockUnlockCommand, lockUnlockCmdRspPICS, lo if self.check_pics(lockUnlockCmdRspPICS) and self.check_pics("DRLK.S.A0033"): self.print_step("9", "TH sends %s Command to the DUT with valid PINCode" % lockUnlockText) - command = lockUnlockCommand(PINCode=validPincode) + command = lockUnlockCommand(PINCode=pin_code) await self.send_drlk_cmd_expect_success(command=command) if self.check_pics("DRLK.S.F00") or self.check_pics("DRLK.S.F01"): @@ -248,7 +284,7 @@ async def run_drlk_test_common(self, lockUnlockCommand, lockUnlockCmdRspPICS, lo await self.send_drlk_cmd_expect_error(command=command, error=Status.Failure) self.print_step("13", "TH sends %s Command to the DUT with valid PINCode. Verify failure or no response" % lockUnlockText) - command = lockUnlockCommand(PINCode=validPincode) + command = lockUnlockCommand(PINCode=pin_code) await self.send_drlk_cmd_expect_error(command=command, error=Status.Failure) if self.check_pics("DRLK.S.A0031"): @@ -257,9 +293,14 @@ async def run_drlk_test_common(self, lockUnlockCommand, lockUnlockCmdRspPICS, lo if not doAutoRelockTest: self.print_step("15", "Send %s with valid Pincode and verify success" % lockUnlockText) - command = lockUnlockCommand(PINCode=validPincode) + credentials = cluster.Structs.CredentialStruct(credentialIndex=credentialIndex, + credentialType=Clusters.DoorLock.Enums.CredentialTypeEnum.kPin) + command = lockUnlockCommand(PINCode=pin_code) await self.send_drlk_cmd_expect_success(command=command) + await self.cleanup_users_and_credentials(user_clear_step="17", clear_credential_step="16", + credentials=credentials, userIndex=self.user_index) + if doAutoRelockTest: if self.check_pics("DRLK.S.A0023"): self.print_step("15", "TH writes the AutoRelockTime attribute value on the DUT") @@ -275,22 +316,19 @@ async def run_drlk_test_common(self, lockUnlockCommand, lockUnlockCmdRspPICS, lo if self.check_pics(lockUnlockCmdRspPICS): self.print_step("17", "Send %s with valid Pincode and verify success" % lockUnlockText) - command = lockUnlockCommand(PINCode=validPincode) + command = lockUnlockCommand(PINCode=pin_code) await self.send_drlk_cmd_expect_success(command=command) - - if self.check_pics("DRLK.S.A0023"): - self.print_step("18a", "Wait for AutoRelockTime seconds") - # Add additional wait time buffer for motor movement, etc. - time.sleep(autoRelockTime_dut + 5) - - if self.check_pics("DRLK.S.A0000"): - self.print_step("18b", "TH reads LockState attribute after AutoRelockTime Expires") - lockstate_dut = await self.read_drlk_attribute_expect_success(attribute=attributes.LockState) - logging.info("Current LockState is %s" % (lockstate_dut)) - asserts.assert_equal(lockstate_dut, Clusters.DoorLock.Enums.DlLockState.kLocked, - "LockState expected to be value==Locked") - - await self.cleanup_users_and_credentials() + # Add additional wait time buffer for motor movement, etc. + time.sleep(autoRelockTime_dut + 5) + + if self.check_pics("DRLK.S.A0000"): + self.print_step("18", "TH reads LockState attribute after AutoRelockTime Expires") + lockstate_dut = await self.read_drlk_attribute_expect_success(attribute=attributes.LockState) + logging.info("Current LockState is %s" % (lockstate_dut)) + asserts.assert_equal(lockstate_dut, Clusters.DoorLock.Enums.DlLockState.kLocked, + "LockState expected to be value==Locked") + await self.cleanup_users_and_credentials(user_clear_step="20", clear_credential_step="19", + credentials=credential, userIndex=1) async def run_drlk_test_2_2(self): await self.run_drlk_test_common(lockUnlockCommand=Clusters.Objects.DoorLock.Commands.LockDoor, diff --git a/src/python_testing/execute_python_tests.py b/src/python_testing/execute_python_tests.py index ad3fc83c910bf8..de8908ca13be25 100644 --- a/src/python_testing/execute_python_tests.py +++ b/src/python_testing/execute_python_tests.py @@ -59,6 +59,7 @@ def main(search_directory, env_file): "TC_CNET_4_4.py", "TC_CCTRL_2_1.py", "TC_CCTRL_2_2.py", + "TC_CCTRL_2_3.py", "TC_DGGEN_3_2.py", "TC_EEVSE_Utils.py", "TC_ECOINFO_2_1.py", @@ -74,21 +75,20 @@ def main(search_directory, env_file): "TC_MCORE_FS_1_1.py", "TC_MCORE_FS_1_2.py", "TC_MCORE_FS_1_3.py", + "TC_MCORE_FS_1_4.py", + "TC_MCORE_FS_1_5.py", "TC_OCC_3_1.py", "TC_OCC_3_2.py", "TC_BRBINFO_4_1.py", - "TC_SEAR_1_2.py", - "TC_SEAR_1_3.py", - "TC_SEAR_1_4.py", - "TC_SEAR_1_5.py", - "TC_SEAR_1_6.py", "TestCommissioningTimeSync.py", "TestConformanceSupport.py", "TestChoiceConformanceSupport.py", "TC_DEMTestBase.py", "choice_conformance_support.py", + "TestConformanceTest.py", # Unit test of the conformance test (TC_DeviceConformance) - does not run against an app. "TestIdChecks.py", "TestSpecParsingDeviceType.py", + "TestConformanceTest.py", "TestMatterTestingSupport.py", "TestSpecParsingSupport.py", "TestTimeSyncTrustedTimeSource.py", @@ -124,7 +124,7 @@ def main(search_directory, env_file): # Run each script with the base command for script in python_files: full_command = f"{base_command} --load-from-env {env_file} --script {script}" - print(f"Running command: {full_command}") + print(f"Running command: {full_command}", flush=True) # Flush print to stdout immediately subprocess.run(full_command, shell=True, check=True) diff --git a/src/python_testing/matter_testing_infrastructure/metadata_parser/metadata.py b/src/python_testing/matter_testing_infrastructure/metadata_parser/metadata.py index 050f20f9920d6b..f16d3e9803e825 100644 --- a/src/python_testing/matter_testing_infrastructure/metadata_parser/metadata.py +++ b/src/python_testing/matter_testing_infrastructure/metadata_parser/metadata.py @@ -33,6 +33,7 @@ class Metadata: app: str app_args: str script_args: str + script_start_delay: int = 0 factoryreset: bool = False factoryreset_app_only: bool = False script_gdb: bool = False @@ -60,6 +61,9 @@ def copy_from_dict(self, attr_dict: Dict[str, Any]) -> None: if "script-args" in attr_dict: self.script_args = attr_dict["script-args"] + if "script-start-delay" in attr_dict: + self.script_start_delay = int(attr_dict["script-start-delay"]) + if "py_script_path" in attr_dict: self.py_script_path = attr_dict["py_script_path"] @@ -187,6 +191,7 @@ def parse_script(self, py_script_path: str) -> List[Metadata]: app=attr.get("app", ""), app_args=attr.get("app_args", ""), script_args=attr.get("script_args", ""), + script_start_delay=int(attr.get("script_start_delay", 0)), factoryreset=bool(attr.get("factoryreset", False)), factoryreset_app_only=bool(attr.get("factoryreset_app_only", False)), script_gdb=bool(attr.get("script_gdb", False)), diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index 4127ead64c3083..c5d46e2306dae2 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -28,6 +28,7 @@ import re import sys import textwrap +import threading import time import typing import uuid @@ -37,7 +38,7 @@ from datetime import datetime, timedelta, timezone from enum import Enum, IntFlag from functools import partial -from typing import Any, List, Optional, Tuple +from typing import Any, Iterable, List, Optional, Tuple from chip.tlv import float32, uint @@ -49,6 +50,8 @@ from chip.ChipDeviceCtrl import CommissioningParameters # isort: on +from time import sleep + import chip.clusters as Clusters import chip.logging import chip.native @@ -263,6 +266,7 @@ def __call__(self, res: EventReadResult, transaction: SubscriptionTransaction): def wait_for_event_report(self, expected_event: ClusterObjects.ClusterEvent, timeout_sec: float = 10.0) -> Any: """This function allows a test script to block waiting for the specific event to be the next event to arrive within a timeout (specified in seconds). It returns the event data so that the values can be checked.""" + logging.info(f"Waiting for {expected_event} for {timeout_sec:.1f} seconds") try: res = self._q.get(block=True, timeout=timeout_sec) except queue.Empty: @@ -270,6 +274,7 @@ def wait_for_event_report(self, expected_event: ClusterObjects.ClusterEvent, tim asserts.assert_equal(res.Header.ClusterId, expected_event.cluster_id, "Expected cluster ID not found in event report") asserts.assert_equal(res.Header.EventId, expected_event.event_id, "Expected event ID not found in event report") + logging.info(f"Successfully waited for {expected_event}") return res.Data def wait_for_event_expect_no_report(self, timeout_sec: float = 10.0): @@ -296,6 +301,10 @@ def flush_events(self) -> None: _ = self.get_last_event() return + def reset(self) -> None: + """Resets state as if no events had ever been received.""" + self.flush_events() + @property def event_queue(self) -> queue.Queue: return self._q @@ -343,7 +352,15 @@ def clear_queue(report_queue: queue.Queue): break -def await_sequence_of_reports(report_queue: queue.Queue, endpoint_id: int, attribute: TypedAttributePath, sequence: list[Any], timeout_sec: float): +@dataclass +class AttributeValue: + endpoint_id: int + attribute: ClusterObjects.ClusterAttributeDescriptor + value: Any + timestamp_utc: Optional[datetime] = None + + +def await_sequence_of_reports(report_queue: queue.Queue, endpoint_id: int, attribute: TypedAttributePath, sequence: list[Any], timeout_sec: float) -> None: """Given a queue.Queue hooked-up to an attribute change accumulator, await a given expected sequence of attribute reports. Args: @@ -370,6 +387,7 @@ def await_sequence_of_reports(report_queue: queue.Queue, endpoint_id: int, attri while time_remaining > 0: expected_value = sequence[sequence_idx] logging.info(f"Expecting value {expected_value} for attribute {attribute} on endpoint {endpoint_id}") + logging.info(f"Waiting for {timeout_sec:.1f} seconds for all reports.") try: item: AttributeValue = report_queue.get(block=True, timeout=time_remaining) @@ -382,7 +400,7 @@ def await_sequence_of_reports(report_queue: queue.Queue, endpoint_id: int, attri sequence_idx += 1 else: asserts.assert_equal(item.value, expected_value, - msg="Did not get expected attribute value in correct sequence.") + msg=f"Did not get expected attribute value in correct sequence. Sequence so far: {actual_values}") # We are done waiting when we have accumulated all results. if sequence_idx == len(sequence): @@ -398,42 +416,49 @@ def await_sequence_of_reports(report_queue: queue.Queue, endpoint_id: int, attri asserts.fail(f"Did not get full sequence {sequence} in {timeout_sec:.1f} seconds. Got {actual_values} before time-out.") -@dataclass -class AttributeValue: - endpoint_id: int - attribute: ClusterObjects.ClusterAttributeDescriptor - value: Any - timestamp_utc: datetime - - class ClusterAttributeChangeAccumulator: def __init__(self, expected_cluster: ClusterObjects.Cluster): self._expected_cluster = expected_cluster self._subscription = None + self._lock = threading.Lock() + self._q = queue.Queue() + self._endpoint_id = 0 self.reset() def reset(self): - self._attribute_report_counts = {} - attrs = [cls for name, cls in inspect.getmembers(self._expected_cluster.Attributes) if inspect.isclass( - cls) and issubclass(cls, ClusterObjects.ClusterAttributeDescriptor)] - self._attribute_reports = {} - for a in attrs: - self._attribute_report_counts[a] = 0 - self._attribute_reports[a] = [] - self._q = queue.Queue() - - async def start(self, dev_ctrl, node_id: int, endpoint: int, fabric_filtered: bool = False, min_interval_sec: int = 0, max_interval_sec: int = 5) -> Any: + with self._lock: + self._attribute_report_counts = {} + attrs = [cls for name, cls in inspect.getmembers(self._expected_cluster.Attributes) if inspect.isclass( + cls) and issubclass(cls, ClusterObjects.ClusterAttributeDescriptor)] + self._attribute_reports = {} + for a in attrs: + self._attribute_report_counts[a] = 0 + self._attribute_reports[a] = [] + + self.flush_reports() + + async def start(self, dev_ctrl, node_id: int, endpoint: int, fabric_filtered: bool = False, min_interval_sec: int = 0, max_interval_sec: int = 5, keepSubscriptions: bool = True) -> Any: """This starts a subscription for attributes on the specified node_id and endpoint. The cluster is specified when the class instance is created.""" self._subscription = await dev_ctrl.ReadAttribute( nodeid=node_id, attributes=[(endpoint, self._expected_cluster)], reportInterval=(int(min_interval_sec), int(max_interval_sec)), fabricFiltered=fabric_filtered, - keepSubscriptions=True + keepSubscriptions=keepSubscriptions ) + self._endpoint_id = endpoint self._subscription.SetAttributeUpdateCallback(self.__call__) return self._subscription + async def cancel(self): + """This cancels a subscription.""" + # Wait for the asyncio.CancelledError to be called before returning + try: + self._subscription.Shutdown() + await asyncio.sleep(5) + except asyncio.CancelledError: + pass + def __call__(self, path: TypedAttributePath, transaction: SubscriptionTransaction): """This is the subscription callback when an attribute report is received. It checks the report is from the expected_cluster and then posts it into the queue for later processing.""" @@ -443,8 +468,74 @@ def __call__(self, path: TypedAttributePath, transaction: SubscriptionTransactio value=data, timestamp_utc=datetime.now(timezone.utc)) logging.info(f"Got subscription report for {path.AttributeType}: {data}") self._q.put(value) - self._attribute_report_counts[path.AttributeType] += 1 - self._attribute_reports[path.AttributeType].append(value) + with self._lock: + self._attribute_report_counts[path.AttributeType] += 1 + self._attribute_reports[path.AttributeType].append(value) + + def await_all_final_values_reported(self, expected_final_values: Iterable[AttributeValue], timeout_sec: float = 1.0): + """Expect that every `expected_final_value` report is the last value reported for the given attribute, ignoring timestamps. + + Waits for at least `timeout_sec` seconds. + + This is a form of barrier for a set of attribute changes that should all happen together for an action. + """ + start_time = time.time() + elapsed = 0.0 + time_remaining = timeout_sec + + last_report_matches: dict[int, bool] = {idx: False for idx, _ in enumerate(expected_final_values)} + + for element in expected_final_values: + logging.info( + f"--> Expecting report for value {element.value} for attribute {element.attribute} on endpoint {element.endpoint_id}") + logging.info(f"Waiting for {timeout_sec:.1f} seconds for all reports.") + + while time_remaining > 0: + # Snapshot copy at the beginning of the loop. This is thread-safe based on the design. + all_reports = self._attribute_reports + + # Recompute all last-value matches + for expected_idx, expected_element in enumerate(expected_final_values): + last_value = None + for report in all_reports.get(expected_element.attribute, []): + if report.endpoint_id == expected_element.endpoint_id: + last_value = report.value + + last_report_matches[expected_idx] = (last_value is not None and last_value == expected_element.value) + + # Determine if all were met + if all(last_report_matches.values()): + logging.info("Found all expected reports were true.") + return + + elapsed = time.time() - start_time + time_remaining = timeout_sec - elapsed + time.sleep(0.1) + + # If we reach here, there was no early return and we failed to find all the values. + logging.error("Reached time-out without finding all expected report values.") + logging.info("Values found:") + for expected_idx, expected_element in enumerate(expected_final_values): + logging.info(f" -> {expected_element} found: {last_report_matches.get(expected_idx)}") + asserts.fail("Did not find all expected last report values before time-out") + + def await_sequence_of_reports(self, attribute: TypedAttributePath, sequence: list[Any], timeout_sec: float) -> None: + """Await a given expected sequence of attribute reports in the accumulator for the endpoint associated. + + Args: + - attribute: attribute to match for reports to check. + - sequence: list of attribute values in order that are expected. + - timeout_sec: number of seconds to wait for. + + *** WARNING: The queue contains every report since the sub was established. Use + self.reset() to make it empty. *** + + This will fail current Mobly test with assertion failure if the data is not as expected in order. + + Returns nothing on success so the test can go on. + """ + await_sequence_of_reports(report_queue=self.attribute_queue, endpoint_id=self._endpoint_id, + attribute=attribute, sequence=sequence, timeout_sec=timeout_sec) @property def attribute_queue(self) -> queue.Queue: @@ -452,11 +543,13 @@ def attribute_queue(self) -> queue.Queue: @property def attribute_report_counts(self) -> dict[ClusterObjects.ClusterAttributeDescriptor, int]: - return self._attribute_report_counts + with self._lock: + return self._attribute_report_counts @property def attribute_reports(self) -> dict[ClusterObjects.ClusterAttributeDescriptor, AttributeValue]: - return self._attribute_reports + with self._lock: + return self._attribute_reports.copy() def get_last_report(self) -> Optional[Any]: """Flush entire queue, returning last (newest) report only.""" @@ -532,12 +625,12 @@ class MatterTestConfig: # List of explicit tests to run by name. If empty, all tests will run tests: List[str] = field(default_factory=list) timeout: typing.Union[int, None] = None - endpoint: int = 0 + endpoint: typing.Union[int, None] = 0 app_pid: int = 0 commissioning_method: Optional[str] = None - discriminators: Optional[List[int]] = None - setup_passcodes: Optional[List[int]] = None + discriminators: List[int] = field(default_factory=list) + setup_passcodes: List[int] = field(default_factory=list) commissionee_ip_address_just_for_testing: Optional[str] = None # By default, we start with maximized cert chains, as required for RR-1.1. # This allows cert tests to be run without re-commissioning for RR-1.1. @@ -553,7 +646,7 @@ class MatterTestConfig: pics: dict[bool, str] = field(default_factory=dict) # Node ID for basic DUT - dut_node_ids: Optional[List[int]] = None + dut_node_ids: List[int] = field(default_factory=list) # Node ID to use for controller/commissioner controller_node_id: int = _DEFAULT_CONTROLLER_NODE_ID # CAT Tags for default controller/commissioner @@ -841,6 +934,8 @@ def __init__(self, *args): # List of accumulated problems across all tests self.problems = [] self.is_commissioning = False + # The named pipe name must be set in the derived classes + self.app_pipe = None def get_test_steps(self, test: str) -> list[TestStep]: ''' Retrieves the test step list for the given test @@ -904,6 +999,60 @@ def get_test_desc(self, test: str) -> str: except AttributeError: return test + def get_default_app_pipe_name(self) -> str: + return self.app_pipe + + def write_to_app_pipe(self, command_dict: dict, app_pipe_name: Optional[str] = None): + """ + Sends an out-of-band command to a Matter app. + + Use the following environment variables: + + - LINUX_DUT_IP + * if not provided, the Matter app is assumed to run on the same machine as the test, + such as during CI, and the commands are sent to it using a local named pipe + * if provided, the commands for writing to the named pipe are forwarded to the DUT + - LINUX_DUT_USER + + * if LINUX_DUT_IP is provided, use this for the DUT user name + * If a remote password is needed, set up ssh keys to ensure that this script can log in to the DUT without a password: + + Step 1: If you do not have a key, create one using ssh-keygen + + Step 2: Authorize this key on the remote host: run ssh-copy-id user@ip once, using your password + + Step 3: From now on ssh user@ip will no longer ask for your password + """ + + if app_pipe_name is None: + app_pipe_name = self.get_default_app_pipe_name() + + if not isinstance(app_pipe_name, str): + raise TypeError("the named pipe must be provided as a string value") + + if not isinstance(command_dict, dict): + raise TypeError("the command must be passed as a dictionary value") + + import json + command = json.dumps(command_dict) + + import os + dut_ip = os.getenv('LINUX_DUT_IP') + + if dut_ip is None: + with open(app_pipe_name, "w") as app_pipe: + app_pipe.write(command + "\n") + # TODO(#31239): remove the need for sleep + sleep(0.001) + else: + logging.info(f"Using DUT IP address: {dut_ip}") + + dut_uname = os.getenv('LINUX_DUT_USER') + asserts.assert_true(dut_uname is not None, "The LINUX_DUT_USER environment variable must be set") + + logging.info(f"Using DUT user name: {dut_uname}") + + command_fixed = command.replace('\"', '\\"') + cmd = "echo \"%s\" | ssh %s@%s \'cat > %s\'" % (command_fixed, dut_uname, dut_ip, app_pipe_name) + os.system(cmd) + # Override this if the test requires a different default timeout. # This value will be overridden if a timeout is supplied on the command line. @property @@ -1008,7 +1157,7 @@ async def read_single_attribute_check_success( if node_id is None: node_id = self.dut_node_id if endpoint is None: - endpoint = self.matter_test_config.endpoint + endpoint = 0 if self.matter_test_config.endpoint is None else self.matter_test_config.endpoint result = await dev_ctrl.ReadAttribute(node_id, [(endpoint, attribute)], fabricFiltered=fabric_filtered) attr_ret = result[endpoint][cluster][attribute] @@ -1040,7 +1189,7 @@ async def read_single_attribute_expect_error( if node_id is None: node_id = self.dut_node_id if endpoint is None: - endpoint = self.matter_test_config.endpoint + endpoint = 0 if self.matter_test_config.endpoint is None else self.matter_test_config.endpoint result = await dev_ctrl.ReadAttribute(node_id, [(endpoint, attribute)], fabricFiltered=fabric_filtered) attr_ret = result[endpoint][cluster][attribute] @@ -1069,12 +1218,13 @@ async def write_single_attribute(self, attribute_value: object, endpoint_id: int """ dev_ctrl = self.default_controller node_id = self.dut_node_id - endpoint = self.matter_test_config.endpoint if endpoint_id is None else endpoint_id + if endpoint_id is None: + endpoint_id = 0 if self.matter_test_config.endpoint is None else self.matter_test_config.endpoint - write_result = await dev_ctrl.WriteAttribute(node_id, [(endpoint, attribute_value)]) + write_result = await dev_ctrl.WriteAttribute(node_id, [(endpoint_id, attribute_value)]) if expect_success: asserts.assert_equal(write_result[0].Status, Status.Success, - f"Expected write success for write to attribute {attribute_value} on endpoint {endpoint}") + f"Expected write success for write to attribute {attribute_value} on endpoint {endpoint_id}") return write_result[0].Status async def send_single_cmd( @@ -1087,7 +1237,7 @@ async def send_single_cmd( if node_id is None: node_id = self.dut_node_id if endpoint is None: - endpoint = self.matter_test_config.endpoint + endpoint = 0 if self.matter_test_config.endpoint is None else self.matter_test_config.endpoint result = await dev_ctrl.SendCommand(nodeid=node_id, endpoint=endpoint, payload=cmd, timedRequestTimeoutMs=timedRequestTimeoutMs, payloadCapability=payloadCapability) @@ -1380,11 +1530,21 @@ def wait_for_user_input(self, Returns: str: User input or none if input is closed. """ + + # TODO(#31928): Remove any assumptions of test params for endpoint ID. + + # Get the endpoint user param instead of `--endpoint-id` result, if available, temporarily. + endpoint_id = self.user_params.get("endpoint", None) + if endpoint_id is None or not isinstance(endpoint_id, int): + endpoint_id = self.matter_test_config.endpoint + if self.runner_hook: + # TODO(#31928): Add endpoint support to hooks. self.runner_hook.show_prompt(msg=prompt_msg, placeholder=prompt_msg_placeholder, default_value=default_value) - logging.info("========= USER PROMPT =========") + + logging.info(f"========= USER PROMPT for Endpoint {endpoint_id} =========") logging.info(f">>> {prompt_msg.rstrip()} (press enter to confirm)") try: return input() @@ -1571,19 +1731,8 @@ def populate_commissioning_args(args: argparse.Namespace, config: MatterTestConf config.qr_code_content.extend(args.qr_code) config.manual_code.extend(args.manual_code) - - if args.commissioning_method is None: - return True - - if args.discriminators == [] and (args.qr_code == [] and args.manual_code == []): - print("error: Missing --discriminator when no --qr-code/--manual-code present!") - return False - config.discriminators = args.discriminators - - if args.passcodes == [] and (args.qr_code == [] and args.manual_code == []): - print("error: Missing --passcode when no --qr-code/--manual-code present!") - return False - config.setup_passcodes = args.passcodes + config.discriminators.extend(args.discriminators) + config.setup_passcodes.extend(args.passcodes) if args.qr_code != [] and args.manual_code != []: print("error: Cannot have both --qr-code and --manual-code present!") @@ -1595,14 +1744,20 @@ def populate_commissioning_args(args: argparse.Namespace, config: MatterTestConf device_descriptors = config.qr_code_content + config.manual_code + config.discriminators + if not config.dut_node_ids: + config.dut_node_ids = [_DEFAULT_DUT_NODE_ID] + + if args.commissioning_method is None: + return True + if len(config.dut_node_ids) > len(device_descriptors): print("error: More node IDs provided than discriminators") return False if len(config.dut_node_ids) < len(device_descriptors): - missing = len(device_descriptors) - len(config.dut_node_ids) # We generate new node IDs sequentially from the last one seen for all # missing NodeIDs when commissioning many nodes at once. + missing = len(device_descriptors) - len(config.dut_node_ids) for i in range(missing): config.dut_node_ids.append(config.dut_node_ids[-1] + 1) @@ -1614,6 +1769,14 @@ def populate_commissioning_args(args: argparse.Namespace, config: MatterTestConf print("error: Duplicate value in discriminator list") return False + if args.discriminators == [] and (args.qr_code == [] and args.manual_code == []): + print("error: Missing --discriminator when no --qr-code/--manual-code present!") + return False + + if args.passcodes == [] and (args.qr_code == [] and args.manual_code == []): + print("error: Missing --passcode when no --qr-code/--manual-code present!") + return False + if config.commissioning_method == "ble-wifi": if args.wifi_ssid is None: print("error: missing --wifi-ssid for --commissioning-method ble-wifi!") @@ -1660,7 +1823,7 @@ def convert_args_to_matter_config(args: argparse.Namespace) -> MatterTestConfig: config.pics = {} if args.PICS is None else read_pics_from_file(args.PICS) config.tests = [] if args.tests is None else args.tests config.timeout = args.timeout # This can be none, we pull the default from the test if it's unspecified - config.endpoint = 0 if args.endpoint is None else args.endpoint + config.endpoint = args.endpoint config.app_pid = 0 if args.app_pid is None else args.app_pid config.controller_node_id = args.controller_node_id @@ -1710,10 +1873,10 @@ def parse_matter_test_args(argv: Optional[List[str]] = None) -> MatterTestConfig default=_DEFAULT_CONTROLLER_NODE_ID, help='NodeID to use for initial/default controller (default: %d)' % _DEFAULT_CONTROLLER_NODE_ID) basic_group.add_argument('-n', '--dut-node-id', '--nodeId', type=int_decimal_or_hex, - metavar='NODE_ID', dest='dut_node_ids', default=[_DEFAULT_DUT_NODE_ID], + metavar='NODE_ID', dest='dut_node_ids', default=[], help='Node ID for primary DUT communication, ' 'and NodeID to assign if commissioning (default: %d)' % _DEFAULT_DUT_NODE_ID, nargs="+") - basic_group.add_argument('--endpoint', type=int, default=0, help="Endpoint under test") + basic_group.add_argument('--endpoint', type=int, default=None, help="Endpoint under test") basic_group.add_argument('--app-pid', type=int, default=0, help="The PID of the app against which the test is going to run") basic_group.add_argument('--timeout', type=int, help="Test timeout in seconds") basic_group.add_argument("--PICS", help="PICS file path", type=str) @@ -1821,20 +1984,6 @@ def async_runner(self: MatterBaseTest, *args, **kwargs): return async_runner -def per_node_test(body): - """ Decorator to be used for PICS-free tests that apply to the entire node. - - Use this decorator when your script needs to be run once to validate the whole node. - To use this decorator, the test must NOT have an associated pics_ method. - """ - - def whole_node_runner(self: MatterBaseTest, *args, **kwargs): - asserts.assert_false(self.get_test_pics(self.current_test_info.name), "pics_ method supplied for per_node_test.") - return _async_runner(body, self, *args, **kwargs) - - return whole_node_runner - - EndpointCheckFunction = typing.Callable[[Clusters.Attribute.AsyncReadTransaction.ReadResponse, int], bool] @@ -1854,9 +2003,9 @@ def _has_cluster(wildcard, endpoint, cluster: ClusterObjects.Cluster) -> bool: def has_cluster(cluster: ClusterObjects.ClusterObjectDescriptor) -> EndpointCheckFunction: - """ EndpointCheckFunction that can be passed as a parameter to the per_endpoint_test decorator. + """ EndpointCheckFunction that can be passed as a parameter to the run_if_endpoint_matches decorator. - Use this function with the per_endpoint_test decorator to run this test on all endpoints with + Use this function with the run_if_endpoint_matches decorator to run this test on all endpoints with the specified cluster. For example, given a device with the following conformance EP0: cluster A, B, C @@ -1865,13 +2014,12 @@ def has_cluster(cluster: ClusterObjects.ClusterObjectDescriptor) -> EndpointChec EP3, cluster E And the following test specification: - @per_endpoint_test(has_cluster(Clusters.D)) + @run_if_endpoint_matches(has_cluster(Clusters.D)) test_mytest(self): ... - The test would be run on endpoint 1 and on endpoint 2. - - If the cluster is not found on any endpoint the decorator will call the on_skip function to + If you run this test with --endpoint 1 or --endpoint 2, the test will be run. If you run this test + with any other --endpoint the run_if_endpoint_matches decorator will call the on_skip function to notify the test harness that the test is not applicable to this node and the test will not be run. """ return partial(_has_cluster, cluster=cluster) @@ -1881,15 +2029,18 @@ def _has_attribute(wildcard, endpoint, attribute: ClusterObjects.ClusterAttribut cluster = get_cluster_from_attribute(attribute) try: attr_list = wildcard.attributes[endpoint][cluster][cluster.Attributes.AttributeList] + if not isinstance(attr_list, list): + asserts.fail( + f"Failed to read mandatory AttributeList attribute value for cluster {cluster} on endpoint {endpoint}: {attr_list}.") return attribute.attribute_id in attr_list except KeyError: return False def has_attribute(attribute: ClusterObjects.ClusterAttributeDescriptor) -> EndpointCheckFunction: - """ EndpointCheckFunction that can be passed as a parameter to the per_endpoint_test decorator. + """ EndpointCheckFunction that can be passed as a parameter to the run_if_endpoint_matches decorator. - Use this function with the per_endpoint_test decorator to run this test on all endpoints with + Use this function with the run_if_endpoint_matches decorator to run this test on all endpoints with the specified attribute. For example, given a device with the following conformance EP0: cluster A, B, C @@ -1898,63 +2049,104 @@ def has_attribute(attribute: ClusterObjects.ClusterAttributeDescriptor) -> Endpo EP3, cluster D without attribute d And the following test specification: - @per_endpoint_test(has_attribute(Clusters.D.Attributes.d)) + @run_if_endpoint_matches(has_attribute(Clusters.D.Attributes.d)) test_mytest(self): ... - The test would be run on endpoint 1 and on endpoint 2. - - If the cluster is not found on any endpoint the decorator will call the on_skip function to + If you run this test with --endpoint 1 or --endpoint 2, the test will be run. If you run this test + with any other --endpoint the run_if_endpoint_matches decorator will call the on_skip function to notify the test harness that the test is not applicable to this node and the test will not be run. """ return partial(_has_attribute, attribute=attribute) -def _has_feature(wildcard, endpoint, cluster: ClusterObjects.ClusterObjectDescriptor, feature: IntFlag) -> bool: +def _has_feature(wildcard, endpoint: int, cluster: ClusterObjects.ClusterObjectDescriptor, feature: IntFlag) -> bool: try: feature_map = wildcard.attributes[endpoint][cluster][cluster.Attributes.FeatureMap] + if not isinstance(feature_map, int): + asserts.fail( + f"Failed to read mandatory FeatureMap attribute value for cluster {cluster} on endpoint {endpoint}: {feature_map}.") + return (feature & feature_map) != 0 except KeyError: return False def has_feature(cluster: ClusterObjects.ClusterObjectDescriptor, feature: IntFlag) -> EndpointCheckFunction: - """ EndpointCheckFunction that can be passed as a parameter to the per_endpoint_test decorator. + """ EndpointCheckFunction that can be passed as a parameter to the run_if_endpoint_matches decorator. - Use this function with the per_endpoint_test decorator to run this test on all endpoints with + Use this function with the run_if_endpoint_matches decorator to run this test on all endpoints with the specified feature. For example, given a device with the following conformance EP0: cluster A, B, C EP1: cluster D with feature F0 - EP2, cluster D with feature F0 - EP3, cluster D without feature F0 + EP2: cluster D with feature F0 + EP3: cluster D without feature F0 And the following test specification: - @per_endpoint_test(has_feature(Clusters.D.Bitmaps.Feature.F0)) + @run_if_endpoint_matches(has_feature(Clusters.D.Bitmaps.Feature.F0)) test_mytest(self): ... - The test would be run on endpoint 1 and on endpoint 2. - - If the cluster is not found on any endpoint the decorator will call the on_skip function to + If you run this test with --endpoint 1 or --endpoint 2, the test will be run. If you run this test + with any other --endpoint the run_if_endpoint_matches decorator will call the on_skip function to notify the test harness that the test is not applicable to this node and the test will not be run. """ return partial(_has_feature, cluster=cluster, feature=feature) -async def get_accepted_endpoints_for_test(self: MatterBaseTest, accept_function: EndpointCheckFunction) -> list[uint]: - """ Helper function for the per_endpoint_test decorator. +async def _get_all_matching_endpoints(self: MatterBaseTest, accept_function: EndpointCheckFunction) -> list[uint]: + """ Returns a list of endpoints matching the accept condition. """ + wildcard = await self.default_controller.Read(self.dut_node_id, [(Clusters.Descriptor), Attribute.AttributePath(None, None, GlobalAttributeIds.ATTRIBUTE_LIST_ID), Attribute.AttributePath(None, None, GlobalAttributeIds.FEATURE_MAP_ID), Attribute.AttributePath(None, None, GlobalAttributeIds.ACCEPTED_COMMAND_LIST_ID)]) + matching = [e for e in wildcard.attributes.keys() if accept_function(wildcard, e)] + return matching + - Returns a list of endpoints on which the test should be run given the accept_function for the test. +async def should_run_test_on_endpoint(self: MatterBaseTest, accept_function: EndpointCheckFunction) -> bool: + """ Helper function for the run_if_endpoint_matches decorator. + + Returns True if self.matter_test_config.endpoint matches the accept function. """ - wildcard = await self.default_controller.Read(self.dut_node_id, [(Clusters.Descriptor), Attribute.AttributePath(None, None, GlobalAttributeIds.ATTRIBUTE_LIST_ID), Attribute.AttributePath(None, None, GlobalAttributeIds.FEATURE_MAP_ID), Attribute.AttributePath(None, None, GlobalAttributeIds.ACCEPTED_COMMAND_LIST_ID)]) - return [e for e in wildcard.attributes.keys() if accept_function(wildcard, e)] + if self.matter_test_config.endpoint is None: + msg = """ + The --endpoint flag is required for this test. + """ + asserts.fail(msg) + matching = await (_get_all_matching_endpoints(self, accept_function)) + return self.matter_test_config.endpoint in matching + + +def run_on_singleton_matching_endpoint(accept_function: EndpointCheckFunction): + """ Test decorator for a test that needs to be run on the endpoint that matches the given accept function. + + This decorator should be used for tests where the endpoint is not known a-priori (dynamic endpoints). + Note that currently this test is limited to devices with a SINGLE matching endpoint. + """ + def run_on_singleton_matching_endpoint_internal(body): + def matching_runner(self: MatterBaseTest, *args, **kwargs): + runner_with_timeout = asyncio.wait_for(_get_all_matching_endpoints(self, accept_function), timeout=30) + matching = asyncio.run(runner_with_timeout) + asserts.assert_less_equal(len(matching), 1, "More than one matching endpoint found for singleton test.") + if not matching: + logging.info("Test is not applicable to any endpoint - skipping test") + asserts.skip('No endpoint matches test requirements') + return + # Exceptions should flow through, hence no except block + try: + old_endpoint = self.matter_test_config.endpoint + self.matter_test_config.endpoint = matching[0] + logging.info(f'Running test on endpoint {self.matter_test_config.endpoint}') + _async_runner(body, self, *args, **kwargs) + finally: + self.matter_test_config.endpoint = old_endpoint + return matching_runner + return run_on_singleton_matching_endpoint_internal -def per_endpoint_test(accept_function: EndpointCheckFunction): - """ Test decorator for a test that needs to be run once per endpoint that meets the accept_function criteria. +def run_if_endpoint_matches(accept_function: EndpointCheckFunction): + """ Test decorator for a test that needs to be run only if the endpoint meets the accept_function criteria. - Place this decorator above the test_ method to have the test framework run this test once per endpoint. + Place this decorator above the test_ method to have the test framework run this test only if the endpoint matches. This decorator takes an EndpointCheckFunction to assess whether a test needs to be run on a particular endpoint. @@ -1966,52 +2158,31 @@ def per_endpoint_test(accept_function: EndpointCheckFunction): EP3, cluster E And the following test specification: - @per_endpoint_test(has_cluster(Clusters.D)) + @run_if_endpoint_matches(has_cluster(Clusters.D)) test_mytest(self): ... - The test would be run on endpoint 1 and on endpoint 2. - - If the cluster is not found on any endpoint the decorator will call the on_skip function to + If you run this test with --endpoint 1 or --endpoint 2, the test will be run. If you run this test + with any other --endpoint the decorator will call the on_skip function to notify the test harness that the test is not applicable to this node and the test will not be run. - The decorator works by setting the self.matter_test_config.endpoint value and running the test function. - Therefore, tests that make use of this decorator should call controller functions against that endpoint. - Support functions in this file default to this endpoint. - Tests that use this decorator cannot use a pics_ method for test selection and should not reference any PICS values internally. """ - def per_endpoint_test_internal(body): + def run_if_endpoint_matches_internal(body): def per_endpoint_runner(self: MatterBaseTest, *args, **kwargs): - asserts.assert_false(self.get_test_pics(self.current_test_info.name), "pics_ method supplied for per_endpoint_test.") - runner_with_timeout = asyncio.wait_for(get_accepted_endpoints_for_test(self, accept_function), timeout=30) - endpoints = asyncio.run(runner_with_timeout) - if not endpoints: - logging.info("No matching endpoints found - skipping test") - asserts.skip('No endpoints match requirements') + asserts.assert_false(self.get_test_pics(self.current_test_info.name), + "pics_ method supplied for run_if_endpoint_matches.") + runner_with_timeout = asyncio.wait_for(should_run_test_on_endpoint(self, accept_function), timeout=60) + should_run_test = asyncio.run(runner_with_timeout) + if not should_run_test: + logging.info("Test is not applicable to this endpoint - skipping test") + asserts.skip('Endpoint does not match test requirements') return - logging.info(f"Running test on the following endpoints: {endpoints}") - # setup_class is meant to be called once, but setup_test is expected to be run before - # each iteration. Mobly will run it for us the first time, but since we're running this - # more than one time, we want to make sure we reset everything as expected. - # Ditto for teardown - we want to tear down after each iteration, and we want to notify the hook that - # the test iteration is stopped. test_stop is called by on_pass or on_fail during the last iteration or - # on failure. - original_ep = self.matter_test_config.endpoint - for e in endpoints: - logging.info(f'Running test on endpoint {e}') - if e != endpoints[0]: - self.setup_test() - self.matter_test_config.endpoint = e - _async_runner(body, self, *args, **kwargs) - if e != endpoints[-1] and not self.failed: - self.teardown_test() - test_duration = (datetime.now(timezone.utc) - self.test_start_time) / timedelta(microseconds=1) - self.runner_hook.test_stop(exception=None, duration=test_duration) - self.matter_test_config.endpoint = original_ep + logging.info(f'Running test on endpoint {self.matter_test_config.endpoint}') + _async_runner(body, self, *args, **kwargs) return per_endpoint_runner - return per_endpoint_test_internal + return run_if_endpoint_matches_internal class CommissionDeviceTest(MatterBaseTest): diff --git a/src/python_testing/mdns_discovery/mdns_discovery.py b/src/python_testing/mdns_discovery/mdns_discovery.py index 86661d65729da3..f8c9d46d70760a 100644 --- a/src/python_testing/mdns_discovery/mdns_discovery.py +++ b/src/python_testing/mdns_discovery/mdns_discovery.py @@ -18,6 +18,7 @@ import asyncio import json +import logging from dataclasses import asdict, dataclass from enum import Enum from typing import Dict, List, Optional @@ -25,6 +26,8 @@ from zeroconf import IPVersion, ServiceStateChange, Zeroconf from zeroconf.asyncio import AsyncServiceBrowser, AsyncServiceInfo, AsyncZeroconfServiceTypes +logger = logging.getLogger(__name__) + @dataclass class MdnsServiceInfo: @@ -79,7 +82,7 @@ class MdnsDiscovery: DISCOVERY_TIMEOUT_SEC = 15 - def __init__(self): + def __init__(self, verbose_logging: bool = False): """ Initializes the MdnsDiscovery instance. @@ -99,9 +102,15 @@ def __init__(self): # A list of service types self._service_types = [] + # Filtering to apply for received data items + self._name_filter = None + # An asyncio Event to signal when a service has been discovered self._event = asyncio.Event() + # Verbose logging + self._verbose_logging = verbose_logging + # Public methods async def get_commissioner_service(self, log_output: bool = False, discovery_timeout_sec: float = DISCOVERY_TIMEOUT_SEC @@ -116,6 +125,7 @@ async def get_commissioner_service(self, log_output: bool = False, Returns: Optional[MdnsServiceInfo]: An instance of MdnsServiceInfo or None if timeout reached. """ + self._name_filter = None return await self._get_service(MdnsServiceType.COMMISSIONER, log_output, discovery_timeout_sec) async def get_commissionable_service(self, log_output: bool = False, @@ -131,10 +141,12 @@ async def get_commissionable_service(self, log_output: bool = False, Returns: Optional[MdnsServiceInfo]: An instance of MdnsServiceInfo or None if timeout reached. """ + self._name_filter = None return await self._get_service(MdnsServiceType.COMMISSIONABLE, log_output, discovery_timeout_sec) - async def get_operational_service(self, service_name: str = None, - service_type: str = None, + async def get_operational_service(self, + node_id: Optional[int] = None, + compressed_fabric_id: Optional[int] = None, discovery_timeout_sec: float = DISCOVERY_TIMEOUT_SEC, log_output: bool = False ) -> Optional[MdnsServiceInfo]: @@ -144,35 +156,16 @@ async def get_operational_service(self, service_name: str = None, Args: log_output (bool): Logs the discovered services to the console. Defaults to False. discovery_timeout_sec (float): Defaults to 15 seconds. - service_name (str): The unique name of the mDNS service. Defaults to None. - service_type (str): The service type of the service. Defaults to None. + node_id: the node id to create the service name from + compressed_fabric_id: the fabric id to create the service name from Returns: Optional[MdnsServiceInfo]: An instance of MdnsServiceInfo or None if timeout reached. """ # Validation to ensure both or none of the parameters are provided - if (service_name is None) != (service_type is None): - raise ValueError("Both service_name and service_type must be provided together or not at all.") - - mdns_service_info = None - - if service_name is None and service_type is None: - mdns_service_info = await self._get_service(MdnsServiceType.OPERATIONAL, log_output, discovery_timeout_sec) - else: - print(f"Looking for MDNS service type '{service_type}', service name '{service_name}'") - # Get service info - service_info = AsyncServiceInfo(service_type, service_name) - is_discovered = await service_info.async_request(self._zc, 3000) - if is_discovered: - mdns_service_info = self._to_mdns_service_info_class(service_info) - self._discovered_services = {} - self._discovered_services[service_type] = [mdns_service_info] - - if log_output: - self._log_output() - - return mdns_service_info + self._name_filter = f'{compressed_fabric_id:016x}-{node_id:016x}.{MdnsServiceType.OPERATIONAL.value}'.upper() + return await self._get_service(MdnsServiceType.OPERATIONAL, log_output, discovery_timeout_sec) async def get_border_router_service(self, log_output: bool = False, discovery_timeout_sec: float = DISCOVERY_TIMEOUT_SEC @@ -237,7 +230,7 @@ async def _discover(self, if all_services: self._service_types = list(await AsyncZeroconfServiceTypes.async_find()) - print(f"Browsing for MDNS service(s) of type: {self._service_types}") + logger.info(f"Browsing for MDNS service(s) of type: {self._service_types}") aiobrowser = AsyncServiceBrowser(zeroconf=self._zc, type_=self._service_types, @@ -247,7 +240,7 @@ async def _discover(self, try: await asyncio.wait_for(self._event.wait(), timeout=discovery_timeout_sec) except asyncio.TimeoutError: - print(f"MDNS service discovery timed out after {discovery_timeout_sec} seconds.") + logger.error("MDNS service discovery timed out after %d seconds.", discovery_timeout_sec) finally: await aiobrowser.async_cancel() @@ -276,13 +269,25 @@ def _on_service_state_change( Returns: None: This method does not return any value. """ - if state_change.value == ServiceStateChange.Added.value: - self._event.set() - asyncio.ensure_future(self._query_service_info( - zeroconf, - service_type, - name) - ) + if self._verbose_logging: + logger.info("Service state change: %s on %s/%s", state_change, name, service_type) + + if state_change.value == ServiceStateChange.Removed.value: + return + + if self._name_filter is not None and name.upper() != self._name_filter: + if self._verbose_logging: + logger.info(" Name does NOT match %s", self._name_filter) + return + + if self._verbose_logging: + logger.info("Received service data. Unlocking service information") + + asyncio.ensure_future(self._query_service_info( + zeroconf, + service_type, + name) + ) async def _query_service_info(self, zeroconf: Zeroconf, service_type: str, service_name: str) -> None: """ @@ -304,12 +309,19 @@ async def _query_service_info(self, zeroconf: Zeroconf, service_type: str, servi service_info.async_clear_cache() if is_service_discovered: + if self._verbose_logging: + logger.warning("Service discovered for %s/%s.", service_name, service_type) + mdns_service_info = self._to_mdns_service_info_class(service_info) if service_type not in self._discovered_services: self._discovered_services[service_type] = [mdns_service_info] else: self._discovered_services[service_type].append(mdns_service_info) + elif self._verbose_logging: + logger.warning("Service information not found.") + + self._event.set() def _to_mdns_service_info_class(self, service_info: AsyncServiceInfo) -> MdnsServiceInfo: """ @@ -355,21 +367,24 @@ async def _get_service(self, service_type: MdnsServiceType, any. Returns None if no service of the specified type is discovered within the timeout period. """ - mdns_service_info = None self._service_types = [service_type.value] await self._discover(discovery_timeout_sec, log_output) - if service_type.value in self._discovered_services: - mdns_service_info = self._discovered_services[service_type.value][0] - return mdns_service_info + if self._verbose_logging: + logger.info("Getting service from discovered services: %s", self._discovered_services) + + if service_type.value in self._discovered_services: + return self._discovered_services[service_type.value][0] + else: + return None def _log_output(self) -> str: """ - Converts the discovered services to a JSON string and prints it. + Converts the discovered services to a JSON string and log it. The method is intended to be used for debugging or informational purposes, providing a clear and comprehensive view of all services discovered during the mDNS service discovery process. """ converted_services = {key: [asdict(item) for item in value] for key, value in self._discovered_services.items()} json_str = json.dumps(converted_services, indent=4) - print(json_str) + logger.info("Discovery data:\n%s", json_str) diff --git a/src/python_testing/spec_parsing_support.py b/src/python_testing/spec_parsing_support.py index 1b8e29c4cf33cf..445e168ecb4f5a 100644 --- a/src/python_testing/spec_parsing_support.py +++ b/src/python_testing/spec_parsing_support.py @@ -108,6 +108,7 @@ class XmlCluster: unknown_commands: list[XmlCommand] events: dict[uint, XmlEvent] pics: str + is_provisional: bool class ClusterSide(Enum): @@ -206,6 +207,7 @@ def __init__(self, cluster, cluster_id, name): self._name = name self._derived = None + self._is_provisional = False try: classification = next(cluster.iter('classification')) hierarchy = classification.attrib['hierarchy'] @@ -214,6 +216,10 @@ def __init__(self, cluster, cluster_id, name): except (KeyError, StopIteration): self._derived = None + for id in cluster.iter('clusterIds'): + if list(id.iter('provisionalConform')): + self._is_provisional = True + try: classification = next(cluster.iter('classification')) self._pics = classification.attrib['picsCode'] @@ -398,6 +404,8 @@ def get_command_type(self, element: ElementTree.Element) -> CommandType: return CommandType.UNKNOWN if element.attrib['direction'].lower() == 'commandtoserver': return CommandType.ACCEPTED + if element.attrib['direction'].lower() == 'responsefromclient': + return CommandType.UNKNOWN raise Exception(f"Unknown direction: {element.attrib['direction']}") except KeyError: return CommandType.UNKNOWN @@ -451,7 +459,7 @@ def create_cluster(self) -> XmlCluster: accepted_commands=self.parse_commands(CommandType.ACCEPTED), generated_commands=self.parse_commands(CommandType.GENERATED), unknown_commands=self.parse_unknown_commands(), - events=self.parse_events(), pics=self._pics) + events=self.parse_events(), pics=self._pics, is_provisional=self._is_provisional) def get_problems(self) -> list[ProblemNotice]: return self._problems @@ -500,6 +508,7 @@ def check_clusters_for_unknown_commands(clusters: dict[int, XmlCluster], problem class PrebuiltDataModelDirectory(Enum): k1_3 = auto() + kInProgress = auto() kMaster = auto() @@ -511,6 +520,8 @@ class DataModelLevel(str, Enum): def _get_data_model_directory(data_model_directory: typing.Union[PrebuiltDataModelDirectory, str], data_model_level: DataModelLevel) -> str: if data_model_directory == PrebuiltDataModelDirectory.k1_3: return os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'data_model', '1.3', data_model_level) + elif data_model_directory == PrebuiltDataModelDirectory.kInProgress: + return os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'data_model', 'in_progress', data_model_level) elif data_model_directory == PrebuiltDataModelDirectory.kMaster: return os.path.join(os.path.dirname(os.path.realpath(__file__)), '..', '..', 'data_model', 'master', data_model_level) else: @@ -663,11 +674,13 @@ def combine_attributes(base: dict[uint, XmlAttribute], derived: dict[uint, XmlAt generated_commands[cmd.id].conformance = cmd.conformance else: unknown_commands.append(cmd) + provisional = c.is_provisional or base.is_provisional new = XmlCluster(revision=c.revision, derived=c.derived, name=c.name, feature_map=feature_map, attribute_map=attribute_map, command_map=command_map, features=features, attributes=attributes, accepted_commands=accepted_commands, - generated_commands=generated_commands, unknown_commands=unknown_commands, events=events, pics=c.pics) + generated_commands=generated_commands, unknown_commands=unknown_commands, events=events, pics=c.pics, + is_provisional=provisional) xml_clusters[id] = new @@ -743,7 +756,7 @@ def parse_single_device_type(root: ElementTree.Element) -> tuple[list[ProblemNot return device_types, problems -def build_xml_device_types(data_model_directory: typing.Union[PrebuiltDataModelDirectory, str] = PrebuiltDataModelDirectory.kMaster) -> tuple[dict[int, XmlDeviceType], list[ProblemNotice]]: +def build_xml_device_types(data_model_directory: typing.Union[PrebuiltDataModelDirectory, str] = PrebuiltDataModelDirectory.kInProgress) -> tuple[dict[int, XmlDeviceType], list[ProblemNotice]]: dir = _get_data_model_directory(data_model_directory, DataModelLevel.kDeviceType) device_types: dict[int, XmlDeviceType] = {} problems = [] diff --git a/src/python_testing/test_testing/MockTestRunner.py b/src/python_testing/test_testing/MockTestRunner.py index 024228db7cd035..2d0afb8a5c2e67 100644 --- a/src/python_testing/test_testing/MockTestRunner.py +++ b/src/python_testing/test_testing/MockTestRunner.py @@ -38,13 +38,14 @@ async def __call__(self, *args, **kwargs): class MockTestRunner(): - def __init__(self, filename: str, classname: str, test: str, endpoint: int = 0, pics: dict[str, bool] = None, paa_trust_store_path=None): - self.test = test - self.endpoint = endpoint - self.pics = pics + def __init__(self, filename: str, classname: str, test: str, endpoint: int = None, pics: dict[str, bool] = None, paa_trust_store_path=None): self.kvs_storage = 'kvs_admin.json' - self.paa_path = paa_trust_store_path + self.config = MatterTestConfig(endpoint=endpoint, paa_trust_store_path=paa_trust_store_path, + pics=pics, storage_path=self.kvs_storage) self.set_test(filename, classname, test) + + self.set_test_config(self.config) + self.stack = MatterStackState(self.config) self.default_controller = self.stack.certificate_authorities[0].adminList[0].NewController( nodeId=self.config.controller_node_id, @@ -54,20 +55,16 @@ def __init__(self, filename: str, classname: str, test: str, endpoint: int = 0, def set_test(self, filename: str, classname: str, test: str): self.test = test - self.set_test_config() + self.config.tests = [self.test] module = importlib.import_module(Path(os.path.basename(filename)).stem) self.test_class = getattr(module, classname) def set_test_config(self, test_config: MatterTestConfig = MatterTestConfig()): self.config = test_config self.config.tests = [self.test] - self.config.endpoint = self.endpoint self.config.storage_path = self.kvs_storage - self.config.paa_trust_store_path = self.paa_path if not self.config.dut_node_ids: self.config.dut_node_ids = [1] - if self.pics: - self.config.pics = self.pics def Shutdown(self): self.stack.Shutdown() diff --git a/src/python_testing/test_testing/TestDecorators.py b/src/python_testing/test_testing/TestDecorators.py index 2ce418d6c5e43a..1ad5bc550bc237 100644 --- a/src/python_testing/test_testing/TestDecorators.py +++ b/src/python_testing/test_testing/TestDecorators.py @@ -32,12 +32,13 @@ from chip.clusters import Attribute try: - from matter_testing_support import (MatterBaseTest, async_test_body, get_accepted_endpoints_for_test, has_attribute, - has_cluster, has_feature, per_endpoint_test, per_node_test) + from matter_testing_support import (MatterBaseTest, MatterTestConfig, async_test_body, has_attribute, has_cluster, has_feature, + run_if_endpoint_matches, run_on_singleton_matching_endpoint, should_run_test_on_endpoint) except ImportError: sys.path.append(os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) - from matter_testing_support import (MatterBaseTest, async_test_body, get_accepted_endpoints_for_test, has_attribute, - has_cluster, has_feature, per_endpoint_test, per_node_test) + from matter_testing_support import (MatterBaseTest, MatterTestConfig, async_test_body, has_attribute, + has_cluster, has_feature, run_if_endpoint_matches, run_on_singleton_matching_endpoint, + should_run_test_on_endpoint) from typing import Optional @@ -136,107 +137,101 @@ async def test_endpoints(self): all_endpoints = await self.default_controller.Read(self.dut_node_id, [()]) all_endpoints = list(all_endpoints.attributes.keys()) - msg = "Unexpected endpoint list returned" + msg = "Unexpected evaluation of should_run_test_on_endpoint" + for e in all_endpoints: + self.matter_test_config.endpoint = e + should_run = await should_run_test_on_endpoint(self, has_onoff) + asserts.assert_true(should_run, msg) - endpoints = await get_accepted_endpoints_for_test(self, has_onoff) - asserts.assert_equal(endpoints, all_endpoints, msg) + should_run = await should_run_test_on_endpoint(self, has_onoff_onoff) + asserts.assert_true(should_run, msg) - endpoints = await get_accepted_endpoints_for_test(self, has_onoff_onoff) - asserts.assert_equal(endpoints, all_endpoints, msg) + should_run = await should_run_test_on_endpoint(self, has_onoff_ontime) + asserts.assert_false(should_run, msg) - endpoints = await get_accepted_endpoints_for_test(self, has_onoff_ontime) - asserts.assert_equal(endpoints, [], msg) + should_run = await should_run_test_on_endpoint(self, has_timesync) + asserts.assert_false(should_run, msg) - endpoints = await get_accepted_endpoints_for_test(self, has_timesync) - asserts.assert_equal(endpoints, [], msg) - - endpoints = await get_accepted_endpoints_for_test(self, has_timesync_utc) - asserts.assert_equal(endpoints, [], msg) - - # This test should cause an assertion because it has pics_ method - @per_node_test - async def test_whole_node_with_pics(self): - pass - - # This method returns the top level pics for test_whole_node_with_pics - # It is used to test that test_whole_node_with_pics will fail since you can't have a whole node test gated on a PICS. - def pics_whole_node_with_pics(self): - return ['EXAMPLE.S'] + should_run = await should_run_test_on_endpoint(self, has_timesync_utc) + asserts.assert_false(should_run, msg) # This test should cause an assertion because it has a pics_ method - @per_endpoint_test(has_cluster(Clusters.OnOff)) - async def test_per_endpoint_with_pics(self): + @run_if_endpoint_matches(has_cluster(Clusters.OnOff)) + async def test_endpoint_with_pics(self): pass - # This method returns the top level pics for test_per_endpoint_with_pics - # It is used to test that test_per_endpoint_with_pics will fail since you can't have a per endpoint test gated on a PICS. - def pics_per_endpoint_with_pics(self): + # This method returns the top level pics for test_endpoint_with_pics + # It is used to test that test_endpoint_with_pics will fail since you can't have a per endpoint test gated on a PICS. + def pics_endpoint_with_pics(self): return ['EXAMPLE.S'] - # This test should be run once - @per_node_test - async def test_whole_node_ok(self): - pass - # This test should be run once per endpoint - @per_endpoint_test(has_cluster(Clusters.OnOff)) + @run_if_endpoint_matches(has_cluster(Clusters.OnOff)) async def test_endpoint_cluster_yes(self): pass # This test should be skipped since this cluster isn't on any endpoint - @per_endpoint_test(has_cluster(Clusters.TimeSynchronization)) + @run_if_endpoint_matches(has_cluster(Clusters.TimeSynchronization)) async def test_endpoint_cluster_no(self): pass # This test should be run once per endpoint - @per_endpoint_test(has_attribute(Clusters.OnOff.Attributes.OnOff)) + @run_if_endpoint_matches(has_attribute(Clusters.OnOff.Attributes.OnOff)) async def test_endpoint_attribute_yes(self): pass # This test should be skipped since this attribute isn't on the supported cluster - @per_endpoint_test(has_attribute(Clusters.OnOff.Attributes.OffWaitTime)) + @run_if_endpoint_matches(has_attribute(Clusters.OnOff.Attributes.OffWaitTime)) async def test_endpoint_attribute_supported_cluster_no(self): pass # This test should be skipped since this attribute is part of an unsupported cluster - @per_endpoint_test(has_attribute(Clusters.TimeSynchronization.Attributes.Granularity)) + @run_if_endpoint_matches(has_attribute(Clusters.TimeSynchronization.Attributes.Granularity)) async def test_endpoint_attribute_unsupported_cluster_no(self): pass # This test should be run once per endpoint - @per_endpoint_test(has_feature(Clusters.OnOff, Clusters.OnOff.Bitmaps.Feature.kLighting)) + @run_if_endpoint_matches(has_feature(Clusters.OnOff, Clusters.OnOff.Bitmaps.Feature.kLighting)) async def test_endpoint_feature_yes(self): pass # This test should be skipped since this attribute is part of an unsupported cluster - @per_endpoint_test(has_feature(Clusters.TimeSynchronization, Clusters.TimeSynchronization.Bitmaps.Feature.kNTPClient)) + @run_if_endpoint_matches(has_feature(Clusters.TimeSynchronization, Clusters.TimeSynchronization.Bitmaps.Feature.kNTPClient)) async def test_endpoint_feature_unsupported_cluster_no(self): pass # This test should be run since both are present - @per_endpoint_test(has_attribute(Clusters.OnOff.Attributes.OnOff) and has_cluster(Clusters.OnOff)) + @run_if_endpoint_matches(has_attribute(Clusters.OnOff.Attributes.OnOff) and has_cluster(Clusters.OnOff)) async def test_endpoint_boolean_yes(self): pass # This test should be skipped since we have an OnOff cluster, but no Time sync - @per_endpoint_test(has_cluster(Clusters.OnOff) and has_cluster(Clusters.TimeSynchronization)) + @run_if_endpoint_matches(has_cluster(Clusters.OnOff) and has_cluster(Clusters.TimeSynchronization)) async def test_endpoint_boolean_no(self): pass - @per_endpoint_test(has_cluster(Clusters.OnOff)) + @run_if_endpoint_matches(has_cluster(Clusters.OnOff)) async def test_fail_on_ep0(self): if self.matter_test_config.endpoint == 0: asserts.fail("Expected failure") - @per_endpoint_test(has_cluster(Clusters.OnOff)) + @run_if_endpoint_matches(has_cluster(Clusters.OnOff)) async def test_fail_on_ep1(self): if self.matter_test_config.endpoint == 1: asserts.fail("Expected failure") - @per_node_test - async def test_fail_on_whole_node(self): + @run_on_singleton_matching_endpoint(has_cluster(Clusters.OnOff)) + async def test_run_on_singleton_matching_endpoint(self): + pass + + @run_on_singleton_matching_endpoint(has_cluster(Clusters.OnOff)) + async def test_run_on_singleton_matching_endpoint_failure(self): asserts.fail("Expected failure") + @run_on_singleton_matching_endpoint(has_attribute(Clusters.OnOff.Attributes.OffWaitTime)) + async def test_no_run_on_singleton_matching_endpoint(self): + pass + def main(): failures = [] @@ -258,82 +253,129 @@ def main(): if not ok: failures.append("Test case failure: test_endpoints") - test_name = 'test_whole_node_with_pics' - test_runner.set_test('TestDecorators.py', 'TestDecorators', test_name) - ok = test_runner.run_test_with_mock_read(read_resp, hooks) - if ok: - failures.append(f"Did not get expected test assertion on {test_name}") - - test_name = 'test_per_endpoint_with_pics' + test_name = 'test_endpoint_with_pics' test_runner.set_test('TestDecorators.py', 'TestDecorators', test_name) ok = test_runner.run_test_with_mock_read(read_resp, hooks) if ok: failures.append(f"Did not get expected test assertion on {test_name}") # Test should run once for the whole node, regardless of the number of endpoints - def run_check(test_name: str, read_response: Attribute.AsyncReadTransaction.ReadResponse, expected_runs: int, expect_skip: bool) -> None: + def run_check(test_name: str, read_response: Attribute.AsyncReadTransaction.ReadResponse, expect_skip: bool) -> None: nonlocal failures test_runner.set_test('TestDecorators.py', 'TestDecorators', test_name) hooks = DecoratorTestRunnerHooks() - ok = test_runner.run_test_with_mock_read(read_response, hooks) - started_ok = len(hooks.started) == expected_runs - skipped_ok = (hooks.skipped != []) == expect_skip - stopped_ok = hooks.stopped == expected_runs + num_endpoints = 2 + for e in [0, 1]: + test_runner.set_test_config(MatterTestConfig(endpoint=e)) + ok = test_runner.run_test_with_mock_read(read_response, hooks) + started_ok = len(hooks.started) == num_endpoints + expected_num_skips = 2 if expect_skip else 0 + skipped_ok = len(hooks.skipped) == expected_num_skips + stopped_ok = hooks.stopped == num_endpoints if not ok or not started_ok or not skipped_ok or not stopped_ok: failures.append( - f'Expected {expected_runs} run of {test_name}, skips expected: {expect_skip}. Runs: {hooks.started}, skips: {hooks.skipped} stops: {hooks.stopped}') - - def check_once_per_node(test_name: str): - run_check(test_name, get_clusters([0]), 1, False) - run_check(test_name, get_clusters([0, 1]), 1, False) + f'Expected {num_endpoints} run of {test_name}, skips expected: {expect_skip}. Runs: {hooks.started}, skips: {hooks.skipped} stops: {hooks.stopped}') def check_once_per_endpoint(test_name: str): - run_check(test_name, get_clusters([0]), 1, False) - run_check(test_name, get_clusters([0, 1]), 2, False) + run_check(test_name, get_clusters([0, 1]), False) - def check_skipped(test_name: str): - run_check(test_name, get_clusters([0]), 1, True) - run_check(test_name, get_clusters([0, 1]), 1, True) + def check_all_skipped(test_name: str): + run_check(test_name, get_clusters([0, 1]), True) - check_once_per_node('test_whole_node_ok') check_once_per_endpoint('test_endpoint_cluster_yes') - check_skipped('test_endpoint_cluster_no') + check_all_skipped('test_endpoint_cluster_no') check_once_per_endpoint('test_endpoint_attribute_yes') - check_skipped('test_endpoint_attribute_supported_cluster_no') - check_skipped('test_endpoint_attribute_unsupported_cluster_no') + check_all_skipped('test_endpoint_attribute_supported_cluster_no') + check_all_skipped('test_endpoint_attribute_unsupported_cluster_no') check_once_per_endpoint('test_endpoint_feature_yes') - check_skipped('test_endpoint_feature_unsupported_cluster_no') + check_all_skipped('test_endpoint_feature_unsupported_cluster_no') check_once_per_endpoint('test_endpoint_boolean_yes') - check_skipped('test_endpoint_boolean_no') + check_all_skipped('test_endpoint_boolean_no') test_name = 'test_fail_on_ep0' test_runner.set_test('TestDecorators.py', 'TestDecorators', test_name) read_resp = get_clusters([0, 1]) + # fail on EP0, pass on EP1 + test_runner.set_test_config(MatterTestConfig(endpoint=0)) ok = test_runner.run_test_with_mock_read(read_resp, hooks) if ok: failures.append(f"Did not get expected test assertion on {test_name}") - - test_name = 'test_fail_on_ep1' - test_runner.set_test('TestDecorators.py', 'TestDecorators', test_name) - read_resp = get_clusters([0, 1]) + test_runner.set_test_config(MatterTestConfig(endpoint=1)) ok = test_runner.run_test_with_mock_read(read_resp, hooks) - if ok: - failures.append(f"Did not get expected test assertion on {test_name}") + if not ok: + failures.append(f"Unexpected failure on {test_name}") test_name = 'test_fail_on_ep1' test_runner.set_test('TestDecorators.py', 'TestDecorators', test_name) - read_resp = get_clusters([0]) + read_resp = get_clusters([0, 1]) + # pass on EP0, fail on EP1 + test_runner.set_test_config(MatterTestConfig(endpoint=0)) ok = test_runner.run_test_with_mock_read(read_resp, hooks) if not ok: failures.append(f"Unexpected failure on {test_name}") - - test_name = 'test_fail_on_whole_node' - test_runner.set_test('TestDecorators.py', 'TestDecorators', test_name) - read_resp = get_clusters([0, 1]) + test_runner.set_test_config(MatterTestConfig(endpoint=1)) ok = test_runner.run_test_with_mock_read(read_resp, hooks) if ok: failures.append(f"Did not get expected test assertion on {test_name}") + def run_singleton_dynamic(test_name: str, cluster_list: list[int]) -> tuple[bool, DecoratorTestRunnerHooks]: + nonlocal failures + read_resp = get_clusters(cluster_list) + test_runner.set_test('TestDecorators.py', 'TestDecorators', test_name) + test_runner.set_test_config(MatterTestConfig(endpoint=2)) + hooks = DecoratorTestRunnerHooks() + ok = test_runner.run_test_with_mock_read(read_resp, hooks) + # for all tests, we need to ensure the endpoint was set back to the prior values + if test_runner.config.endpoint != 2: + failures.append(f"Dynamic tests {test_name} with clusters {cluster_list} did not set endpoint back to prior") + # All tests should have a start and a stop + started_ok = len(hooks.started) == 1 + stopped_ok = hooks.stopped == 1 + if not started_ok or not stopped_ok: + failures.append( + f'Hooks failure on {test_name}, Runs: {hooks.started}, skips: {hooks.skipped} stops: {hooks.stopped}') + return ok, hooks + + def expect_success_dynamic(test_name: str, cluster_list: list[int]): + ok, hooks = run_singleton_dynamic(test_name, cluster_list) + if not ok: + failures.append(f"Unexpected failure on {test_name} with cluster list {cluster_list}") + if hooks.skipped: + failures.append(f'Unexpected skip call on {test_name} with cluster list {cluster_list}') + + def expect_failure_dynamic(test_name: str, cluster_list: list[int]): + ok, hooks = run_singleton_dynamic(test_name, cluster_list) + if ok: + failures.append(f"Unexpected success on {test_name} with cluster list {cluster_list}") + if hooks.skipped: + # We don't expect a skip call because the test actually failed. + failures.append(f'Skip called for {test_name} with cluster list {cluster_list}') + + def expect_skip_dynamic(test_name: str, cluster_list: list[int]): + ok, hooks = run_singleton_dynamic(test_name, cluster_list) + if not ok: + failures.append(f"Unexpected failure on {test_name} with cluster list {cluster_list}") + if not hooks.skipped: + # We don't expect a skip call because the test actually failed. + failures.append(f'Skip not called for {test_name} with cluster list {cluster_list}') + + test_name = 'test_run_on_singleton_matching_endpoint' + expect_success_dynamic(test_name, [0]) + expect_success_dynamic(test_name, [1]) + # expect failure because there is more than 1 endpoint + expect_failure_dynamic(test_name, [0, 1]) + + test_name = 'test_run_on_singleton_matching_endpoint_failure' + expect_failure_dynamic(test_name, [0]) + expect_failure_dynamic(test_name, [1]) + expect_failure_dynamic(test_name, [0, 1]) + + test_name = 'test_no_run_on_singleton_matching_endpoint' + # no failure, no matches, expect skips on all endpoints + expect_skip_dynamic(test_name, [0]) + expect_skip_dynamic(test_name, [1]) + expect_skip_dynamic(test_name, [0, 1]) + test_runner.Shutdown() print( f"Test of Decorators: test response incorrect: {len(failures)}") diff --git a/src/python_testing/test_testing/test_TC_CCNTL_2_2.py b/src/python_testing/test_testing/test_TC_CCNTL_2_2.py index 77971779fecbfc..d528b5652e1b45 100644 --- a/src/python_testing/test_testing/test_TC_CCNTL_2_2.py +++ b/src/python_testing/test_testing/test_TC_CCNTL_2_2.py @@ -178,7 +178,7 @@ def main(th_server_app: str): print(f'paa = {paa_path}') pics = {"PICS_SDK_CI_ONLY": True} - test_runner = MyMock('TC_CCTRL_2_2', 'TC_CCTRL_2_2', 'test_TC_CCTRL_2_2', 1, paa_trust_store_path=paa_path, pics=pics) + test_runner = MyMock('TC_CCTRL_2_2', 'TC_CCTRL_2_2', 'test_TC_CCTRL_2_2', paa_trust_store_path=paa_path, pics=pics) config = MatterTestConfig() config.global_test_params = {'th_server_app_path': th_server_app} test_runner.set_test_config(config) diff --git a/src/python_testing/test_testing/test_TC_MCORE_FS_1_1.py b/src/python_testing/test_testing/test_TC_MCORE_FS_1_1.py index ec91db72551523..5b2e29b71915b1 100644 --- a/src/python_testing/test_testing/test_TC_MCORE_FS_1_1.py +++ b/src/python_testing/test_testing/test_TC_MCORE_FS_1_1.py @@ -149,7 +149,7 @@ def main(th_server_app: str): print(f'paa = {paa_path}') pics = {"PICS_SDK_CI_ONLY": True} - test_runner = MyMock('TC_MCORE_FS_1_1', 'TC_MCORE_FS_1_1', 'test_TC_MCORE_FS_1_1', 1, paa_trust_store_path=paa_path, pics=pics) + test_runner = MyMock('TC_MCORE_FS_1_1', 'TC_MCORE_FS_1_1', 'test_TC_MCORE_FS_1_1', paa_trust_store_path=paa_path, pics=pics) config = MatterTestConfig() config.user_params = {'th_server_app_path': th_server_app} test_runner.set_test_config(config) diff --git a/src/setup_payload/tests/BUILD.gn b/src/setup_payload/tests/BUILD.gn index 75cdb8a71b0ad3..fc7bd6fe13c83c 100644 --- a/src/setup_payload/tests/BUILD.gn +++ b/src/setup_payload/tests/BUILD.gn @@ -56,3 +56,13 @@ if (enable_fuzz_test_targets) { ] } } + +if (pw_enable_fuzz_test_targets) { + chip_pw_fuzz_target("fuzz-setup-payload-base38-pw") { + test_source = [ "FuzzBase38PW.cpp" ] + public_deps = [ + "${chip_root}/src/platform/logging:stdio", + "${chip_root}/src/setup_payload", + ] + } +} diff --git a/src/setup_payload/tests/FuzzBase38PW.cpp b/src/setup_payload/tests/FuzzBase38PW.cpp new file mode 100644 index 00000000000000..b39db0905dfea0 --- /dev/null +++ b/src/setup_payload/tests/FuzzBase38PW.cpp @@ -0,0 +1,77 @@ +#include +#include +#include + +#include +#include + +#include "setup_payload/QRCodeSetupPayloadParser.h" +#include +#include + +namespace { + +using namespace fuzztest; +using namespace chip; + +// The property Function +void Base38DecodeFuzz(const std::vector & bytes) +{ + std::string base38EncodedString(reinterpret_cast(bytes.data()), bytes.size()); + std::vector decodedData; + + // Ignoring return value, because in general the data is garbage and won't decode properly. + // We're just testing that the decoder does not crash on the fuzzer-generated inputs. + chip::base38Decode(base38EncodedString, decodedData); +} + +// The invocation of the FuzzTest +FUZZ_TEST(Base38Decoder, Base38DecodeFuzz).WithDomains(Arbitrary>()); + +/* The property function for a base38 roundtrip Fuzzer. + * It starts by encoding the fuzzing value passed + * into Base38. The encoded value will then be decoded. + * + * The fuzzer verifies that the decoded value is the same + * as the one in input.*/ +void Base38RoundTripFuzz(const std::vector & bytes) +{ + + size_t outputSizeNeeded = base38EncodedLength(bytes.size()); + const size_t kMaxOutputSize = 512; + + ASSERT_LT(outputSizeNeeded, kMaxOutputSize); + + ByteSpan span(bytes.data(), bytes.size()); + + char encodedBuf[kMaxOutputSize]; + MutableCharSpan encodedSpan(encodedBuf); + CHIP_ERROR encodingError = base38Encode(span, encodedSpan); + ASSERT_EQ(encodingError, CHIP_NO_ERROR); + + std::string base38EncodedString(encodedSpan.data(), encodedSpan.size()); + + std::vector decodedData; + CHIP_ERROR decodingError = base38Decode(base38EncodedString, decodedData); + + ASSERT_EQ(decodingError, CHIP_NO_ERROR); + + // Make sure that decoded data is equal to the original fuzzed input; the bytes vector + ASSERT_EQ(decodedData, bytes); +} + +// Max size of the vector is defined as 306 since that will give an outputSizeNeeded of 511 which is less than the required +// kMaxOutputSize +FUZZ_TEST(Base38Decoder, Base38RoundTripFuzz).WithDomains(Arbitrary>().WithMaxSize(306)); + +void FuzzQRCodeSetupPayloadParser(const std::string & s) +{ + chip::Platform::MemoryInit(); + + SetupPayload payload; + QRCodeSetupPayloadParser(s).populatePayload(payload); +} + +FUZZ_TEST(Base38Decoder, FuzzQRCodeSetupPayloadParser).WithDomains(Arbitrary()); + +} // namespace diff --git a/src/system/SystemLayer.h b/src/system/SystemLayer.h index 76d778a59a6d79..75878ce6a81f50 100644 --- a/src/system/SystemLayer.h +++ b/src/system/SystemLayer.h @@ -41,6 +41,7 @@ #include #if CHIP_SYSTEM_CONFIG_USE_SOCKETS +#include #include #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS @@ -243,6 +244,7 @@ class LayerSockets : public Layer * Initialize watching for events on a file descriptor. * * Returns an opaque token through @a tokenOut that must be passed to subsequent operations for this file descriptor. + * Multiple calls to start watching the same file descriptor will return the same token. * StopWatchingSocket() must be called before closing the file descriptor. */ virtual CHIP_ERROR StartWatchingSocket(int fd, SocketWatchToken * tokenOut) = 0; @@ -288,6 +290,44 @@ class LayerSockets : public Layer virtual SocketWatchToken InvalidSocketWatchToken() = 0; }; +class LayerSocketsLoop; + +/** + * EventLoopHandlers can be registered with a LayerSocketsLoop instance to enable + * participation of those handlers in the processing cycle of the event loop. This makes + * it possible to implement adapters that allow components utilizing a third-party event + * loop API to participate in the Matter event loop, instead of having to run an entirely + * separate event loop on another thread. + * + * Specifically, the `PrepareEvents` and `HandleEvents` methods of registered event loop + * handlers will be called from the LayerSocketsLoop methods of the same names. + * + * @see LayerSocketsLoop::PrepareEvents + * @see LayerSocketsLoop::HandleEvents + */ +class EventLoopHandler : public chip::IntrusiveListNodeBase<> +{ +public: + virtual ~EventLoopHandler() {} + + /** + * Prepares events and returns the next requested wake time. + */ + virtual Clock::Timestamp PrepareEvents(Clock::Timestamp now) { return Clock::Timestamp::max(); } + + /** + * Handles / dispatches pending events. + * Every call to this method will have been preceded by a call to `PrepareEvents`. + */ + virtual void HandleEvents() = 0; + +private: + // mState is provided exclusively for use by the LayerSocketsLoop implementation + // sub-class and can be accessed by it via the LayerSocketsLoop::LoopHandlerState() helper. + friend class LayerSocketsLoop; + intptr_t mState = 0; +}; + class LayerSocketsLoop : public LayerSockets { public: @@ -298,6 +338,11 @@ class LayerSocketsLoop : public LayerSockets virtual void HandleEvents() = 0; virtual void EventLoopEnds() = 0; +#if !CHIP_SYSTEM_CONFIG_USE_DISPATCH + virtual void AddLoopHandler(EventLoopHandler & handler) = 0; + virtual void RemoveLoopHandler(EventLoopHandler & handler) = 0; +#endif // !CHIP_SYSTEM_CONFIG_USE_DISPATCH + #if CHIP_SYSTEM_CONFIG_USE_DISPATCH virtual void SetDispatchQueue(dispatch_queue_t dispatchQueue) = 0; virtual dispatch_queue_t GetDispatchQueue() = 0; @@ -305,6 +350,10 @@ class LayerSocketsLoop : public LayerSockets virtual void SetLibEvLoop(struct ev_loop * aLibEvLoopP) = 0; virtual struct ev_loop * GetLibEvLoop() = 0; #endif // CHIP_SYSTEM_CONFIG_USE_DISPATCH/LIBEV + +protected: + // Expose EventLoopHandler.mState as a non-const reference to sub-classes + decltype(EventLoopHandler::mState) & LoopHandlerState(EventLoopHandler & handler) { return handler.mState; } }; #endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS diff --git a/src/system/SystemLayerImplSelect.cpp b/src/system/SystemLayerImplSelect.cpp index 86ff1cb62da42f..3e8a79f7b6e44f 100644 --- a/src/system/SystemLayerImplSelect.cpp +++ b/src/system/SystemLayerImplSelect.cpp @@ -28,6 +28,7 @@ #include #include +#include #include // Choose an approximation of PTHREAD_NULL if pthread.h doesn't define one. @@ -370,8 +371,9 @@ CHIP_ERROR LayerImplSelect::StartWatchingSocket(int fd, SocketWatchToken * token { if (w.mFD == fd) { - // Duplicate registration is an error. - return CHIP_ERROR_INVALID_ARGUMENT; + // Already registered, return the existing token + *tokenOut = reinterpret_cast(&w); + return CHIP_NO_ERROR; } if ((w.mFD == kInvalidFd) && (watch == nullptr)) { @@ -608,6 +610,32 @@ SocketEvents LayerImplSelect::SocketEventsFromFDs(int socket, const fd_set & rea return res; } +#if !CHIP_SYSTEM_CONFIG_USE_DISPATCH +enum : intptr_t +{ + kLoopHandlerInactive = 0, // default value for EventLoopHandler::mState + kLoopHandlerPending, + kLoopHandlerActive, +}; + +void LayerImplSelect::AddLoopHandler(EventLoopHandler & handler) +{ + // Add the handler as pending because this method can be called at any point + // in a PrepareEvents() / WaitForEvents() / HandleEvents() sequence. + // It will be marked active when we call PrepareEvents() on it for the first time. + auto & state = LoopHandlerState(handler); + VerifyOrDie(state == kLoopHandlerInactive); + state = kLoopHandlerPending; + mLoopHandlers.PushBack(&handler); +} + +void LayerImplSelect::RemoveLoopHandler(EventLoopHandler & handler) +{ + mLoopHandlers.Remove(&handler); + LoopHandlerState(handler) = kLoopHandlerInactive; +} +#endif // !CHIP_SYSTEM_CONFIG_USE_DISPATCH + void LayerImplSelect::PrepareEvents() { assertChipStackLockedByCurrentThread(); @@ -616,10 +644,28 @@ void LayerImplSelect::PrepareEvents() Clock::Timestamp awakenTime = currentTime + kDefaultMinSleepPeriod; TimerList::Node * timer = mTimerList.Earliest(); - if (timer && timer->AwakenTime() < awakenTime) + if (timer) + { + awakenTime = std::min(awakenTime, timer->AwakenTime()); + } + +#if !CHIP_SYSTEM_CONFIG_USE_DISPATCH + // Activate added EventLoopHandlers and call PrepareEvents on active handlers. + auto loopIter = mLoopHandlers.begin(); + while (loopIter != mLoopHandlers.end()) { - awakenTime = timer->AwakenTime(); + auto & loop = *loopIter++; // advance before calling out, in case a list modification clobbers the `next` pointer + switch (auto & state = LoopHandlerState(loop)) + { + case kLoopHandlerPending: + state = kLoopHandlerActive; + [[fallthrough]]; + case kLoopHandlerActive: + awakenTime = std::min(awakenTime, loop.PrepareEvents(currentTime)); + break; + } } +#endif // !CHIP_SYSTEM_CONFIG_USE_DISPATCH const Clock::Timestamp sleepTime = (awakenTime > currentTime) ? (awakenTime - currentTime) : Clock::kZero; Clock::ToTimeval(sleepTime, mNextTimeout); @@ -683,18 +729,35 @@ void LayerImplSelect::HandleEvents() mTimerPool.Invoke(timer); } - for (auto & w : mSocketWatchPool) + // Process socket events, if any + if (mSelectResult > 0) { - if (w.mFD != kInvalidFd) + for (auto & w : mSocketWatchPool) { - SocketEvents events = SocketEventsFromFDs(w.mFD, mSelected.mReadSet, mSelected.mWriteSet, mSelected.mErrorSet); - if (events.HasAny() && w.mCallback != nullptr) + if (w.mFD != kInvalidFd && w.mCallback != nullptr) { - w.mCallback(events, w.mCallbackData); + SocketEvents events = SocketEventsFromFDs(w.mFD, mSelected.mReadSet, mSelected.mWriteSet, mSelected.mErrorSet); + if (events.HasAny()) + { + w.mCallback(events, w.mCallbackData); + } } } } +#if !CHIP_SYSTEM_CONFIG_USE_DISPATCH + // Call HandleEvents for active loop handlers + auto loopIter = mLoopHandlers.begin(); + while (loopIter != mLoopHandlers.end()) + { + auto & loop = *loopIter++; // advance before calling out, in case a list modification clobbers the `next` pointer + if (LoopHandlerState(loop) == kLoopHandlerActive) + { + loop.HandleEvents(); + } + } +#endif // !CHIP_SYSTEM_CONFIG_USE_DISPATCH + #if CHIP_SYSTEM_CONFIG_POSIX_LOCKING mHandleSelectThread = PTHREAD_NULL; #endif // CHIP_SYSTEM_CONFIG_POSIX_LOCKING diff --git a/src/system/SystemLayerImplSelect.h b/src/system/SystemLayerImplSelect.h index 1bab3db9b5f39c..ce34ece0115b9b 100644 --- a/src/system/SystemLayerImplSelect.h +++ b/src/system/SystemLayerImplSelect.h @@ -87,6 +87,11 @@ class LayerImplSelect : public LayerSocketsLoop void HandleEvents() override; void EventLoopEnds() override {} +#if !CHIP_SYSTEM_CONFIG_USE_DISPATCH + void AddLoopHandler(EventLoopHandler & handler) override; + void RemoveLoopHandler(EventLoopHandler & handler) override; +#endif // !CHIP_SYSTEM_CONFIG_USE_DISPATCH + #if CHIP_SYSTEM_CONFIG_USE_DISPATCH void SetDispatchQueue(dispatch_queue_t dispatchQueue) override { mDispatchQueue = dispatchQueue; }; dispatch_queue_t GetDispatchQueue() override { return mDispatchQueue; }; @@ -135,6 +140,10 @@ class LayerImplSelect : public LayerSocketsLoop TimerList mExpiredTimers; timeval mNextTimeout; +#if !CHIP_SYSTEM_CONFIG_USE_DISPATCH + IntrusiveList mLoopHandlers; +#endif + // Members for select loop struct SelectSets { diff --git a/src/system/system.gni b/src/system/system.gni index 67bf9b61b8f881..61efb846d89839 100644 --- a/src/system/system.gni +++ b/src/system/system.gni @@ -80,6 +80,10 @@ assert( chip_system_config_locking == "zephyr", "Please select a valid mutex implementation: posix, freertos, mbed, cmsis-rtos, zephyr, none") +assert( + !chip_system_config_use_dispatch || chip_system_config_locking == "none", + "When chip_system_config_use_dispatch is true, chip_system_config_locking must be 'none'") + assert( chip_system_config_clock == "clock_gettime" || chip_system_config_clock == "gettimeofday", diff --git a/src/system/tests/BUILD.gn b/src/system/tests/BUILD.gn index 521a1f34d859b9..8b91690f47a708 100644 --- a/src/system/tests/BUILD.gn +++ b/src/system/tests/BUILD.gn @@ -21,6 +21,7 @@ chip_test_suite("tests") { output_name = "libSystemLayerTests" test_sources = [ + "TestEventLoopHandler.cpp", "TestSystemClock.cpp", "TestSystemErrorStr.cpp", "TestSystemPacketBuffer.cpp", diff --git a/src/system/tests/TestEventLoopHandler.cpp b/src/system/tests/TestEventLoopHandler.cpp new file mode 100644 index 00000000000000..4d5456098efb2f --- /dev/null +++ b/src/system/tests/TestEventLoopHandler.cpp @@ -0,0 +1,148 @@ +/* + * Copyright (c) 2024 Project CHIP Authors + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include +#include + +// EventLoopHandlers are only supported by a select-based LayerSocketsLoop +#if CHIP_SYSTEM_CONFIG_USE_SOCKETS && !CHIP_SYSTEM_CONFIG_USE_DISPATCH +// The fake PlatformManagerImpl does not drive the system layer event loop +#if !CHIP_DEVICE_LAYER_TARGET_FAKE + +#include +#include + +#include +#include + +using namespace chip; +using namespace chip::System::Clock; +using namespace chip::System::Clock::Literals; + +class TestEventLoopHandler : public ::testing::Test +{ +public: + static void SetUpTestSuite() + { + ASSERT_EQ(Platform::MemoryInit(), CHIP_NO_ERROR); + ASSERT_EQ(DeviceLayer::PlatformMgr().InitChipStack(), CHIP_NO_ERROR); + } + + static void TearDownTestSuite() + { + DeviceLayer::PlatformMgr().Shutdown(); + Platform::MemoryShutdown(); + } + + static System::LayerSocketsLoop & SystemLayer() { return static_cast(DeviceLayer::SystemLayer()); } + + // Schedules a call to the provided lambda and returns a cancel function. + template + static std::function Schedule(Timeout delay, Lambda lambda) + { + System::TimerCompleteCallback callback = [](System::Layer * layer, void * ctx) { + auto * function = static_cast *>(ctx); + (*function)(); + delete function; + }; + auto * function = new std::function(lambda); + SystemLayer().StartTimer(delay, callback, function); + return [=] { + SystemLayer().CancelTimer(callback, function); + delete function; + }; + } + + template + static void ScheduleNextTick(Lambda lambda) + { + // ScheduleLambda is based on device events, which are greedily processed until the + // queue is empty, so we can't use it to wait for the next event loop tick. Just use + // a timer with a very short delay. + Schedule(1_ms, lambda); + } +}; + +TEST_F(TestEventLoopHandler, EventLoopHandlerSequence) +{ + struct : public System::EventLoopHandler + { + std::string trace; + Timestamp PrepareEvents(Timestamp now) override + { + trace.append("P"); + return Timestamp::max(); + } + void HandleEvents() override { trace.append("H"); } + } loopHandler; + + ScheduleNextTick([&] { + loopHandler.trace.append("1"); + SystemLayer().AddLoopHandler(loopHandler); + loopHandler.trace.append("A"); + ScheduleNextTick([&] { // "P" + loopHandler.trace.append("2"); + ScheduleNextTick([&] { // "H", "P" + loopHandler.trace.append("3"); + SystemLayer().RemoveLoopHandler(loopHandler); + loopHandler.trace.append("R"); + ScheduleNextTick([&] { + loopHandler.trace.append("4"); + DeviceLayer::PlatformMgr().StopEventLoopTask(); + }); + }); + }); + }); + + chip::DeviceLayer::PlatformMgr().RunEventLoop(); + EXPECT_EQ(loopHandler.trace, std::string("1AP2HP3R4")); +} + +TEST_F(TestEventLoopHandler, EventLoopHandlerWake) +{ + struct : public System::EventLoopHandler + { + Timestamp startTimestamp = System::SystemClock().GetMonotonicTimestamp(); + Timestamp wakeTimestamp = Timestamp::max(); + + Timestamp PrepareEvents(Timestamp now) override { return now + 400_ms; } + void HandleEvents() override + { + // StartTimer() (called by Schedule()) is liable to causes an immediate + // wakeup via Signal(), so ignore this call if it's only been a few ms. + auto now = System::SystemClock().GetMonotonicTimestamp(); + if (now - startTimestamp >= 100_ms) + { + wakeTimestamp = now; + DeviceLayer::PlatformMgr().StopEventLoopTask(); + } + } + } loopHandler; + + // Schedule a fallback timer to ensure the test stops + auto cancelFallback = Schedule(1000_ms, [] { DeviceLayer::PlatformMgr().StopEventLoopTask(); }); + SystemLayer().AddLoopHandler(loopHandler); + chip::DeviceLayer::PlatformMgr().RunEventLoop(); + SystemLayer().RemoveLoopHandler(loopHandler); + cancelFallback(); // avoid leaking the fallback timer + + Timestamp sleepDuration = loopHandler.wakeTimestamp - loopHandler.startTimestamp; + EXPECT_GE(sleepDuration.count(), 400u); // loopHandler requested wake-up after 400ms + EXPECT_LE(sleepDuration.count(), 500u); // allow some slack for test machine load +} + +#endif // !CHIP_DEVICE_LAYER_TARGET_FAKE +#endif // CHIP_SYSTEM_CONFIG_USE_SOCKETS && !CHIP_SYSTEM_CONFIG_USE_DISPATCH diff --git a/src/test_driver/efr32/BUILD.gn b/src/test_driver/efr32/BUILD.gn index b15b16864548c9..0d10cb8d76a475 100644 --- a/src/test_driver/efr32/BUILD.gn +++ b/src/test_driver/efr32/BUILD.gn @@ -19,7 +19,6 @@ import("//build_overrides/pigweed.gni") import("${build_root}/config/defaults.gni") import("${efr32_sdk_build_root}/efr32_sdk.gni") -import("${efr32_sdk_build_root}/silabs_executable.gni") import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") import("${chip_root}/src/platform/device.gni") @@ -62,9 +61,8 @@ efr32_sdk("sdk") { ] } -silabs_executable("efr32_device_tests") { - output_name = "matter-silabs-device_tests.out" - +# This is the test runner. `pw_test` will dep this for each `silabs_executable` target. +source_set("efr32_test_main") { defines = [ "PW_RPC_ENABLED" ] sources = [ "${chip_root}/examples/common/pigweed/RpcService.cpp", @@ -83,7 +81,6 @@ silabs_executable("efr32_device_tests") { "$dir_pw_unit_test:rpc_service", "${chip_root}/config/efr32/lib/pw_rpc:pw_rpc", "${chip_root}/examples/common/pigweed:system_rpc_server", - "${chip_root}/src:tests", "${chip_root}/src/lib", "${chip_root}/src/lib/support:pw_tests_wrapper", "${chip_root}/src/platform/silabs/provision:provision-headers", @@ -106,27 +103,18 @@ silabs_executable("efr32_device_tests") { ] include_dirs = [ "${chip_root}/examples/common/pigweed/efr32" ] - - ldscript = "${examples_common_plat_dir}/ldscripts/${silabs_family}.ld" - - inputs = [ ldscript ] - - ldflags = [ - "-T" + rebase_path(ldscript, root_build_dir), - "-Wl,--no-warn-rwx-segment", - ] - - output_dir = root_out_dir } +# This target is referred to by BuildRoot in scripts/build/builders/efr32.py, as well as the example in README.md. +# It builds the root target "src:tests", which builds the chip_test_suite target in each test directory, which builds a pw_test target for each test source file, which builds a silabs_executable, which includes the "efr32_test_main" target defined above. group("efr32") { - deps = [ ":efr32_device_tests" ] + deps = [ "${chip_root}/src:tests" ] } group("runner") { deps = [ - "${efr32_project_dir}/py:nl_test_runner.install", - "${efr32_project_dir}/py:nl_test_runner_wheel", + "${efr32_project_dir}/py:pw_test_runner.install", + "${efr32_project_dir}/py:pw_test_runner_wheel", ] } diff --git a/src/test_driver/efr32/README.md b/src/test_driver/efr32/README.md index c36812e484fdee..c846426890abaa 100644 --- a/src/test_driver/efr32/README.md +++ b/src/test_driver/efr32/README.md @@ -1,6 +1,6 @@ #CHIP EFR32 Test Driver -This builds and runs the NLUnitTest on the efr32 device +This builds and runs the unit tests on the efr32 device.
@@ -14,9 +14,9 @@ This builds and runs the NLUnitTest on the efr32 device ## Introduction -This builds a test binary which contains the NLUnitTests and can be flashed onto -a device. The device is controlled using the included RPCs, through the python -test runner. +This builds a set of test binaries which contain the unit tests and can be +flashed onto a device. The device is controlled using the included RPCs, through +the python test runner. @@ -83,7 +83,7 @@ Or build using build script from the root ``` cd - ./scripts/build/build_examples.py --target linux-x64-nl-test-runner build + ./scripts/build/build_examples.py --target linux-x64-pw-test-runner build ``` The runner will be installed into the venv and python wheels will be packaged in @@ -92,7 +92,7 @@ the output folder for deploying. Then the python wheels need to installed using pip3. ``` - pip3 install out/debug/chip_nl_test_runner_wheels/*.whl + pip3 install out/debug/chip_pw_test_runner_wheels/*.whl ``` Other python libraries may need to be installed such as @@ -101,8 +101,8 @@ Other python libraries may need to be installed such as pip3 install pyserial ``` -- To run the tests: +- To run all tests: ``` - python -m nl_test_runner.nl_test_runner -d /dev/ttyACM1 -f out/debug/matter-silabs-device_tests.s37 -o out.log + python -m pw_test_runner.pw_test_runner -d /dev/ttyACM1 -f out/debug/matter-silabs-device_tests.s37 -o out.log ``` diff --git a/src/test_driver/efr32/args.gni b/src/test_driver/efr32/args.gni index 71bf093f3e3a16..f7f52398a5889e 100644 --- a/src/test_driver/efr32/args.gni +++ b/src/test_driver/efr32/args.gni @@ -17,14 +17,15 @@ import("//build_overrides/pigweed.gni") import("${chip_root}/config/efr32/lib/pw_rpc/pw_rpc.gni") import("${chip_root}/examples/platform/silabs/args.gni") import("${chip_root}/src/platform/silabs/efr32/args.gni") +import("${chip_root}/third_party/silabs/silabs_board.gni") # silabs_family silabs_sdk_target = get_label_info(":sdk", "label_no_toolchain") chip_enable_pw_rpc = true chip_build_tests = true +chip_link_tests = true chip_enable_openthread = true chip_openthread_ftd = false # use mtd as it is smaller. -chip_monolithic_tests = true openthread_external_platform = "${chip_root}/third_party/openthread/platforms/efr32:libopenthread-efr32" @@ -35,3 +36,19 @@ pw_assert_BACKEND = "$dir_pw_assert_log" pw_log_BACKEND = "$dir_pw_log_basic" pw_unit_test_BACKEND = "$dir_pw_unit_test:light" + +# Override the executable type and the test main's target. +pw_unit_test_EXECUTABLE_TARGET_TYPE = "silabs_executable" +pw_unit_test_EXECUTABLE_TARGET_TYPE_FILE = + "${efr32_sdk_build_root}/silabs_executable.gni" +pw_unit_test_MAIN = "//:efr32_test_main" + +# Additional variables needed by silabs_executable that must be passed in to pw_test. +test_executable_output_name = "matter-silabs-device_tests-" +test_executable_output_name_suffix = ".out" +_ldscript = + "${chip_root}/examples/platform/silabs/ldscripts/${silabs_family}.ld" +test_executable_ldflags = [ + "-T" + rebase_path(_ldscript, root_build_dir), + "-Wl,--no-warn-rwx-segment", +] diff --git a/src/test_driver/efr32/py/BUILD.gn b/src/test_driver/efr32/py/BUILD.gn index 615fe5603d00c9..6f36e8f3e4a839 100644 --- a/src/test_driver/efr32/py/BUILD.gn +++ b/src/test_driver/efr32/py/BUILD.gn @@ -19,32 +19,6 @@ import("$dir_pw_build/python.gni") import("$dir_pw_build/python_dist.gni") import("${chip_root}/examples/common/pigweed/pigweed_rpcs.gni") -# TODO [PW_MIGRATION]: remove nl test runner script once transition away from nlunit-test is completed -pw_python_package("nl_test_runner") { - setup = [ - "pyproject.toml", - "setup.cfg", - "setup.py", - ] - - sources = [ - "nl_test_runner/__init__.py", - "nl_test_runner/nl_test_runner.py", - ] - - python_deps = [ - "$dir_pw_hdlc/py", - "$dir_pw_protobuf_compiler/py", - "$dir_pw_rpc/py", - "${chip_root}/src/test_driver/efr32:nl_test_service.python", - ] -} - -pw_python_wheels("nl_test_runner_wheel") { - packages = [ ":nl_test_runner" ] - directory = "$root_out_dir/chip_nl_test_runner_wheels" -} - pw_python_package("pw_test_runner") { setup = [ "pw_test_runner/pyproject.toml", diff --git a/src/test_driver/efr32/py/nl_test_runner/nl_test_runner.py b/src/test_driver/efr32/py/nl_test_runner/nl_test_runner.py deleted file mode 100644 index 0fdb2e7aea7e3d..00000000000000 --- a/src/test_driver/efr32/py/nl_test_runner/nl_test_runner.py +++ /dev/null @@ -1,141 +0,0 @@ -# -# Copyright (c) 2021 Project CHIP Authors -# All rights reserved. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -import argparse -import logging -import subprocess -import sys -import time -from typing import Any - -import serial # type: ignore -from pw_hdlc import rpc - -# RPC Protos -from nl_test_service import nl_test_pb2 # isort:skip - -PW_LOG = logging.getLogger(__name__) - -PROTOS = [nl_test_pb2] - - -class colors: - HEADER = '\033[95m' - OKBLUE = '\033[94m' - OKCYAN = '\033[96m' - OKGREEN = '\033[92m' - WARNING = '\033[93m' - FAIL = '\033[91m' - ENDC = '\033[0m' - BOLD = '\033[1m' - - -PASS_STRING = colors.OKGREEN + u'\N{check mark}' + colors.ENDC -FAIL_STRING = colors.FAIL + 'FAILED' + colors.ENDC - - -def _parse_args(): - """Parses and returns the command line arguments.""" - parser = argparse.ArgumentParser( - description="CHIP on device unit test runner.") - parser.add_argument('-d', '--device', help='the serial port to use') - parser.add_argument('-b', - '--baudrate', - type=int, - default=115200, - help='the baud rate to use') - parser.add_argument('-f', '--flash_image', - help='a firmware image which will be flashed berfore runnning the test') - parser.add_argument( - '-o', - '--output', - type=argparse.FileType('wb'), - default=sys.stdout.buffer, - help=('The file to which to write device output (HDLC channel 1); ' - 'provide - or omit for stdout.')) - return parser.parse_args() - - -def flash_device(device: str, flash_image: str, **kwargs): - """flashes the EFR32 device using commander""" - err = subprocess.call( - ['commander', 'flash', '--device', 'EFR32', flash_image]) - if err: - raise Exception("flash failed") - - -def get_hdlc_rpc_client(device: str, baudrate: int, output: Any, **kwargs): - """Get the HdlcRpcClient based on arguments.""" - serial_device = serial.Serial(device, baudrate, timeout=1) - reader = rpc.SerialReader(serial_device, 8192) - write = serial_device.write - return rpc.HdlcRpcClient(reader, PROTOS, rpc.default_channels(write), - lambda data: rpc.write_to_file(data, output)) - - -def runner(client) -> int: - """ Run the tests""" - def on_error_callback(call_object, error): - raise Exception("Error running test RPC: {}".format(error)) - - rpc = client.client.channel(1).rpcs.chip.rpc.NlTest.Run - invoke = rpc.invoke(rpc.request(), on_error=on_error_callback) - - total_failed = 0 - total_run = 0 - for streamed_data in invoke.get_responses(): - if streamed_data.HasField("test_suite_start"): - print("\n{}".format( - colors.HEADER + streamed_data.test_suite_start.suite_name) + colors.ENDC) - if streamed_data.HasField("test_case_run"): - print("\t{}: {}".format(streamed_data.test_case_run.test_case_name, - FAIL_STRING if streamed_data.test_case_run.failed else PASS_STRING)) - if streamed_data.HasField("test_suite_tests_run_summary"): - total_run += streamed_data.test_suite_tests_run_summary.total_count - total_failed += streamed_data.test_suite_tests_run_summary.failed_count - print("{}Total tests failed: {} of {}".format( - colors.OKGREEN if streamed_data.test_suite_tests_run_summary.failed_count == 0 else colors.FAIL, - streamed_data.test_suite_tests_run_summary.failed_count, - streamed_data.test_suite_tests_run_summary.total_count) + colors.ENDC) - if streamed_data.HasField("test_suite_asserts_summary"): - print("{}Total asserts failed: {} of {}".format( - colors.OKGREEN if streamed_data.test_suite_asserts_summary.failed_count == 0 else colors.FAIL, - streamed_data.test_suite_asserts_summary.failed_count, - streamed_data.test_suite_asserts_summary.total_count) + colors.ENDC) - for step in ["test_suite_setup", "test_suite_teardown", "test_case_initialize", "test_case_terminate"]: - if streamed_data.HasField(step): - print(colors.OKCYAN + "\t{}: {}".format(step, - FAIL_STRING if getattr(streamed_data, step).failed else PASS_STRING)) - print(colors.OKBLUE + colors.BOLD + - "\n\nAll tests completed" + colors.ENDC) - print("{}Total of all tests failed: {} of {}".format( - colors.OKGREEN if total_failed == 0 else colors.FAIL, - total_failed, total_run) + colors.ENDC) - return total_failed - - -def main() -> int: - args = _parse_args() - if args.flash_image: - flash_device(**vars(args)) - time.sleep(1) # Give time for device to boot - with get_hdlc_rpc_client(**vars(args)) as client: - return runner(client) - - -if __name__ == '__main__': - sys.exit(main()) diff --git a/src/test_driver/efr32/py/nl_test_runner/__init__.py b/src/test_driver/efr32/py/pw_test_runner/__init__.py similarity index 100% rename from src/test_driver/efr32/py/nl_test_runner/__init__.py rename to src/test_driver/efr32/py/pw_test_runner/__init__.py diff --git a/src/test_driver/efr32/py/pw_test_runner/pw_test_runner.py b/src/test_driver/efr32/py/pw_test_runner/pw_test_runner.py index c8fca307f015ff..8e10903920cc77 100644 --- a/src/test_driver/efr32/py/pw_test_runner/pw_test_runner.py +++ b/src/test_driver/efr32/py/pw_test_runner/pw_test_runner.py @@ -16,6 +16,7 @@ # import argparse +import glob import logging import os import subprocess @@ -60,7 +61,7 @@ def _parse_args(): parser.add_argument( "-f", "--flash_image", - help="a firmware image which will be flashed berfore runnning the test", + help="A firmware image which will be flashed berfore runnning the test. Or a directory containing firmware images, each of which will be flashed and then run.", ) parser.add_argument( "-o", @@ -75,7 +76,7 @@ def _parse_args(): return parser.parse_args() -def flash_device(device: str, flash_image: str, **kwargs): +def flash_device(device: str, flash_image: str): """flashes the EFR32 device using commander""" err = subprocess.call( ["commander", "flash", "--device", "EFR32", flash_image]) @@ -96,22 +97,41 @@ def get_hdlc_rpc_client(device: str, baudrate: int, output: Any, **kwargs): ) -def runner(client: rpc.HdlcRpcClient) -> int: - """Run the tests""" +def run(args) -> int: + """Run the tests. Return the number of failed tests.""" + with get_hdlc_rpc_client(**vars(args)) as client: + test_records = run_tests(client.rpcs()) + return len(test_records.failing_tests) - test_records = run_tests(client.rpcs()) - return len(test_records.failing_tests) +def list_images(flash_directory: str) -> list[str]: + filenames: list[str] = glob.glob(os.path.join(flash_directory, "*.s37")) + return list(map(lambda x: os.path.join(flash_directory, x), filenames)) def main() -> int: args = _parse_args() - if args.flash_image: - flash_device(**vars(args)) - time.sleep(1) # Give time for device to boot - with get_hdlc_rpc_client(**vars(args)) as client: - return runner(client) + failures = 0 + if args.flash_image: + if os.path.isdir(args.flash_image): + images = list_images(args.flash_image) + if not images: + raise Exception(f"No images found in `{args.flash_image}`") + elif os.path.isfile(args.flash_image): + images = [args.flash_image] + else: + raise Exception(f"File or directory not found `{args.flash_image}`") + + for image in images: + flash_device(args.device, image) + time.sleep(1) # Give time for device to boot + + failures += run(args) + else: # No image provided. Just run what's on the device. + failures += run(args) + + return failures if __name__ == "__main__": diff --git a/src/test_driver/efr32/py/setup.cfg b/src/test_driver/efr32/py/setup.cfg index 77108ab8288747..cb949a38092b07 100644 --- a/src/test_driver/efr32/py/setup.cfg +++ b/src/test_driver/efr32/py/setup.cfg @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. [metadata] -name = nl_test_runner +name = pw_test_runner version = 0.0.1 [options] diff --git a/src/transport/SecureSession.cpp b/src/transport/SecureSession.cpp index c96f9cdf908756..7694df2e2e3aca 100644 --- a/src/transport/SecureSession.cpp +++ b/src/transport/SecureSession.cpp @@ -160,10 +160,11 @@ Access::SubjectDescriptor SecureSession::GetSubjectDescriptor() const Access::SubjectDescriptor subjectDescriptor; if (IsOperationalNodeId(mPeerNodeId)) { - subjectDescriptor.authMode = Access::AuthMode::kCase; - subjectDescriptor.subject = mPeerNodeId; - subjectDescriptor.cats = mPeerCATs; - subjectDescriptor.fabricIndex = GetFabricIndex(); + subjectDescriptor.authMode = Access::AuthMode::kCase; + subjectDescriptor.subject = mPeerNodeId; + subjectDescriptor.cats = mPeerCATs; + subjectDescriptor.fabricIndex = GetFabricIndex(); + subjectDescriptor.isCommissioning = IsCommissioningSession(); } else if (IsPAKEKeyId(mPeerNodeId)) { @@ -171,9 +172,10 @@ Access::SubjectDescriptor SecureSession::GetSubjectDescriptor() const // Initiator (aka commissioner) leaves subject descriptor unfilled. if (GetCryptoContext().IsResponder()) { - subjectDescriptor.authMode = Access::AuthMode::kPase; - subjectDescriptor.subject = mPeerNodeId; - subjectDescriptor.fabricIndex = GetFabricIndex(); + subjectDescriptor.authMode = Access::AuthMode::kPase; + subjectDescriptor.subject = mPeerNodeId; + subjectDescriptor.fabricIndex = GetFabricIndex(); + subjectDescriptor.isCommissioning = IsCommissioningSession(); } } else @@ -183,6 +185,24 @@ Access::SubjectDescriptor SecureSession::GetSubjectDescriptor() const return subjectDescriptor; } +bool SecureSession::IsCommissioningSession() const +{ + // PASE session is always a commissioning session. + if (IsPASESession()) + { + return true; + } + + // CASE session is a commissioning session if it was marked as such. + // The SessionManager is what keeps track. + if (IsCASESession() && mIsCaseCommissioningSession) + { + return true; + } + + return false; +} + void SecureSession::Retain() { #if CHIP_CONFIG_SECURE_SESSION_REFCOUNT_LOGGING diff --git a/src/transport/SecureSession.h b/src/transport/SecureSession.h index fe70d6714e4a0f..ba586a3095e3dd 100644 --- a/src/transport/SecureSession.h +++ b/src/transport/SecureSession.h @@ -156,6 +156,8 @@ class SecureSession : public Session, public ReferenceCountedStart(), msg->TotalLength())); CHIP_TRACE_MESSAGE_RECEIVED(payloadHeader, packetHeader, secureSession, peerAddress, msg->Start(), msg->TotalLength()); + + // Always recompute whether a message is for a commissioning session based on the latest knowledge of + // the fabric table. + if (secureSession->IsCASESession()) + { + secureSession->SetCaseCommissioningSessionStatus(secureSession->GetFabricIndex() == + mFabricTable->GetPendingNewFabricIndex()); + } mCB->OnMessageReceived(packetHeader, payloadHeader, session.Value(), isDuplicate, std::move(msg)); } else diff --git a/src/transport/tests/TestSessionManager.cpp b/src/transport/tests/TestSessionManager.cpp index 154071a56418c5..dfe3ca4fd5c5ff 100644 --- a/src/transport/tests/TestSessionManager.cpp +++ b/src/transport/tests/TestSessionManager.cpp @@ -28,6 +28,7 @@ #define CHIP_ENABLE_TEST_ENCRYPTED_BUFFER_API // Up here in case some other header // includes SessionManager.h indirectly +#include #include #include #include @@ -112,10 +113,12 @@ class TestSessMgrCallback : public SessionMessageDelegate } ReceiveHandlerCallCount++; + lastSubjectDescriptor = session->GetSubjectDescriptor(); } int ReceiveHandlerCallCount = 0; bool LargeMessageSent = false; + Access::SubjectDescriptor lastSubjectDescriptor{}; }; class TestSessionManager : public ::testing::Test @@ -141,7 +144,7 @@ TEST_F(TestSessionManager, CheckSimpleInitTest) &fabricTableHolder.GetFabricTable(), sessionKeystore)); } -TEST_F(TestSessionManager, CheckMessageTest) +TEST_F(TestSessionManager, CheckMessageOverPaseTest) { uint16_t payload_len = sizeof(PAYLOAD); @@ -213,7 +216,10 @@ TEST_F(TestSessionManager, CheckMessageTest) EXPECT_EQ(err, CHIP_NO_ERROR); mContext.DrainAndServiceIO(); - EXPECT_EQ(callback.ReceiveHandlerCallCount, 1); + ASSERT_EQ(callback.ReceiveHandlerCallCount, 1); + + // This was a PASE session so we expect the subject descriptor to indicate it's for commissioning. + EXPECT_TRUE(callback.lastSubjectDescriptor.isCommissioning); // Let's send the max sized message and make sure it is received chip::System::PacketBufferHandle large_buffer = chip::MessagePacketBuffer::NewWithData(LARGE_PAYLOAD, kMaxAppMessageLen); diff --git a/third_party/abseil-cpp/src b/third_party/abseil-cpp/src new file mode 160000 index 00000000000000..3ab97e7212bff9 --- /dev/null +++ b/third_party/abseil-cpp/src @@ -0,0 +1 @@ +Subproject commit 3ab97e7212bff931a201c794fa1331960158bbfa diff --git a/third_party/fuzztest b/third_party/fuzztest new file mode 160000 index 00000000000000..6eb010c7223a6a --- /dev/null +++ b/third_party/fuzztest @@ -0,0 +1 @@ +Subproject commit 6eb010c7223a6aa609b94d49bfc06ac88f922961 diff --git a/third_party/googletest b/third_party/googletest new file mode 160000 index 00000000000000..1d17ea141d2c11 --- /dev/null +++ b/third_party/googletest @@ -0,0 +1 @@ +Subproject commit 1d17ea141d2c11b8917d2c7d029f1c4e2b9769b2 diff --git a/third_party/nxp/nxp_matter_support b/third_party/nxp/nxp_matter_support index 2aad9239944047..f6329bb2280c8b 160000 --- a/third_party/nxp/nxp_matter_support +++ b/third_party/nxp/nxp_matter_support @@ -1 +1 @@ -Subproject commit 2aad9239944047012e525caf52119a5c84b704d3 +Subproject commit f6329bb2280c8bc3f50f6d39e79191499e67cffa diff --git a/third_party/openthread/ot-nxp b/third_party/openthread/ot-nxp index f45fe4dd8687f0..0a3248f5c8ec5a 160000 --- a/third_party/openthread/ot-nxp +++ b/third_party/openthread/ot-nxp @@ -1 +1 @@ -Subproject commit f45fe4dd8687f0feddf063a33214c2196b463d3e +Subproject commit 0a3248f5c8ec5a9fd05541974872323f26d5182f diff --git a/third_party/openthread/platforms/nxp/k32w1/BUILD.gn b/third_party/openthread/platforms/nxp/mcxw71_k32w1/BUILD.gn similarity index 93% rename from third_party/openthread/platforms/nxp/k32w1/BUILD.gn rename to third_party/openthread/platforms/nxp/mcxw71_k32w1/BUILD.gn index 38a2f231cb811c..b7dc6d35983c40 100644 --- a/third_party/openthread/platforms/nxp/k32w1/BUILD.gn +++ b/third_party/openthread/platforms/nxp/mcxw71_k32w1/BUILD.gn @@ -80,14 +80,14 @@ source_set("libopenthread-k32w1") { ] if (chip_crypto == "platform") { - sources += [ "${openthread_nxp_root}/src/k32w1/k32w1/ecdsa_sss.cpp" ] + sources += [ "${openthread_nxp_root}/src/common/crypto/ecdsa_sss.cpp" ] if (use_hw_sha256) { - sources += [ "${openthread_nxp_root}/src/k32w1/k32w1/sha256_sss.cpp" ] + sources += [ "${openthread_nxp_root}/src/common/crypto/sha256_sss.cpp" ] } if (use_hw_aes) { - sources += [ "${openthread_nxp_root}/src/k32w1/k32w1/aes_sss.cpp" ] + sources += [ "${openthread_nxp_root}/src/common/crypto/aes_sss.cpp" ] } if (chip_key_storage == "fwk_nvm") { diff --git a/third_party/openthread/platforms/nxp/rt/rw61x/BUILD.gn b/third_party/openthread/platforms/nxp/rt/rw61x/BUILD.gn index c8054103122357..6d4854f53a9160 100644 --- a/third_party/openthread/platforms/nxp/rt/rw61x/BUILD.gn +++ b/third_party/openthread/platforms/nxp/rt/rw61x/BUILD.gn @@ -43,21 +43,24 @@ config("openthread_rw61x_config") { "OPENTHREAD_CONFIG_BORDER_ROUTER_ENABLE=1", "OPENTHREAD_CONFIG_COMMISSIONER_ENABLE=1", "OPENTHREAD_CONFIG_BORDER_ROUTING_ENABLE=1", - "OPENTHREAD_CONFIG_MDNS_SERVER_ENABLE=1", "OPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE=1", "OPENTHREAD_CONFIG_BACKBONE_ROUTER_ENABLE=1", "OPENTHREAD_CONFIG_MAX_STATECHANGE_HANDLERS=3", "OPENTHREAD_CONFIG_BORDER_AGENT_ENABLE=1", "OPENTHREAD_CONFIG_BORDER_AGENT_ID_ENABLE=1", "OPENTHREAD_CONFIG_BORDER_ROUTING_DHCP6_PD_ENABLE=1", - "OT_APP_BR_LWIP_HOOKS_EN=1", "OPENTHREAD_CONFIG_GENERIC_TASKLET_ENABLE=1", + "OPENTHREAD_CONFIG_SRP_SERVER_ADVERTISING_PROXY_ENABLE=1", + "OPENTHREAD_CONFIG_DNSSD_DISCOVERY_PROXY_ENABLE=1", + "OPENTHREAD_CONFIG_MULTICAST_DNS_ENABLE=1", + "OPENTHREAD_CONFIG_MULTICAST_DNS_AUTO_ENABLE_ON_INFRA_IF=0", + "OPENTHREAD_CONFIG_MULTICAST_DNS_PUBLIC_API_ENABLE=1", + "OT_APP_BR_LWIP_HOOKS_EN=1", ] } + # ot cli configs - defines += [ - "OPENTHREAD_CONFIG_PING_SENDER_ENABLE=1" - ] + defines += [ "OPENTHREAD_CONFIG_PING_SENDER_ENABLE=1" ] } #Config used by the openthread stack to get the path to OpenthreadConfig.h @@ -70,9 +73,9 @@ source_set("libopenthread-rw61x") { deps = [] sources = [ "${openthread_nxp_root}/src/common/alarm_freertos.c", + "${openthread_nxp_root}/src/common/diag.c", + "${openthread_nxp_root}/src/common/entropy.c", "${openthread_nxp_root}/src/common/logging.c", - "${openthread_nxp_root}/src/rw/rw612/platform/diag.c", - "${openthread_nxp_root}/src/rw/rw612/platform/entropy.c", ] if (chip_enable_wifi && chip_enable_openthread) { @@ -82,7 +85,9 @@ source_set("libopenthread-rw61x") { "${openthread_nxp_root}/src/common/br/infra_if.c", "${openthread_nxp_root}/src/common/br/lwip_hooks.c", "${openthread_nxp_root}/src/common/br/lwip_mcast.c", + "${openthread_nxp_root}/src/common/br/mdns_socket.c", "${openthread_nxp_root}/src/common/br/udp_plat.c", + "${openthread_nxp_root}/src/common/br/utils.c", ] deps += [ "${nxp_sdk_build_root}:nxp_lwip" ] } @@ -93,6 +98,7 @@ source_set("libopenthread-rw61x") { "${openthread_nxp_root}/src/common/spinel/spinel_hdlc.cpp", "${openthread_nxp_root}/src/common/spinel/system.c", "${openthread_root}/src/lib/hdlc/hdlc.cpp", + "${openthread_root}/src/lib/url/url.cpp", ] } else { sources += [ @@ -102,12 +108,14 @@ source_set("libopenthread-rw61x") { ] } - if (rt_nvm_component == "nvm_fwk") { + if (nxp_nvm_component == "nvm_fwk") { sources += [ "${openthread_nxp_root}/src/common/flash_nvm.c" ] - } else if (rt_nvm_component == "littlefs") { + } else if (nxp_nvm_component == "littlefs") { sources += [ "${openthread_nxp_root}/src/common/flash_littlefs.c" ] - } else if (rt_nvm_component == "key_storage") { + } else if (nxp_nvm_component == "key_storage") { sources += [ "${openthread_nxp_root}/src/common/flash_fsa.c" ] + } else if (nxp_nvm_component == "nvs") { + sources += [ "${openthread_nxp_root}/src/common/flash_nvs.c" ] } defines = [ diff --git a/third_party/openthread/repo b/third_party/openthread/repo index f0b6fcea6ef77c..aed9cd1a307c05 160000 --- a/third_party/openthread/repo +++ b/third_party/openthread/repo @@ -1 +1 @@ -Subproject commit f0b6fcea6ef77c9a54ab11767593f9a8798e3662 +Subproject commit aed9cd1a307c05fe2f5b6b4b5677baaabce3d38e diff --git a/third_party/re2/src b/third_party/re2/src new file mode 160000 index 00000000000000..85dd7ad833a730 --- /dev/null +++ b/third_party/re2/src @@ -0,0 +1 @@ +Subproject commit 85dd7ad833a73095ecf3e3baea608ba051bbe2c7 diff --git a/third_party/silabs/SiWx917_sdk.gni b/third_party/silabs/SiWx917_sdk.gni index 1163cd28c99de3..30e1595493c60c 100644 --- a/third_party/silabs/SiWx917_sdk.gni +++ b/third_party/silabs/SiWx917_sdk.gni @@ -248,15 +248,8 @@ template("siwx917_sdk") { defines += [ "SILABS_LOG_ENABLED=0" ] } - if (chip_build_libshell) { - defines += [ - "ENABLE_CHIP_SHELL", - "SLI_SI91X_MCU_INTR_BASED_RX_ON_UART=1", - ] - } - defines += [ "LWIP_NETIF_API=1" ] - if (lwip_ipv4) { + if (chip_enable_wifi_ipv4) { defines += [ "LWIP_IPV4=1", @@ -329,6 +322,9 @@ template("siwx917_sdk") { defines += [ "ENABLE_CHIP_SHELL" ] } + if (chip_build_libshell || sl_uart_log_output) { + defines += [ "SLI_SI91X_MCU_INTR_BASED_RX_ON_UART=1" ] + } if (enable_dic) { defines += [ "DIC_ENABLE=1" ] } diff --git a/third_party/silabs/efr32_sdk.gni b/third_party/silabs/efr32_sdk.gni index ce7b09e3e012ac..1cd69d31e7084b 100644 --- a/third_party/silabs/efr32_sdk.gni +++ b/third_party/silabs/efr32_sdk.gni @@ -61,7 +61,7 @@ declare_args() { sl_active_mode_duration_ms = 1000 # 1s Active Mode Duration sl_active_mode_threshold_ms = 500 # 500ms Active Mode Threshold sl_icd_supported_clients_per_fabric = 2 # 2 registration slots per fabric - sl_use_subscription_synching = false + sl_use_subscription_syncing = false silabs_log_enabled = true @@ -362,6 +362,9 @@ template("efr32_sdk") { if (use_rs9116 || use_SiWx917) { _include_dirs += [ "${chip_root}/src/platform/silabs/rs911x" ] } + if (use_wf200 || use_rs9116 || use_SiWx917) { + _include_dirs += [ "${chip_root}/src/platform/silabs/wifi" ] + } if (silabs_family != "mgm24") { _include_dirs += [ "${efr32_sdk_root}/platform/radio/rail_lib/hal", @@ -658,7 +661,7 @@ template("efr32_sdk") { ] } - if (sl_use_subscription_synching) { + if (sl_use_subscription_syncing) { defines += [ "CHIP_CONFIG_SYNCHRONOUS_REPORTS_ENABLED=1" ] } diff --git a/third_party/silabs/silabs_board.gni b/third_party/silabs/silabs_board.gni index 7c1d77d036a41f..087ccc9d892916 100644 --- a/third_party/silabs/silabs_board.gni +++ b/third_party/silabs/silabs_board.gni @@ -43,9 +43,6 @@ declare_args() { # Disable AWS SDK OTA by default aws_sdk_ota = false - # Disable UART log forwarding by default - sl_uart_log_output = false - # Self-provision enabled use_provision_channel = false } @@ -165,6 +162,10 @@ declare_args() { # User can set this arg to false to skip the rps creation for WiFi SoCs. # e.g. for CI use_rps_extension = wifi_soc + + # UART log forwarding + # Default true for the wifi soc and false for EFR32 boards + sl_uart_log_output = wifi_soc } # qr code cannot be true if lcd is disabled diff --git a/third_party/silabs/silabs_executable.gni b/third_party/silabs/silabs_executable.gni index a639a4d19ae62d..37b853c5df84b8 100644 --- a/third_party/silabs/silabs_executable.gni +++ b/third_party/silabs/silabs_executable.gni @@ -47,64 +47,93 @@ template("generate_rps_file") { } template("silabs_executable") { + # output_dir is optional and will default to root_out_dir + if (!defined(invoker.output_dir)) { + invoker.output_dir = root_out_dir + } + + # output_name is optional and will default to "$target_name.bin" + if (!defined(invoker.output_name)) { + invoker.output_name = target_name + ".bin" + } + output_base_name = get_path_info(invoker.output_name, "name") objcopy_image_name = output_base_name + ".s37" objcopy_image_format = "srec" objcopy = "arm-none-eabi-objcopy" - # Copy flashing dependencies to the output directory so that the output - # is collectively self-contained; this allows flashing to work reliably - # even if the build and flashing steps take place on different machines - # or in different containers. - if (use_rps_extension) { flashing_image_name = output_base_name + ".rps" } - flashing_runtime_target = target_name + ".flashing_runtime" - flashing_script_inputs = [ - "${chip_root}/scripts/flashing/silabs_firmware_utils.py", - "${chip_root}/scripts/flashing/firmware_utils.py", - ] - copy(flashing_runtime_target) { - sources = flashing_script_inputs - outputs = [ "${root_out_dir}/{{source_file_part}}" ] - } + # flashable_executable calls a generator script to do the following: + # Create a flash.py script with the name of the binary hardcoded in it. + # Copy flashing dependencies to the output directory so that the output + # is collectively self-contained; this allows flashing to work reliably + # even if the build and flashing steps take place on different machines + # or in different containers. + # Create *.flashbundle.txt with a list of all files needed for flashing flashing_script_generator = "${chip_root}/scripts/flashing/gen_flashing_script.py" flashing_script_name = output_base_name + ".flash.py" - flashing_options = [ "silabs" ] + _flashbundle_file = "${invoker.output_dir}/${target_name}.flashbundle.txt" + _platform_firmware_utils = + "${chip_root}/scripts/flashing/silabs_firmware_utils.py" + _firmware_utils = "${chip_root}/scripts/flashing/firmware_utils.py" + flashing_options = [ + # Use module "{platform}_firmware_utils.py" + "silabs", + + # flashbundle.txt file to create. + "--flashbundle-file", + rebase_path(_flashbundle_file, root_build_dir), + + # Platform-specific firmware module to copy. + "--platform-firmware-utils", + rebase_path(_platform_firmware_utils, root_build_dir), + # General firmware module to copy. + "--firmware-utils", + rebase_path(_firmware_utils, root_build_dir), + ] + flashing_script_inputs = [ + _platform_firmware_utils, + _firmware_utils, + ] + flashbundle_name = "" # Stop flashable_executable from making flashbundle. + + # Target to generate the s37 file, flashing script, and flashbundle. flash_target_name = target_name + ".flash_executable" - flashbundle_name = "${target_name}.flashbundle.txt" flashable_executable(flash_target_name) { forward_variables_from(invoker, "*") - data_deps = [ ":${flashing_runtime_target}" ] } - # Add a target which generates the hex file in addition to s37. + # Target to generate the hex file. executable_target = "$flash_target_name.executable" hex_image_name = output_base_name + ".hex" hex_target_name = target_name + ".hex" objcopy_convert(hex_target_name) { - conversion_input = "${root_out_dir}/${invoker.output_name}" - conversion_output = "${root_out_dir}/${hex_image_name}" + conversion_input = "${invoker.output_dir}/${invoker.output_name}" + conversion_output = "${invoker.output_dir}/${hex_image_name}" conversion_target_format = "ihex" deps = [ ":$executable_target" ] } + # Target to generate the rps file. if (use_rps_extension) { rps_target_name = target_name + ".rps" generate_rps_file(rps_target_name) { - conversion_input = "${root_out_dir}/${objcopy_image_name}" - conversion_output = "${root_out_dir}/${flashing_image_name}" + conversion_input = "${invoker.output_dir}/${objcopy_image_name}" + conversion_output = "${invoker.output_dir}/${flashing_image_name}" deps = [ ":$executable_target", ":$flash_target_name.image", ] } } + + # Main target that deps the targets defined above. group(target_name) { deps = [ ":$flash_target_name", diff --git a/zzz_generated/app-common/app-common/zap-generated/attribute-type.h b/zzz_generated/app-common/app-common/zap-generated/attribute-type.h index 6f4c3bc90208e2..ae493673fc03f2 100644 --- a/zzz_generated/app-common/app-common/zap-generated/attribute-type.h +++ b/zzz_generated/app-common/app-common/zap-generated/attribute-type.h @@ -20,6 +20,8 @@ // Prevent multiple inclusion #pragma once +#include + // ZCL attribute types enum { @@ -99,3 +101,42 @@ enum ZCL_HWADR_ATTRIBUTE_TYPE = 0xF6, // Hardware Address ZCL_UNKNOWN_ATTRIBUTE_TYPE = 0xFF, // Unknown }; + +namespace chip { +namespace app { +inline bool IsSignedAttributeType(uint8_t attributeType) +{ + switch (attributeType) + { + case ZCL_INT8S_ATTRIBUTE_TYPE: + return true; + case ZCL_INT16S_ATTRIBUTE_TYPE: + return true; + case ZCL_INT24S_ATTRIBUTE_TYPE: + return true; + case ZCL_INT32S_ATTRIBUTE_TYPE: + return true; + case ZCL_INT40S_ATTRIBUTE_TYPE: + return true; + case ZCL_INT48S_ATTRIBUTE_TYPE: + return true; + case ZCL_INT56S_ATTRIBUTE_TYPE: + return true; + case ZCL_INT64S_ATTRIBUTE_TYPE: + return true; + case ZCL_TEMPERATURE_ATTRIBUTE_TYPE: + return true; + case ZCL_POWER_MW_ATTRIBUTE_TYPE: + return true; + case ZCL_AMPERAGE_MA_ATTRIBUTE_TYPE: + return true; + case ZCL_VOLTAGE_MV_ATTRIBUTE_TYPE: + return true; + case ZCL_ENERGY_MWH_ATTRIBUTE_TYPE: + return true; + default: + return false; + } +} +} // namespace app +} // namespace chip 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 a8fc013fa0ce19..4088d638e85c98 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 @@ -42,7 +42,7 @@ namespace Attributes { namespace IdentifyTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -57,7 +57,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -67,10 +67,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Identify::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Identify::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -87,7 +88,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace IdentifyType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Identify::IdentifyTypeEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Identify::IdentifyTypeEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -102,7 +103,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Identify::IdentifyTypeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Identify::IdentifyTypeEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -113,10 +114,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Identify::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Identify::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Identify::IdentifyTypeEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Identify::IdentifyTypeEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -133,7 +135,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -148,7 +150,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -158,10 +160,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Identify::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Identify::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -178,7 +181,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -193,7 +196,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -203,10 +206,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Identify::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Identify::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -229,8 +233,7 @@ namespace Attributes { namespace NameSupport { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - chip::BitMask * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -245,8 +248,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -256,11 +259,11 @@ Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -277,7 +280,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -292,7 +295,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -302,10 +305,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Groups::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Groups::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -322,7 +326,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -337,7 +341,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -347,10 +351,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Groups::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Groups::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -373,7 +378,7 @@ namespace Attributes { namespace OnOff { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -388,7 +393,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -398,10 +403,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OnOff::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -418,7 +424,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace GlobalSceneControl { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -433,7 +439,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -443,10 +449,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OnOff::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -463,7 +470,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace OnTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -478,7 +485,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -488,10 +495,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OnOff::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -508,7 +516,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace OffWaitTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -523,7 +531,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -533,10 +541,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OnOff::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -553,7 +562,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace StartUpOnOff { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; @@ -572,7 +581,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::OnOff::StartUpOnOffEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::OnOff::StartUpOnOffEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -583,10 +592,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OnOff::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::OnOff::StartUpOnOffEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::OnOff::StartUpOnOffEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -599,16 +609,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OnOff::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -617,7 +628,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { @@ -629,7 +640,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -644,7 +655,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -659,7 +670,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -669,10 +680,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OnOff::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -689,7 +701,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -704,7 +716,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -714,10 +726,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOff::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OnOff::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -740,7 +753,7 @@ namespace Attributes { namespace SwitchType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -756,7 +769,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -766,11 +779,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -787,7 +800,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace SwitchActions { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -803,7 +816,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -813,11 +826,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -834,7 +847,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -850,7 +863,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -860,11 +873,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -881,7 +894,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -897,7 +910,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -907,11 +920,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OnOffSwitchConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -934,7 +947,7 @@ namespace Attributes { namespace CurrentLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -953,7 +966,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -963,10 +976,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -979,16 +993,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -997,7 +1012,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -1008,7 +1023,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -1022,7 +1037,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace RemainingTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -1038,7 +1053,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -1048,10 +1063,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -1068,7 +1084,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace MinLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -1084,7 +1100,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -1094,10 +1110,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -1114,7 +1131,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace MaxLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -1130,7 +1147,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -1140,10 +1157,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -1160,7 +1178,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace CurrentFrequency { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -1176,7 +1194,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -1186,10 +1204,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -1206,7 +1225,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace MinFrequency { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -1222,7 +1241,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -1232,10 +1251,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -1252,7 +1272,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace MaxFrequency { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -1268,7 +1288,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -1278,10 +1298,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -1298,7 +1319,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace Options { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -1315,8 +1336,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -1326,11 +1347,11 @@ Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -1347,7 +1368,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace OnOffTransitionTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -1363,7 +1384,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -1373,10 +1394,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -1393,7 +1415,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace OnLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -1412,7 +1434,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -1422,10 +1444,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -1438,16 +1461,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -1456,7 +1480,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -1467,7 +1491,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -1481,7 +1505,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace OnTransitionTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -1500,7 +1524,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -1510,10 +1534,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -1526,16 +1551,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -1544,7 +1570,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -1555,7 +1581,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -1569,7 +1595,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace OffTransitionTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -1588,7 +1614,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -1598,10 +1624,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -1614,16 +1641,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -1632,7 +1660,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -1643,7 +1671,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -1657,7 +1685,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace DefaultMoveRate { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -1676,7 +1704,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -1686,10 +1714,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -1702,16 +1731,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -1720,7 +1750,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -1731,7 +1761,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -1745,7 +1775,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace StartUpCurrentLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -1764,7 +1794,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -1774,10 +1804,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -1790,16 +1821,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -1808,7 +1840,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -1819,7 +1851,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -1833,7 +1865,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -1849,7 +1881,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -1859,10 +1891,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -1879,7 +1912,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -1895,7 +1928,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -1905,10 +1938,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LevelControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LevelControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -1931,7 +1965,7 @@ namespace Attributes { namespace ActiveText { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; Protocols::InteractionModel::Status status = @@ -1949,7 +1983,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -1958,11 +1992,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -1978,7 +2012,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace Description { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; Protocols::InteractionModel::Status status = @@ -1996,7 +2030,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -2005,11 +2039,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -2025,7 +2059,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace InactiveText { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; Protocols::InteractionModel::Status status = @@ -2043,7 +2077,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -2052,11 +2086,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -2072,7 +2106,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace OutOfService { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -2088,7 +2122,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2098,10 +2132,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2118,7 +2153,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace Polarity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -2134,7 +2169,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2144,10 +2179,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2164,7 +2200,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace PresentValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -2180,7 +2216,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2190,10 +2226,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2210,7 +2247,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace Reliability { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -2226,7 +2263,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2236,10 +2273,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2256,7 +2294,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace StatusFlags { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -2272,7 +2310,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2282,10 +2320,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2302,7 +2341,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace ApplicationType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -2318,7 +2357,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2328,10 +2367,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2348,7 +2388,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -2364,7 +2404,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2374,10 +2414,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2394,7 +2435,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -2410,7 +2451,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2420,10 +2461,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BinaryInputBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BinaryInputBasic::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2446,7 +2488,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -2462,7 +2504,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2472,11 +2514,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PulseWidthModulation::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PulseWidthModulation::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2493,7 +2535,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -2509,7 +2551,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2519,10 +2561,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PulseWidthModulation::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PulseWidthModulation::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2549,7 +2592,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -2564,7 +2607,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2574,10 +2617,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Binding::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Binding::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2594,7 +2638,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -2609,7 +2653,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2619,10 +2663,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Binding::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Binding::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2645,7 +2690,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -2661,7 +2706,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2671,10 +2716,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::AccessControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::AccessControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2697,7 +2743,7 @@ namespace Attributes { namespace SetupURL { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[512 + 2]; Protocols::InteractionModel::Status status = @@ -2715,7 +2761,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(512 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -2724,10 +2770,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::LittleEndian::Put16(zclString, length); memcpy(&zclString[2], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::Actions::Id, Id, zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Actions::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(512 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -2743,7 +2790,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -2758,7 +2805,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2768,10 +2815,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Actions::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Actions::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2788,7 +2836,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -2803,7 +2851,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2813,10 +2861,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Actions::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Actions::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2839,7 +2888,7 @@ namespace Attributes { namespace NodeLabel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; Protocols::InteractionModel::Status status = @@ -2857,7 +2906,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -2866,11 +2915,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::BasicInformation::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BasicInformation::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -2886,7 +2935,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace LocalConfigDisabled { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -2902,7 +2951,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2912,10 +2961,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BasicInformation::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BasicInformation::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2932,7 +2982,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace Reachable { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -2948,7 +2998,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2958,10 +3008,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BasicInformation::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BasicInformation::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -2978,7 +3029,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -2994,7 +3045,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3004,10 +3055,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BasicInformation::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BasicInformation::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3024,7 +3076,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -3040,7 +3092,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3050,10 +3102,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BasicInformation::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BasicInformation::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3076,7 +3129,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -3092,7 +3145,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3102,11 +3155,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OtaSoftwareUpdateProvider::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OtaSoftwareUpdateProvider::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3123,7 +3176,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -3139,7 +3192,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3149,11 +3202,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OtaSoftwareUpdateProvider::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OtaSoftwareUpdateProvider::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3176,7 +3229,7 @@ namespace Attributes { namespace UpdatePossible { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -3192,7 +3245,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3202,11 +3255,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3223,7 +3276,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace UpdateState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum * value) { using Traits = NumericAttributeTraits; @@ -3240,8 +3293,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3251,12 +3304,11 @@ Set(chip::EndpointId endpoint, chip::app::Clusters::OtaSoftwareUpdateRequestor:: Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3273,7 +3325,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace UpdateStateProgress { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -3292,7 +3344,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -3302,11 +3354,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -3319,17 +3371,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -3338,7 +3390,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -3349,7 +3401,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -3363,7 +3415,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -3379,7 +3431,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3389,11 +3441,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3410,7 +3462,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -3426,7 +3478,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3436,11 +3488,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OtaSoftwareUpdateRequestor::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3463,7 +3515,7 @@ namespace Attributes { namespace ActiveLocale { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[35 + 1]; Protocols::InteractionModel::Status status = @@ -3481,7 +3533,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(35 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -3490,11 +3542,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::LocalizationConfiguration::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LocalizationConfiguration::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(35 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -3510,7 +3562,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -3526,7 +3578,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3536,11 +3588,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LocalizationConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LocalizationConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3557,7 +3609,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -3573,7 +3625,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3583,11 +3635,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LocalizationConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LocalizationConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3610,8 +3662,7 @@ namespace Attributes { namespace HourFormat { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - chip::app::Clusters::TimeFormatLocalization::HourFormatEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::HourFormatEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -3627,8 +3678,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::HourFormatEnum value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::HourFormatEnum value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3638,11 +3689,11 @@ Set(chip::EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::Hour Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TimeFormatLocalization::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TimeFormatLocalization::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::TimeFormatLocalization::HourFormatEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::HourFormatEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3659,8 +3710,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace ActiveCalendarType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -3676,8 +3726,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3687,11 +3737,11 @@ Set(chip::EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::Cale Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TimeFormatLocalization::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TimeFormatLocalization::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3708,7 +3758,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -3724,7 +3774,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3734,11 +3784,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TimeFormatLocalization::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TimeFormatLocalization::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3755,7 +3805,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -3771,7 +3821,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3781,11 +3831,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TimeFormatLocalization::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TimeFormatLocalization::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3808,7 +3858,7 @@ namespace Attributes { namespace TemperatureUnit { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnitEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnitEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -3824,7 +3874,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnitEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnitEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -3835,10 +3885,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitLocalization::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitLocalization::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnitEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnitEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3855,7 +3906,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -3871,7 +3922,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3881,10 +3932,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitLocalization::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitLocalization::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3901,7 +3953,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -3917,7 +3969,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3927,10 +3979,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitLocalization::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitLocalization::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3953,7 +4006,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -3969,7 +4022,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -3979,11 +4032,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSourceConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSourceConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -4000,7 +4053,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -4016,7 +4069,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -4026,11 +4079,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSourceConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSourceConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -4053,7 +4106,7 @@ namespace Attributes { namespace Status { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatusEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatusEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -4069,7 +4122,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatusEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatusEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -4080,10 +4133,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatusEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatusEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -4100,7 +4154,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace Order { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -4116,7 +4170,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -4126,10 +4180,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -4146,7 +4201,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace Description { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[60 + 1]; Protocols::InteractionModel::Status status = @@ -4164,7 +4219,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(60 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -4173,10 +4228,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(60 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -4192,7 +4248,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace WiredAssessedInputVoltage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -4211,7 +4267,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -4221,10 +4277,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -4237,16 +4294,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -4255,7 +4313,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -4266,7 +4324,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -4280,7 +4338,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace WiredAssessedInputFrequency { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -4299,7 +4357,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -4309,10 +4367,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -4325,16 +4384,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -4343,7 +4403,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -4354,7 +4414,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -4368,7 +4428,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace WiredCurrentType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -4384,7 +4444,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -4395,10 +4455,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -4415,7 +4476,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace WiredAssessedCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -4434,7 +4495,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -4444,10 +4505,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -4460,16 +4522,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -4478,7 +4541,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -4489,7 +4552,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -4503,7 +4566,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace WiredNominalVoltage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -4519,7 +4582,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -4529,10 +4592,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -4549,7 +4613,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace WiredMaximumCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -4565,7 +4629,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -4575,10 +4639,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -4595,7 +4660,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace WiredPresent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -4611,7 +4676,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -4621,10 +4686,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -4641,7 +4707,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace BatVoltage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -4660,7 +4726,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -4670,10 +4736,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -4686,16 +4753,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -4704,7 +4772,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -4715,7 +4783,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -4729,7 +4797,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace BatPercentRemaining { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -4748,7 +4816,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -4758,10 +4826,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -4774,16 +4843,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -4792,7 +4862,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -4803,7 +4873,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -4817,7 +4887,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace BatTimeRemaining { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -4836,7 +4906,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -4846,10 +4916,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -4862,16 +4933,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -4880,7 +4952,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -4891,7 +4963,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -4905,7 +4977,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace BatChargeLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevelEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevelEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -4921,7 +4993,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevelEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevelEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -4932,10 +5004,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevelEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevelEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -4952,7 +5025,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace BatReplacementNeeded { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -4968,7 +5041,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -4978,10 +5051,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -4998,7 +5072,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace BatReplaceability { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceabilityEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceabilityEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -5014,7 +5088,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceabilityEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceabilityEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -5025,10 +5099,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceabilityEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceabilityEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5045,7 +5120,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace BatPresent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -5061,7 +5136,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5071,10 +5146,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5091,7 +5167,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace BatReplacementDescription { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[60 + 1]; Protocols::InteractionModel::Status status = @@ -5109,7 +5185,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(60 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -5118,10 +5194,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(60 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -5137,8 +5214,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace BatCommonDesignation { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - chip::app::Clusters::PowerSource::BatCommonDesignationEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::PowerSource::BatCommonDesignationEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -5154,7 +5230,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatCommonDesignationEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::BatCommonDesignationEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -5165,10 +5241,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatCommonDesignationEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::BatCommonDesignationEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5185,7 +5262,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace BatANSIDesignation { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[20 + 1]; Protocols::InteractionModel::Status status = @@ -5203,7 +5280,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(20 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -5212,10 +5289,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(20 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -5231,7 +5309,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace BatIECDesignation { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[20 + 1]; Protocols::InteractionModel::Status status = @@ -5249,7 +5327,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(20 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -5258,10 +5336,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(20 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -5277,8 +5356,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace BatApprovedChemistry { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - chip::app::Clusters::PowerSource::BatApprovedChemistryEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -5294,7 +5372,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -5305,10 +5383,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5325,7 +5404,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace BatCapacity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -5341,7 +5420,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5351,10 +5430,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5371,7 +5451,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace BatQuantity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -5387,7 +5467,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5397,10 +5477,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5417,7 +5498,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace BatChargeState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeStateEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeStateEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -5433,7 +5514,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeStateEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -5444,10 +5525,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeStateEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeStateEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5464,7 +5546,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace BatTimeToFullCharge { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -5483,7 +5565,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -5493,10 +5575,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -5509,16 +5592,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -5527,7 +5611,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -5538,7 +5622,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -5552,7 +5636,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace BatFunctionalWhileCharging { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -5568,7 +5652,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5578,10 +5662,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5598,7 +5683,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace BatChargingCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -5617,7 +5702,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -5627,10 +5712,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -5643,16 +5729,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -5661,7 +5748,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -5672,7 +5759,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -5686,7 +5773,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -5702,7 +5789,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5712,10 +5799,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5732,7 +5820,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -5748,7 +5836,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5758,10 +5846,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerSource::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerSource::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5784,7 +5873,7 @@ namespace Attributes { namespace Breadcrumb { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint64_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -5800,7 +5889,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5810,10 +5899,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::GeneralCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT64U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5830,7 +5920,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu namespace TCAcceptedVersion { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -5846,7 +5936,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5856,10 +5946,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::GeneralCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5876,7 +5967,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace TCMinRequiredVersion { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -5892,7 +5983,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5902,10 +5993,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::GeneralCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5922,7 +6014,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace TCAcknowledgements { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -5938,7 +6030,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5948,11 +6040,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::GeneralCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5969,7 +6061,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace TCAcknowledgementsRequired { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -5985,7 +6077,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -5995,10 +6087,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::GeneralCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6015,7 +6108,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -6031,7 +6124,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6041,11 +6134,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::GeneralCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6062,7 +6155,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -6078,7 +6171,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6088,10 +6181,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::GeneralCommissioning::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::GeneralCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6114,7 +6208,7 @@ namespace Attributes { namespace MaxNetworks { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -6130,7 +6224,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6140,10 +6234,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::NetworkCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6160,7 +6255,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace ScanMaxTimeSeconds { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -6176,7 +6271,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6186,10 +6281,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::NetworkCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6206,7 +6302,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace ConnectMaxTimeSeconds { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -6222,7 +6318,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6232,10 +6328,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::NetworkCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6252,7 +6349,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace InterfaceEnabled { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -6268,7 +6365,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6278,10 +6375,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::NetworkCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6299,8 +6397,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace LastNetworkingStatus { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, - DataModel::Nullable & value) +Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -6319,7 +6416,7 @@ Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::NetworkCommissioning::NetworkCommissioningStatusEnum value, MarkAttributeDirty markDirty) { @@ -6331,10 +6428,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::NetworkCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::NetworkCommissioning::NetworkCommissioningStatusEnum value) { using Traits = NumericAttributeTraits; @@ -6348,16 +6446,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::NetworkCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -6367,7 +6466,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) } Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { @@ -6380,7 +6479,7 @@ Set(chip::EndpointId endpoint, } Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -6395,7 +6494,7 @@ Set(chip::EndpointId endpoint, namespace LastNetworkID { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { if (value.IsNull()) { @@ -6421,7 +6520,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) { static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -6430,11 +6529,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::NetworkCommissioning::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value) { static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -6446,20 +6545,20 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { uint8_t zclString[1] = { 0xFF }; - return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::NetworkCommissioning::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { uint8_t zclString[1] = { 0xFF }; return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -6470,7 +6569,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -6484,7 +6583,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace LastConnectErrorValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -6503,7 +6602,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -6513,10 +6612,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::NetworkCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -6529,16 +6629,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::NetworkCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -6547,7 +6648,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -6558,7 +6659,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -6572,7 +6673,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace SupportedThreadFeatures { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -6589,7 +6690,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { @@ -6601,11 +6702,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::NetworkCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -6623,7 +6724,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace ThreadVersion { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -6639,7 +6740,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6649,10 +6750,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::NetworkCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6669,7 +6771,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -6685,7 +6787,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6695,11 +6797,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::NetworkCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6716,7 +6818,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -6732,7 +6834,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6742,10 +6844,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NetworkCommissioning::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::NetworkCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6768,7 +6871,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -6784,7 +6887,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6794,10 +6897,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DiagnosticLogs::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DiagnosticLogs::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6814,7 +6918,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -6830,7 +6934,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6840,10 +6944,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DiagnosticLogs::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DiagnosticLogs::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6866,7 +6971,7 @@ namespace Attributes { namespace TestEventTriggersEnabled { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -6882,7 +6987,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6892,10 +6997,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::GeneralDiagnostics::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::GeneralDiagnostics::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6918,7 +7024,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -6934,7 +7040,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6944,10 +7050,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SoftwareDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::SoftwareDiagnostics::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6970,7 +7077,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -6986,7 +7093,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -6996,11 +7103,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7017,7 +7124,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -7033,7 +7140,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7043,11 +7150,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ThreadNetworkDiagnostics::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7070,7 +7177,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -7086,7 +7193,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7096,11 +7203,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7117,7 +7224,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -7133,7 +7240,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7143,11 +7250,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WiFiNetworkDiagnostics::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7170,7 +7277,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -7186,7 +7293,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7196,11 +7303,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7217,7 +7324,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -7233,7 +7340,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7243,11 +7350,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::EthernetNetworkDiagnostics::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7270,7 +7377,7 @@ namespace Attributes { namespace TimeSource { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -7286,7 +7393,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -7297,10 +7404,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TimeSynchronization::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7317,8 +7425,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace TimeZoneDatabase { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -7334,8 +7441,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7345,11 +7452,11 @@ Set(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeZon Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TimeSynchronization::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7366,7 +7473,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace NTPServerAvailable { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -7382,7 +7489,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7392,10 +7499,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TimeSynchronization::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7412,7 +7520,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace SupportsDNSResolve { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -7428,7 +7536,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7438,10 +7546,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TimeSynchronization::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7458,7 +7567,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -7474,7 +7583,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7484,10 +7593,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TimeSynchronization::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7504,7 +7614,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -7520,7 +7630,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7530,10 +7640,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TimeSynchronization::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TimeSynchronization::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7556,7 +7667,7 @@ namespace Attributes { namespace VendorName { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; Protocols::InteractionModel::Status status = @@ -7574,7 +7685,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -7583,11 +7694,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -7604,7 +7715,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace VendorID { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::VendorId * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::VendorId * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -7620,7 +7731,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::VendorI return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::VendorId value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7630,11 +7741,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorI Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, writable, ZCL_VENDOR_ID_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id), + EmberAfWriteDataInput(writable, ZCL_VENDOR_ID_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::VendorId value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7651,7 +7762,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorI namespace ProductName { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; Protocols::InteractionModel::Status status = @@ -7669,7 +7780,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -7678,11 +7789,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -7699,7 +7810,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace ProductID { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -7715,7 +7826,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7725,11 +7836,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7746,7 +7857,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace NodeLabel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; Protocols::InteractionModel::Status status = @@ -7764,7 +7875,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -7773,11 +7884,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -7794,7 +7905,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace HardwareVersion { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -7810,7 +7921,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7820,11 +7931,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7841,7 +7952,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace HardwareVersionString { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[64 + 1]; Protocols::InteractionModel::Status status = @@ -7859,7 +7970,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -7868,11 +7979,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -7889,7 +8000,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace SoftwareVersion { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -7905,7 +8016,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7915,11 +8026,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -7936,7 +8047,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace SoftwareVersionString { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[64 + 1]; Protocols::InteractionModel::Status status = @@ -7954,7 +8065,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -7963,11 +8074,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -7984,7 +8095,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace ManufacturingDate { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; Protocols::InteractionModel::Status status = @@ -8002,7 +8113,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -8011,11 +8122,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -8032,7 +8143,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace PartNumber { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; Protocols::InteractionModel::Status status = @@ -8050,7 +8161,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -8059,11 +8170,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -8080,7 +8191,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace ProductURL { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[256 + 2]; Protocols::InteractionModel::Status status = @@ -8098,7 +8209,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(256 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -8107,11 +8218,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::LittleEndian::Put16(zclString, length); memcpy(&zclString[2], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, - ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(256 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -8128,7 +8239,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace ProductLabel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[64 + 1]; Protocols::InteractionModel::Status status = @@ -8146,7 +8257,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -8155,11 +8266,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -8176,7 +8287,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace SerialNumber { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; Protocols::InteractionModel::Status status = @@ -8194,7 +8305,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -8203,11 +8314,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -8224,7 +8335,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace Reachable { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -8240,7 +8351,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8250,11 +8361,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8271,7 +8382,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace UniqueID { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; Protocols::InteractionModel::Status status = @@ -8289,7 +8400,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -8298,11 +8409,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, zclString, - ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -8319,7 +8430,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -8335,7 +8446,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8345,11 +8456,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8366,7 +8477,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -8382,7 +8493,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8392,11 +8503,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BridgedDeviceBasicInformation::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8419,7 +8530,7 @@ namespace Attributes { namespace NumberOfPositions { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -8434,7 +8545,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8444,10 +8555,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Switch::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8464,7 +8576,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace CurrentPosition { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -8479,7 +8591,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8489,10 +8601,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Switch::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8509,7 +8622,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace MultiPressMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -8524,7 +8637,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8534,10 +8647,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Switch::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8554,7 +8668,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -8569,7 +8683,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8579,10 +8693,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Switch::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8599,7 +8714,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -8614,7 +8729,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8624,10 +8739,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Switch::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Switch::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8650,7 +8766,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -8666,7 +8782,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8676,11 +8792,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::AdministratorCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8697,7 +8813,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -8713,7 +8829,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8723,11 +8839,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::AdministratorCommissioning::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::AdministratorCommissioning::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8750,7 +8866,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -8766,7 +8882,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8776,11 +8892,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OperationalCredentials::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8797,7 +8913,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -8813,7 +8929,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8823,11 +8939,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OperationalCredentials::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OperationalCredentials::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8854,7 +8970,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -8870,7 +8986,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8880,10 +8996,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FixedLabel::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FixedLabel::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8900,7 +9017,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -8916,7 +9033,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8926,10 +9043,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FixedLabel::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FixedLabel::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8952,7 +9070,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -8968,7 +9086,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8978,10 +9096,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UserLabel::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UserLabel::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -8998,7 +9117,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -9014,7 +9133,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9024,10 +9143,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UserLabel::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UserLabel::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9050,7 +9170,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -9066,7 +9186,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9076,10 +9196,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ProxyConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ProxyConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9096,7 +9217,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -9112,7 +9233,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9122,10 +9243,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ProxyConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ProxyConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9148,7 +9270,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -9164,7 +9286,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9174,10 +9296,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ProxyDiscovery::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ProxyDiscovery::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9194,7 +9317,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -9210,7 +9333,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9220,10 +9343,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ProxyDiscovery::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ProxyDiscovery::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9246,7 +9370,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -9262,7 +9386,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9272,10 +9396,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ProxyValid::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ProxyValid::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9292,7 +9417,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -9308,7 +9433,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9318,10 +9443,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ProxyValid::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ProxyValid::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9344,7 +9470,7 @@ namespace Attributes { namespace StateValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -9360,7 +9486,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9370,10 +9496,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BooleanState::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BooleanState::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9390,7 +9517,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -9406,7 +9533,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9416,10 +9543,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BooleanState::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BooleanState::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9436,7 +9564,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -9452,7 +9580,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9462,10 +9590,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BooleanState::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BooleanState::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9488,7 +9617,7 @@ namespace Attributes { namespace UserActiveModeTriggerHint { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -9505,7 +9634,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { @@ -9517,10 +9646,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::IcdManagement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::IcdManagement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -9538,7 +9668,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace UserActiveModeTriggerInstruction { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[128 + 1]; Protocols::InteractionModel::Status status = @@ -9556,7 +9686,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(128 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -9565,10 +9695,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::IcdManagement::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::IcdManagement::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(128 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -9584,7 +9715,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace OperatingMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::IcdManagement::OperatingModeEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::IcdManagement::OperatingModeEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -9600,7 +9731,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::IcdManagement::OperatingModeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::IcdManagement::OperatingModeEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -9611,10 +9742,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::IcdManagement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::IcdManagement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::IcdManagement::OperatingModeEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::IcdManagement::OperatingModeEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9631,7 +9763,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -9647,7 +9779,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9657,10 +9789,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::IcdManagement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::IcdManagement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9677,7 +9810,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -9693,7 +9826,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9703,10 +9836,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::IcdManagement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::IcdManagement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9729,7 +9863,7 @@ namespace Attributes { namespace SetTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -9744,7 +9878,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9754,10 +9888,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Timer::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Timer::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9774,7 +9909,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace TimeRemaining { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -9789,7 +9924,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9799,10 +9934,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Timer::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Timer::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9819,7 +9955,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace TimerState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Timer::TimerStatusEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Timer::TimerStatusEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -9834,7 +9970,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Timer::TimerStatusEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Timer::TimerStatusEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -9845,10 +9981,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Timer::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Timer::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Timer::TimerStatusEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Timer::TimerStatusEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9865,7 +10002,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -9880,7 +10017,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9890,10 +10027,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Timer::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Timer::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9910,7 +10048,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -9925,7 +10063,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9935,10 +10073,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Timer::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Timer::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9961,7 +10100,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -9977,7 +10116,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -9987,11 +10126,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OvenCavityOperationalState::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OvenCavityOperationalState::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -10008,7 +10147,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -10024,7 +10163,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -10034,11 +10173,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OvenCavityOperationalState::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OvenCavityOperationalState::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -10061,7 +10200,7 @@ namespace Attributes { namespace CurrentMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -10076,7 +10215,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -10086,10 +10225,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OvenMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -10106,7 +10246,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace StartUpMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -10124,7 +10264,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -10134,10 +10274,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OvenMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -10150,16 +10291,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OvenMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -10168,7 +10310,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -10179,7 +10321,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -10193,7 +10335,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace OnMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -10211,7 +10353,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -10221,10 +10363,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OvenMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -10237,16 +10380,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OvenMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -10255,7 +10399,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -10266,7 +10410,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -10280,7 +10424,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -10295,7 +10439,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -10305,10 +10449,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OvenMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -10325,7 +10470,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -10340,7 +10485,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -10350,10 +10495,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OvenMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OvenMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -10376,7 +10522,7 @@ namespace Attributes { namespace SelectedDrynessLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; @@ -10396,8 +10542,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryDryerControls::DrynessLevelEnum value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::LaundryDryerControls::DrynessLevelEnum value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -10407,11 +10553,11 @@ Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryDryerControls::Drynes Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LaundryDryerControls::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LaundryDryerControls::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::LaundryDryerControls::DrynessLevelEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::LaundryDryerControls::DrynessLevelEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -10424,16 +10570,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return emberAfWriteAttribute(endpoint, Clusters::LaundryDryerControls::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::LaundryDryerControls::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LaundryDryerControls::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -10443,8 +10590,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) } Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable & value, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -10456,8 +10602,7 @@ Set(chip::EndpointId endpoint, } Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable & value) +Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -10471,7 +10616,7 @@ Set(chip::EndpointId endpoint, namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -10487,7 +10632,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -10497,11 +10642,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LaundryDryerControls::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LaundryDryerControls::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -10518,7 +10663,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -10534,7 +10679,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -10544,10 +10689,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LaundryDryerControls::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LaundryDryerControls::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -10570,7 +10716,7 @@ namespace Attributes { namespace Description { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[64 + 1]; Protocols::InteractionModel::Status status = @@ -10588,7 +10734,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -10597,10 +10743,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ModeSelect::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(64 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -10616,7 +10763,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace StandardNamespace { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -10635,7 +10782,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -10645,10 +10792,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ModeSelect::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -10661,16 +10809,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ModeSelect::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -10679,7 +10828,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -10690,7 +10839,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -10704,7 +10853,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace CurrentMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -10720,7 +10869,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -10730,10 +10879,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ModeSelect::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -10750,7 +10900,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace StartUpMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -10769,7 +10919,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -10779,10 +10929,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ModeSelect::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -10795,16 +10946,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ModeSelect::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -10813,7 +10965,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -10824,7 +10976,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -10838,7 +10990,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace OnMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -10857,7 +11009,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -10867,10 +11019,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ModeSelect::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -10883,16 +11036,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ModeSelect::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -10901,7 +11055,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -10912,7 +11066,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -10926,7 +11080,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -10942,7 +11096,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -10952,10 +11106,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ModeSelect::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -10972,7 +11127,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -10988,7 +11143,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -10998,10 +11153,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ModeSelect::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ModeSelect::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11024,7 +11180,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -11040,7 +11196,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11050,10 +11206,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LaundryWasherMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11076,7 +11233,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -11092,7 +11249,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11102,11 +11259,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::RefrigeratorAndTemperatureControlledCabinetMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11130,7 +11287,7 @@ namespace Attributes { namespace SpinSpeedCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -11149,7 +11306,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -11159,10 +11316,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LaundryWasherControls::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -11175,16 +11333,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LaundryWasherControls::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -11193,7 +11352,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -11204,7 +11363,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -11218,8 +11377,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NumberOfRinses { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -11235,8 +11393,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11246,11 +11404,11 @@ Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::Numbe Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LaundryWasherControls::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11267,7 +11425,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -11283,7 +11441,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11293,11 +11451,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LaundryWasherControls::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11314,7 +11472,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -11330,7 +11488,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11340,10 +11498,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LaundryWasherControls::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LaundryWasherControls::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11366,7 +11525,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -11382,7 +11541,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11392,10 +11551,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RvcRunMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::RvcRunMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11418,7 +11578,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -11434,7 +11594,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11444,10 +11604,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RvcCleanMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::RvcCleanMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11470,7 +11631,7 @@ namespace Attributes { namespace TemperatureSetpoint { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -11486,7 +11647,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11496,11 +11657,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TemperatureControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11517,7 +11678,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace MinTemperature { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -11533,7 +11694,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11543,11 +11704,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TemperatureControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11564,7 +11725,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace MaxTemperature { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -11580,7 +11741,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11590,11 +11751,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TemperatureControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11611,7 +11772,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace Step { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -11627,7 +11788,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11637,11 +11798,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TemperatureControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11658,7 +11819,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace SelectedTemperatureLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -11674,7 +11835,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11684,10 +11845,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TemperatureControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11704,7 +11866,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -11720,7 +11882,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11730,10 +11892,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TemperatureControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11750,7 +11913,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -11766,7 +11929,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11776,10 +11939,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TemperatureControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11802,7 +11966,7 @@ namespace Attributes { namespace Mask { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -11819,9 +11983,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, - MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11831,10 +11994,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::RefrigeratorAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -11852,7 +12016,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace State { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -11869,9 +12033,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, - MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11881,10 +12044,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::RefrigeratorAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -11902,7 +12066,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace Supported { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -11919,9 +12083,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, - MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11931,10 +12094,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::RefrigeratorAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -11952,7 +12116,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -11968,7 +12132,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11978,10 +12142,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::RefrigeratorAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -11998,7 +12163,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -12014,7 +12179,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12024,10 +12189,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RefrigeratorAlarm::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::RefrigeratorAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12050,7 +12216,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -12066,7 +12232,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12076,10 +12242,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DishwasherMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DishwasherMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12102,7 +12269,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -12118,7 +12285,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12128,10 +12295,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::AirQuality::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::AirQuality::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12154,7 +12322,7 @@ namespace Attributes { namespace ExpressedState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -12170,7 +12338,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -12181,10 +12349,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::SmokeCoAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12201,7 +12370,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace SmokeState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -12217,7 +12386,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -12228,10 +12397,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::SmokeCoAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12248,7 +12418,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace COState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -12264,7 +12434,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -12275,10 +12445,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::SmokeCoAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12295,7 +12466,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace BatteryAlert { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -12311,7 +12482,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -12322,10 +12493,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::SmokeCoAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12342,7 +12514,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace DeviceMuted { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::MuteStateEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::MuteStateEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -12358,7 +12530,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -12369,10 +12541,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::SmokeCoAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12389,7 +12562,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace TestInProgress { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -12405,7 +12578,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12415,10 +12588,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::SmokeCoAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12435,7 +12609,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace HardwareFaultAlert { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -12451,7 +12625,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12461,10 +12635,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::SmokeCoAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12481,7 +12656,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace EndOfServiceAlert { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -12497,7 +12672,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -12508,10 +12683,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::SmokeCoAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12528,7 +12704,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace InterconnectSmokeAlarm { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -12544,7 +12720,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -12555,10 +12731,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::SmokeCoAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12575,7 +12752,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace InterconnectCOAlarm { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -12591,7 +12768,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -12602,10 +12779,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::SmokeCoAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12622,8 +12800,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace ContaminationState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -12639,7 +12816,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -12650,10 +12827,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::SmokeCoAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12670,7 +12848,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace SmokeSensitivityLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::SensitivityEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::SensitivityEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -12686,7 +12864,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -12697,10 +12875,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::SmokeCoAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12717,7 +12896,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace ExpiryDate { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -12733,7 +12912,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12743,10 +12922,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::SmokeCoAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12763,7 +12943,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -12779,7 +12959,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12789,10 +12969,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::SmokeCoAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12809,7 +12990,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -12825,7 +13006,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12835,10 +13016,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SmokeCoAlarm::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::SmokeCoAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12861,7 +13043,7 @@ namespace Attributes { namespace Mask { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -12878,8 +13060,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12889,11 +13071,11 @@ Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12910,7 +13092,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace Latch { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -12927,8 +13109,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12938,11 +13120,11 @@ Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12959,7 +13141,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace State { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -12976,8 +13158,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -12987,11 +13169,11 @@ Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13008,7 +13190,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace Supported { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -13025,8 +13207,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13036,11 +13218,11 @@ Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13057,7 +13239,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -13073,7 +13255,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13083,10 +13265,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu 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, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DishwasherAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13103,7 +13286,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -13119,7 +13302,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13129,10 +13312,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu 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, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DishwasherAlarm::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13155,7 +13339,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -13171,7 +13355,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13181,10 +13365,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MicrowaveOvenMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MicrowaveOvenMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13207,7 +13392,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -13223,7 +13408,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13233,10 +13418,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MicrowaveOvenControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MicrowaveOvenControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13259,7 +13445,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -13275,7 +13461,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13285,10 +13471,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OperationalState::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OperationalState::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13305,7 +13492,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -13321,7 +13508,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13331,10 +13518,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OperationalState::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OperationalState::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13357,7 +13545,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -13373,7 +13561,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13383,10 +13571,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::RvcOperationalState::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13403,7 +13592,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -13419,7 +13608,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13429,10 +13618,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RvcOperationalState::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::RvcOperationalState::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13455,7 +13645,7 @@ namespace Attributes { namespace LastConfiguredBy { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -13474,7 +13664,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::NodeId value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::NodeId value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -13484,10 +13674,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::NodeId Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_NODE_ID_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ScenesManagement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_NODE_ID_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::NodeId value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::NodeId value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -13500,16 +13691,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::NodeId return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_NODE_ID_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_NODE_ID_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ScenesManagement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_NODE_ID_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -13518,7 +13710,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_NODE_ID_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -13529,7 +13721,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -13543,7 +13735,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace SceneTableSize { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -13559,7 +13751,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13569,10 +13761,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ScenesManagement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13589,7 +13782,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -13605,7 +13798,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13615,10 +13808,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ScenesManagement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13635,7 +13829,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -13651,7 +13845,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13661,10 +13855,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ScenesManagement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ScenesManagement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13687,7 +13882,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -13703,7 +13898,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13713,10 +13908,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::HepaFilterMonitoring::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::HepaFilterMonitoring::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13739,7 +13935,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -13755,7 +13951,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13765,11 +13961,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ActivatedCarbonFilterMonitoring::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ActivatedCarbonFilterMonitoring::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13792,7 +13988,7 @@ namespace Attributes { namespace SupportedSensitivityLevels { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -13808,7 +14004,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13818,11 +14014,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BooleanStateConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13839,7 +14035,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace DefaultSensitivityLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -13855,7 +14051,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13865,11 +14061,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BooleanStateConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -13886,7 +14082,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace AlarmsActive { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -13903,7 +14099,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { @@ -13915,11 +14111,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BooleanStateConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -13937,7 +14133,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace AlarmsSuppressed { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -13954,7 +14150,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { @@ -13966,11 +14162,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BooleanStateConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -13988,7 +14184,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace AlarmsEnabled { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -14005,7 +14201,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { @@ -14017,11 +14213,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BooleanStateConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -14039,7 +14235,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace AlarmsSupported { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -14056,7 +14252,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { @@ -14068,11 +14264,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BooleanStateConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -14090,7 +14286,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace SensorFault { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -14107,7 +14303,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { @@ -14119,11 +14315,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BooleanStateConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -14141,7 +14337,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -14157,7 +14353,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -14167,11 +14363,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BooleanStateConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -14188,7 +14384,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -14204,7 +14400,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -14214,11 +14410,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BooleanStateConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BooleanStateConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -14241,7 +14437,7 @@ namespace Attributes { namespace OpenDuration { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -14260,7 +14456,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -14270,11 +14466,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ValveConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -14287,17 +14483,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ValveConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -14306,7 +14502,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -14317,7 +14513,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -14331,7 +14527,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace DefaultOpenDuration { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -14350,7 +14546,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -14360,11 +14556,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ValveConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -14377,17 +14573,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ValveConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -14396,7 +14592,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -14407,7 +14603,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -14421,7 +14617,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace AutoCloseTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -14440,7 +14636,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -14450,11 +14646,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ValveConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -14467,17 +14663,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ValveConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -14486,7 +14682,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -14497,7 +14693,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -14512,7 +14708,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace CurrentState { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -14531,9 +14727,8 @@ Get(chip::EndpointId endpoint, DataModel::Nullable; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -14543,11 +14738,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ValveConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value) { using Traits = NumericAttributeTraits; @@ -14561,17 +14756,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ValveConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -14581,7 +14776,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) } Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { @@ -14594,7 +14789,7 @@ Set(chip::EndpointId endpoint, } Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -14610,7 +14805,7 @@ Set(chip::EndpointId endpoint, namespace TargetState { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -14629,9 +14824,8 @@ Get(chip::EndpointId endpoint, DataModel::Nullable; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -14641,11 +14835,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ValveConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value) { using Traits = NumericAttributeTraits; @@ -14659,17 +14853,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ValveConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -14679,7 +14873,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) } Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { @@ -14692,7 +14886,7 @@ Set(chip::EndpointId endpoint, } Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -14707,7 +14901,7 @@ Set(chip::EndpointId endpoint, namespace CurrentLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -14726,7 +14920,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -14736,11 +14930,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ValveConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_PERCENT_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -14753,17 +14947,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ValveConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_PERCENT_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -14772,7 +14966,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -14783,7 +14977,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -14797,7 +14991,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace TargetLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -14816,7 +15010,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -14826,11 +15020,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ValveConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_PERCENT_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -14843,17 +15037,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ValveConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_PERCENT_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -14862,7 +15056,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -14873,7 +15067,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -14887,7 +15081,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace DefaultOpenLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Percent * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::Percent * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -14903,7 +15097,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Percent return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -14913,11 +15107,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ValveConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_PERCENT_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -14934,7 +15128,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent namespace ValveFault { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -14951,7 +15145,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { @@ -14963,11 +15157,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ValveConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -14985,7 +15179,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace LevelStep { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15001,7 +15195,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15011,11 +15205,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ValveConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15032,7 +15226,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15048,7 +15242,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15058,11 +15252,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ValveConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15079,7 +15273,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15095,7 +15289,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15105,11 +15299,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ValveConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ValveConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15132,7 +15326,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15148,7 +15342,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15158,11 +15352,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalPowerMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalPowerMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15185,7 +15379,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15201,7 +15395,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15211,11 +15405,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalEnergyMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalEnergyMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15242,7 +15436,7 @@ namespace Attributes { namespace NumberOfLoadControlPrograms { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15258,7 +15452,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15268,11 +15462,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DemandResponseLoadControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15289,7 +15483,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace NumberOfEventsPerProgram { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15305,7 +15499,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15315,11 +15509,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DemandResponseLoadControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15336,7 +15530,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace NumberOfTransitions { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15352,7 +15546,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15362,11 +15556,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DemandResponseLoadControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15383,7 +15577,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace DefaultRandomStart { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15399,7 +15593,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15409,11 +15603,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DemandResponseLoadControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15430,7 +15624,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace DefaultRandomDuration { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15446,7 +15640,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15456,11 +15650,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DemandResponseLoadControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15477,7 +15671,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15493,7 +15687,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15503,11 +15697,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DemandResponseLoadControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15524,7 +15718,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15540,7 +15734,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15550,11 +15744,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DemandResponseLoadControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DemandResponseLoadControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15577,7 +15771,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15592,7 +15786,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15602,10 +15796,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Messages::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Messages::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15622,7 +15817,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15637,7 +15832,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15647,10 +15842,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Messages::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Messages::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15673,7 +15869,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15689,7 +15885,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15699,11 +15895,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DeviceEnergyManagement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15726,7 +15922,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15742,7 +15938,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15752,10 +15948,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EnergyEvse::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::EnergyEvse::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15778,7 +15975,7 @@ namespace Attributes { namespace CurrentEnergyBalance { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15794,7 +15991,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15804,10 +16001,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EnergyPreference::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::EnergyPreference::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15824,7 +16022,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace CurrentLowPowerModeSensitivity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15840,7 +16038,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15850,10 +16048,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EnergyPreference::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::EnergyPreference::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15870,7 +16069,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15886,7 +16085,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15896,10 +16095,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EnergyPreference::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::EnergyPreference::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15916,7 +16116,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15932,7 +16132,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15942,10 +16142,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EnergyPreference::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::EnergyPreference::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15968,7 +16169,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -15984,7 +16185,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -15994,10 +16195,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PowerTopology::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PowerTopology::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -16020,7 +16222,7 @@ namespace Attributes { namespace StartUpMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16039,7 +16241,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -16049,10 +16251,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EnergyEvseMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::EnergyEvseMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -16065,16 +16268,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::EnergyEvseMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::EnergyEvseMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::EnergyEvseMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -16083,7 +16287,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::EnergyEvseMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -16094,7 +16298,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -16108,7 +16312,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace OnMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16127,7 +16331,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -16137,10 +16341,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EnergyEvseMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::EnergyEvseMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -16153,16 +16358,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::EnergyEvseMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::EnergyEvseMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::EnergyEvseMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -16171,7 +16377,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::EnergyEvseMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -16182,7 +16388,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -16196,7 +16402,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16212,7 +16418,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -16222,10 +16428,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EnergyEvseMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::EnergyEvseMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -16248,7 +16455,7 @@ namespace Attributes { namespace StartUpMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16267,7 +16474,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -16277,10 +16484,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WaterHeaterMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WaterHeaterMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -16293,16 +16501,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::WaterHeaterMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::WaterHeaterMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WaterHeaterMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -16311,7 +16520,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::WaterHeaterMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -16322,7 +16531,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -16336,7 +16545,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace OnMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16355,7 +16564,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -16365,10 +16574,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WaterHeaterMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WaterHeaterMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -16381,16 +16591,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::WaterHeaterMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::WaterHeaterMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WaterHeaterMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -16399,7 +16610,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::WaterHeaterMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -16410,7 +16621,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -16424,7 +16635,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16440,7 +16651,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -16450,10 +16661,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WaterHeaterMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WaterHeaterMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -16476,7 +16688,7 @@ namespace Attributes { namespace StartUpMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16495,7 +16707,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -16505,11 +16717,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -16522,17 +16734,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -16541,7 +16753,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -16552,7 +16764,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -16566,7 +16778,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace OnMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16585,7 +16797,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -16595,11 +16807,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -16612,17 +16824,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -16631,7 +16843,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -16642,7 +16854,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -16656,7 +16868,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16672,7 +16884,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -16682,11 +16894,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DeviceEnergyManagementMode::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -16709,7 +16921,7 @@ namespace Attributes { namespace LockState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; @@ -16728,7 +16940,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockState value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockState value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -16739,10 +16951,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockState value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockState value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -16755,16 +16968,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -16773,7 +16987,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { @@ -16785,7 +16999,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -16800,7 +17014,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace LockType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16815,7 +17029,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -16826,10 +17040,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -16846,7 +17061,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace ActuatorEnabled { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16861,7 +17076,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -16871,10 +17086,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -16891,7 +17107,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace DoorState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; @@ -16910,7 +17126,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DoorStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::DoorLock::DoorStateEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -16921,10 +17137,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DoorStateEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::DoorLock::DoorStateEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -16937,16 +17154,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -16955,7 +17173,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { @@ -16967,7 +17185,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -16982,7 +17200,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace DoorOpenEvents { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -16997,7 +17215,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17007,10 +17225,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17027,7 +17246,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace DoorClosedEvents { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17042,7 +17261,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17052,10 +17271,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17072,7 +17292,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace OpenPeriod { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17087,7 +17307,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17097,10 +17317,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17117,7 +17338,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace NumberOfTotalUsersSupported { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17132,7 +17353,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17142,10 +17363,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17162,7 +17384,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace NumberOfPINUsersSupported { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17177,7 +17399,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17187,10 +17409,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17207,7 +17430,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace NumberOfRFIDUsersSupported { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17222,7 +17445,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17232,10 +17455,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17252,7 +17476,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace NumberOfWeekDaySchedulesSupportedPerUser { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17267,7 +17491,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17277,10 +17501,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17297,7 +17522,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace NumberOfYearDaySchedulesSupportedPerUser { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17312,7 +17537,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17322,10 +17547,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17342,7 +17568,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace NumberOfHolidaySchedulesSupported { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17357,7 +17583,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17367,10 +17593,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17387,7 +17614,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace MaxPINCodeLength { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17402,7 +17629,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17412,10 +17639,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17432,7 +17660,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace MinPINCodeLength { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17447,7 +17675,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17457,10 +17685,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17477,7 +17706,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace MaxRFIDCodeLength { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17492,7 +17721,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17502,10 +17731,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17522,7 +17752,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace MinRFIDCodeLength { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17537,7 +17767,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17547,10 +17777,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17567,7 +17798,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace CredentialRulesSupport { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -17583,9 +17814,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, - MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17595,10 +17825,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -17616,7 +17847,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace NumberOfCredentialsSupportedPerUser { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17631,7 +17862,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17641,10 +17872,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17661,7 +17893,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace Language { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[3 + 1]; Protocols::InteractionModel::Status status = @@ -17679,7 +17911,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(3 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -17688,10 +17920,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(3 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -17707,7 +17940,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace LEDSettings { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17722,7 +17955,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17732,10 +17965,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17752,7 +17986,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace AutoRelockTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17767,7 +18001,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17777,10 +18011,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17797,7 +18032,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace SoundVolume { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17812,7 +18047,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17822,10 +18057,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17842,7 +18078,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace OperatingMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::OperatingModeEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::DoorLock::OperatingModeEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -17857,7 +18093,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::OperatingModeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::DoorLock::OperatingModeEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -17868,10 +18104,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::OperatingModeEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::DoorLock::OperatingModeEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -17888,7 +18125,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace SupportedOperatingModes { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -17904,7 +18141,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { @@ -17916,10 +18153,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -17937,7 +18175,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace DefaultConfigurationRegister { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -17953,7 +18191,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { @@ -17965,10 +18203,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -17986,7 +18225,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace EnableLocalProgramming { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -18001,7 +18240,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18011,10 +18250,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18031,7 +18271,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace EnableOneTouchLocking { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -18046,7 +18286,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18056,10 +18296,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18076,7 +18317,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace EnableInsideStatusLED { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -18091,7 +18332,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18101,10 +18342,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18121,7 +18363,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace EnablePrivacyModeButton { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -18136,7 +18378,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18146,10 +18388,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18166,7 +18409,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace LocalProgrammingFeatures { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -18182,7 +18425,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { @@ -18194,10 +18437,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -18215,7 +18459,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace WrongCodeEntryLimit { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -18230,7 +18474,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18240,10 +18484,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18260,7 +18505,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace UserCodeTemporaryDisableTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -18275,7 +18520,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18285,10 +18530,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18305,7 +18551,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace SendPINOverTheAir { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -18320,7 +18566,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18330,10 +18576,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18350,7 +18597,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace RequirePINforRemoteOperation { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -18365,7 +18612,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18375,10 +18622,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18395,7 +18643,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace ExpiringUserTimeout { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -18410,7 +18658,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18420,10 +18668,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18440,7 +18689,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -18455,7 +18704,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18465,10 +18714,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18485,7 +18735,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -18500,7 +18750,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18510,10 +18760,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::DoorLock::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::DoorLock::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18536,7 +18787,7 @@ namespace Attributes { namespace Type { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::Type * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::WindowCovering::Type * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -18552,7 +18803,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::Type value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::WindowCovering::Type value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -18563,10 +18814,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::Type value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::WindowCovering::Type value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18583,7 +18835,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace PhysicalClosedLimitLift { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -18599,7 +18851,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18609,10 +18861,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18629,7 +18882,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace PhysicalClosedLimitTilt { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -18645,7 +18898,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18655,10 +18908,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18675,7 +18929,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace CurrentPositionLift { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -18694,7 +18948,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -18704,10 +18958,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -18720,16 +18975,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -18738,7 +18994,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -18749,7 +19005,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -18763,7 +19019,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace CurrentPositionTilt { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -18782,7 +19038,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -18792,10 +19048,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -18808,16 +19065,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -18826,7 +19084,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -18837,7 +19095,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -18851,7 +19109,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NumberOfActuationsLift { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -18867,7 +19125,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18877,10 +19135,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18897,7 +19156,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace NumberOfActuationsTilt { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -18913,7 +19172,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18923,10 +19182,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18943,7 +19203,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ConfigStatus { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -18960,8 +19220,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18971,11 +19231,11 @@ Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -18992,7 +19252,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace CurrentPositionLiftPercentage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -19011,7 +19271,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -19021,10 +19281,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_PERCENT_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -19037,16 +19298,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_PERCENT_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -19055,7 +19317,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -19066,7 +19328,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -19080,7 +19342,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace CurrentPositionTiltPercentage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -19099,7 +19361,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -19109,10 +19371,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_PERCENT_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -19125,16 +19388,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_PERCENT_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -19143,7 +19407,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -19154,7 +19418,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -19168,7 +19432,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace OperationalStatus { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -19185,9 +19449,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, - MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -19197,10 +19460,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -19218,7 +19482,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace TargetPositionLiftPercent100ths { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -19237,7 +19501,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -19247,10 +19511,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent100ths value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -19263,16 +19528,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -19281,8 +19547,8 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) { if (value.IsNull()) { @@ -19292,8 +19558,7 @@ Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -19307,7 +19572,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace TargetPositionTiltPercent100ths { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -19326,7 +19591,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -19336,10 +19601,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent100ths value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -19352,16 +19618,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -19370,8 +19637,8 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) { if (value.IsNull()) { @@ -19381,8 +19648,7 @@ Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -19396,7 +19662,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace EndProductType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::EndProductType * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::WindowCovering::EndProductType * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -19412,7 +19678,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::EndProductType value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::WindowCovering::EndProductType value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -19423,10 +19689,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::EndProductType value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::WindowCovering::EndProductType value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -19443,7 +19710,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace CurrentPositionLiftPercent100ths { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -19462,7 +19729,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -19472,10 +19739,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent100ths value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -19488,16 +19756,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -19506,8 +19775,8 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) { if (value.IsNull()) { @@ -19517,8 +19786,7 @@ Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -19532,7 +19800,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace CurrentPositionTiltPercent100ths { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -19551,7 +19819,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -19561,10 +19829,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent100ths value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -19577,16 +19846,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -19595,8 +19865,8 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_PERCENT100THS_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty) { if (value.IsNull()) { @@ -19606,8 +19876,7 @@ Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -19621,7 +19890,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace InstalledOpenLimitLift { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -19637,7 +19906,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -19647,10 +19916,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -19667,7 +19937,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace InstalledClosedLimitLift { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -19683,7 +19953,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -19693,10 +19963,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -19713,7 +19984,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace InstalledOpenLimitTilt { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -19729,7 +20000,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -19739,10 +20010,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -19759,7 +20031,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace InstalledClosedLimitTilt { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -19775,7 +20047,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -19785,10 +20057,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -19805,7 +20078,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace Mode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -19821,7 +20094,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::BitMask return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; @@ -19832,10 +20105,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -19852,7 +20126,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask namespace SafetyStatus { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -19869,8 +20143,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -19880,11 +20154,11 @@ Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -19901,7 +20175,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -19917,7 +20191,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -19927,10 +20201,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -19947,7 +20222,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -19963,7 +20238,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -19973,10 +20248,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WindowCovering::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WindowCovering::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -19999,7 +20275,7 @@ namespace Attributes { namespace BarrierMovingState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -20015,7 +20291,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20025,10 +20301,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BarrierControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20045,7 +20322,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace BarrierSafetyStatus { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -20061,7 +20338,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20071,10 +20348,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BarrierControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20091,7 +20369,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace BarrierCapabilities { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -20107,7 +20385,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20117,10 +20395,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BarrierControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20137,7 +20416,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace BarrierOpenEvents { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -20153,7 +20432,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20163,10 +20442,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BarrierControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20183,7 +20463,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace BarrierCloseEvents { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -20199,7 +20479,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20209,10 +20489,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BarrierControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20229,7 +20510,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace BarrierCommandOpenEvents { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -20245,7 +20526,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20255,10 +20536,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BarrierControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20275,7 +20557,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace BarrierCommandCloseEvents { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -20291,7 +20573,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20301,10 +20583,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BarrierControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20321,7 +20604,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace BarrierOpenPeriod { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -20337,7 +20620,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20347,10 +20630,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BarrierControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20367,7 +20651,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace BarrierClosePeriod { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -20383,7 +20667,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20393,10 +20677,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BarrierControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20413,7 +20698,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace BarrierPosition { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -20429,7 +20714,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20439,10 +20724,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BarrierControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20459,7 +20745,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -20475,7 +20761,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20485,10 +20771,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BarrierControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20505,7 +20792,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -20521,7 +20808,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20531,10 +20818,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BarrierControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BarrierControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20557,7 +20845,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -20573,7 +20861,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20583,10 +20871,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ServiceArea::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ServiceArea::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -20609,7 +20898,7 @@ namespace Attributes { namespace MaxPressure { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -20628,7 +20917,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -20638,11 +20927,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -20655,17 +20944,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -20674,7 +20963,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -20685,7 +20974,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -20699,7 +20988,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MaxSpeed { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -20718,7 +21007,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -20728,11 +21017,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -20745,17 +21034,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -20764,7 +21053,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -20775,7 +21064,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -20789,7 +21078,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MaxFlow { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -20808,7 +21097,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -20818,11 +21107,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -20835,17 +21124,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -20854,7 +21143,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -20865,7 +21154,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -20879,7 +21168,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MinConstPressure { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -20898,7 +21187,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -20908,11 +21197,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -20925,17 +21214,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -20944,7 +21233,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -20955,7 +21244,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -20969,7 +21258,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MaxConstPressure { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -20988,7 +21277,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -20998,11 +21287,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -21015,17 +21304,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -21034,7 +21323,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -21045,7 +21334,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -21059,7 +21348,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MinCompPressure { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -21078,7 +21367,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -21088,11 +21377,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -21105,17 +21394,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -21124,7 +21413,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -21135,7 +21424,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -21149,7 +21438,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MaxCompPressure { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -21168,7 +21457,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -21178,11 +21467,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -21195,17 +21484,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -21214,7 +21503,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -21225,7 +21514,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -21239,7 +21528,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MinConstSpeed { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -21258,7 +21547,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -21268,11 +21557,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -21285,17 +21574,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -21304,7 +21593,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -21315,7 +21604,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -21329,7 +21618,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MaxConstSpeed { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -21348,7 +21637,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -21358,11 +21647,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -21375,17 +21664,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -21394,7 +21683,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -21405,7 +21694,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -21419,7 +21708,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MinConstFlow { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -21438,7 +21727,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -21448,11 +21737,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -21465,17 +21754,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -21484,7 +21773,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -21495,7 +21784,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -21509,7 +21798,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MaxConstFlow { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -21528,7 +21817,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -21538,11 +21827,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -21555,17 +21844,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -21574,7 +21863,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -21585,7 +21874,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -21599,7 +21888,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MinConstTemp { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -21618,7 +21907,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -21628,11 +21917,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -21645,17 +21934,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -21664,7 +21953,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -21675,7 +21964,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -21689,7 +21978,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MaxConstTemp { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -21708,7 +21997,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -21718,11 +22007,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -21735,17 +22024,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -21754,7 +22043,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -21765,7 +22054,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -21779,7 +22068,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace PumpStatus { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -21796,7 +22085,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { @@ -21808,11 +22097,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -21830,7 +22119,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace EffectiveOperationMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum * value) { using Traits = NumericAttributeTraits; @@ -21847,9 +22136,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value, - MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -21859,11 +22147,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value) { using Traits = NumericAttributeTraits; @@ -21881,7 +22169,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace EffectiveControlMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum * value) { using Traits = NumericAttributeTraits; @@ -21898,9 +22186,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value, - MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -21910,11 +22197,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value) { using Traits = NumericAttributeTraits; @@ -21932,7 +22219,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace Capacity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -21951,7 +22238,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -21961,11 +22248,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -21978,17 +22265,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -21997,7 +22284,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -22008,7 +22295,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -22022,7 +22309,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace Speed { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -22041,7 +22328,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -22051,11 +22338,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -22068,17 +22355,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -22087,7 +22374,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -22098,7 +22385,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -22112,7 +22399,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace LifetimeRunningHours { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -22131,7 +22418,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -22141,11 +22428,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT24U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -22158,17 +22445,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT24U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits>; Traits::StorageType value; @@ -22177,7 +22464,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -22188,7 +22475,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -22202,7 +22489,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace Power { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -22221,7 +22508,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -22231,11 +22518,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT24U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -22248,17 +22535,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT24U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits>; Traits::StorageType value; @@ -22267,7 +22554,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -22278,7 +22565,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -22292,7 +22579,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace LifetimeEnergyConsumed { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -22311,7 +22598,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -22321,11 +22608,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -22338,17 +22625,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -22357,7 +22644,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -22368,7 +22655,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -22382,7 +22669,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace OperationMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum * value) { using Traits = NumericAttributeTraits; @@ -22399,9 +22686,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value, - MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -22411,11 +22697,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value) { using Traits = NumericAttributeTraits; @@ -22433,7 +22719,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace ControlMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum * value) { using Traits = NumericAttributeTraits; @@ -22450,9 +22736,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value, - MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -22462,11 +22747,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value) { using Traits = NumericAttributeTraits; @@ -22484,7 +22769,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -22500,7 +22785,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -22510,11 +22795,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -22531,7 +22816,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -22547,7 +22832,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -22557,11 +22842,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PumpConfigurationAndControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PumpConfigurationAndControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -22584,7 +22869,7 @@ namespace Attributes { namespace LocalTemperature { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -22603,7 +22888,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -22613,10 +22898,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -22629,16 +22915,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -22647,7 +22934,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -22658,7 +22945,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -22672,7 +22959,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace OutdoorTemperature { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -22691,7 +22978,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -22701,10 +22988,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -22717,16 +23005,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -22735,7 +23024,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -22746,7 +23035,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -22760,7 +23049,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace Occupancy { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -22777,8 +23066,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -22788,11 +23077,11 @@ Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -22809,7 +23098,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace AbsMinHeatSetpointLimit { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -22825,7 +23114,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -22835,10 +23124,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -22855,7 +23145,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace AbsMaxHeatSetpointLimit { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -22871,7 +23161,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -22881,10 +23171,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -22901,7 +23192,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace AbsMinCoolSetpointLimit { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -22917,7 +23208,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -22927,10 +23218,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -22947,7 +23239,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace AbsMaxCoolSetpointLimit { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -22963,7 +23255,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -22973,10 +23265,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -22993,7 +23286,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace PICoolingDemand { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -23009,7 +23302,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23019,10 +23312,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23039,7 +23333,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace PIHeatingDemand { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -23055,7 +23349,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23065,10 +23359,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23085,7 +23380,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace HVACSystemTypeConfiguration { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -23102,9 +23397,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, - MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23114,10 +23408,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -23135,7 +23430,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace LocalTemperatureCalibration { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -23151,7 +23446,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * valu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23161,10 +23456,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23181,7 +23477,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) namespace OccupiedCoolingSetpoint { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -23197,7 +23493,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23207,10 +23503,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23227,7 +23524,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace OccupiedHeatingSetpoint { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -23243,7 +23540,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23253,10 +23550,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23273,7 +23571,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace UnoccupiedCoolingSetpoint { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -23289,7 +23587,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23299,10 +23597,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23319,7 +23618,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace UnoccupiedHeatingSetpoint { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -23335,7 +23634,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23345,10 +23644,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23365,7 +23665,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace MinHeatSetpointLimit { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -23381,7 +23681,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23391,10 +23691,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23411,7 +23712,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace MaxHeatSetpointLimit { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -23427,7 +23728,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23437,10 +23738,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23457,7 +23759,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace MinCoolSetpointLimit { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -23473,7 +23775,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23483,10 +23785,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23503,7 +23806,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace MaxCoolSetpointLimit { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -23519,7 +23822,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23529,10 +23832,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23549,7 +23853,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace MinSetpointDeadBand { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -23565,7 +23869,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * valu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23575,10 +23879,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23595,7 +23900,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) namespace RemoteSensing { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -23612,9 +23917,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, - MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23624,10 +23928,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -23645,7 +23950,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace ControlSequenceOfOperation { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum * value) { using Traits = NumericAttributeTraits; @@ -23662,8 +23967,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23673,11 +23978,11 @@ Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceO Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23694,7 +23999,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace SystemMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -23710,7 +24015,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -23721,10 +24026,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23741,8 +24047,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace ThermostatRunningMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - chip::app::Clusters::Thermostat::ThermostatRunningModeEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -23758,7 +24063,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -23769,10 +24074,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23789,7 +24095,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace StartOfWeek { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -23805,7 +24111,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -23816,10 +24122,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23836,7 +24143,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace NumberOfWeeklyTransitions { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -23852,7 +24159,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23862,10 +24169,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23882,7 +24190,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace NumberOfDailyTransitions { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -23898,7 +24206,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23908,10 +24216,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23928,8 +24237,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace TemperatureSetpointHold { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -23945,8 +24253,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23956,11 +24264,11 @@ Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpo Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -23977,7 +24285,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace TemperatureSetpointHoldDuration { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -23996,7 +24304,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -24006,10 +24314,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -24022,16 +24331,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -24040,7 +24350,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -24051,7 +24361,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -24065,7 +24375,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace ThermostatProgrammingOperationMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -24082,7 +24392,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { @@ -24094,10 +24404,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -24115,7 +24426,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace ThermostatRunningState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -24132,8 +24443,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -24143,11 +24454,11 @@ Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -24164,8 +24475,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace SetpointChangeSource { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - chip::app::Clusters::Thermostat::SetpointChangeSourceEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -24181,7 +24491,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -24192,10 +24502,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -24212,7 +24523,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace SetpointChangeAmount { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -24231,7 +24542,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -24241,10 +24552,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -24257,16 +24569,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -24275,7 +24588,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -24286,7 +24599,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -24300,7 +24613,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace SetpointChangeSourceTimestamp { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -24316,7 +24629,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -24326,10 +24639,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -24346,7 +24660,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace OccupiedSetback { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -24365,7 +24679,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -24375,10 +24689,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -24391,16 +24706,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -24409,7 +24725,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -24420,7 +24736,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -24434,7 +24750,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace OccupiedSetbackMin { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -24453,7 +24769,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -24463,10 +24779,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -24479,16 +24796,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -24497,7 +24815,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -24508,7 +24826,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -24522,7 +24840,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace OccupiedSetbackMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -24541,7 +24859,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -24551,10 +24869,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -24567,16 +24886,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -24585,7 +24905,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -24596,7 +24916,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -24610,7 +24930,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace UnoccupiedSetback { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -24629,7 +24949,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -24639,10 +24959,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -24655,16 +24976,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -24673,7 +24995,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -24684,7 +25006,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -24698,7 +25020,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace UnoccupiedSetbackMin { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -24717,7 +25039,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -24727,10 +25049,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -24743,16 +25066,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -24761,7 +25085,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -24772,7 +25096,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -24786,7 +25110,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace UnoccupiedSetbackMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -24805,7 +25129,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -24815,10 +25139,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -24831,16 +25156,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -24849,7 +25175,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -24860,7 +25186,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -24874,7 +25200,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace EmergencyHeatDelta { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -24890,7 +25216,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -24900,10 +25226,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -24920,7 +25247,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace ACType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -24936,7 +25263,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -24947,10 +25274,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -24967,7 +25295,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace ACCapacity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -24983,7 +25311,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -24993,10 +25321,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -25013,7 +25342,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ACRefrigerantType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -25029,7 +25358,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -25040,10 +25369,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -25060,7 +25390,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace ACCompressorType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -25076,7 +25406,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -25087,10 +25417,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -25107,7 +25438,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace ACErrorCode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -25124,9 +25455,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, - MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -25136,10 +25466,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -25157,7 +25488,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace ACLouverPosition { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -25173,7 +25504,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -25184,10 +25515,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -25204,7 +25536,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace ACCoilTemperature { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -25223,7 +25555,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -25233,10 +25565,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -25249,16 +25582,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -25267,7 +25601,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -25278,7 +25612,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -25292,7 +25626,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace ACCapacityformat { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -25308,7 +25642,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -25319,10 +25653,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -25339,7 +25674,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace NumberOfPresets { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -25355,7 +25690,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -25365,10 +25700,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -25385,7 +25721,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace NumberOfSchedules { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -25401,7 +25737,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -25411,10 +25747,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -25431,7 +25768,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace NumberOfScheduleTransitions { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -25447,7 +25784,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -25457,10 +25794,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -25477,7 +25815,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace NumberOfScheduleTransitionPerDay { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -25496,7 +25834,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -25506,10 +25844,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -25522,16 +25861,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -25540,7 +25880,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -25551,7 +25891,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -25565,7 +25905,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace ActivePresetHandle { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { if (value.IsNull()) { @@ -25591,7 +25931,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) { static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -25600,10 +25940,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value) { static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -25615,19 +25956,20 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { uint8_t zclString[1] = { 0xFF }; - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { uint8_t zclString[1] = { 0xFF }; return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -25638,7 +25980,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -25652,7 +25994,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace ActiveScheduleHandle { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { if (value.IsNull()) { @@ -25678,7 +26020,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) { static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -25687,10 +26029,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value) { static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -25702,19 +26045,20 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { uint8_t zclString[1] = { 0xFF }; - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { uint8_t zclString[1] = { 0xFF }; return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -25725,7 +26069,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -25739,7 +26083,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace SetpointHoldExpiryTimestamp { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -25758,7 +26102,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -25768,10 +26112,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -25784,16 +26129,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -25802,7 +26148,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -25813,7 +26159,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -25827,7 +26173,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -25843,7 +26189,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -25853,10 +26199,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -25873,7 +26220,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -25889,7 +26236,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -25899,10 +26246,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Thermostat::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Thermostat::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -25925,7 +26273,7 @@ namespace Attributes { namespace FanMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::FanControl::FanModeEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -25941,7 +26289,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::FanControl::FanModeEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -25952,10 +26300,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FanControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::FanControl::FanModeEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -25972,7 +26321,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace FanModeSequence { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -25988,7 +26337,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -25999,10 +26348,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FanControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26019,7 +26369,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace PercentSetting { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -26038,7 +26388,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -26048,10 +26398,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FanControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_PERCENT_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -26064,16 +26415,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FanControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_PERCENT_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -26082,7 +26434,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -26093,7 +26445,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -26107,7 +26459,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace PercentCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Percent * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::Percent * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -26123,7 +26475,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Percent return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26133,10 +26485,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_PERCENT_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FanControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_PERCENT_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26153,7 +26506,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent namespace SpeedMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -26169,7 +26522,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26179,10 +26532,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FanControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26199,7 +26553,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace SpeedSetting { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -26218,7 +26572,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -26228,10 +26582,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FanControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -26244,16 +26599,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FanControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -26262,7 +26618,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -26273,7 +26629,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -26287,7 +26643,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace SpeedCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -26303,7 +26659,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26313,10 +26669,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FanControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26333,8 +26690,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace RockSupport { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - chip::BitMask * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -26350,7 +26706,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; @@ -26361,10 +26717,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FanControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26381,8 +26738,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask namespace RockSetting { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - chip::BitMask * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -26398,7 +26754,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; @@ -26409,10 +26765,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FanControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26429,8 +26786,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask namespace WindSupport { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - chip::BitMask * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -26446,7 +26802,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; @@ -26457,10 +26813,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FanControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26477,8 +26834,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask namespace WindSetting { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - chip::BitMask * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -26494,7 +26850,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; @@ -26505,10 +26861,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FanControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26525,7 +26882,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask namespace AirflowDirection { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::FanControl::AirflowDirectionEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::FanControl::AirflowDirectionEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -26541,7 +26898,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::AirflowDirectionEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::FanControl::AirflowDirectionEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -26552,10 +26909,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FanControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::AirflowDirectionEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::FanControl::AirflowDirectionEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26572,7 +26930,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -26588,7 +26946,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26598,10 +26956,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FanControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26618,7 +26977,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -26634,7 +26993,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26644,10 +27003,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FanControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FanControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26671,7 +27031,7 @@ namespace Attributes { namespace TemperatureDisplayMode { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum * value) +Get(EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -26687,7 +27047,7 @@ Get(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfi return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum value, MarkAttributeDirty markDirty) { @@ -26699,11 +27059,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum value) { using Traits = NumericAttributeTraits; @@ -26722,7 +27082,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace KeypadLockout { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::KeypadLockoutEnum * value) { using Traits = NumericAttributeTraits; @@ -26739,7 +27099,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::KeypadLockoutEnum value, MarkAttributeDirty markDirty) { @@ -26751,11 +27111,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::KeypadLockoutEnum value) { using Traits = NumericAttributeTraits; @@ -26775,7 +27135,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace ScheduleProgrammingVisibility { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum * value) +Get(EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum * value) { using Traits = NumericAttributeTraits; @@ -26793,7 +27153,7 @@ Get(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfi } Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum value, +Set(EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum value, MarkAttributeDirty markDirty) { using Traits = @@ -26805,12 +27165,12 @@ Set(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfi Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, - ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum value) +Set(EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum value) { using Traits = NumericAttributeTraits; @@ -26829,7 +27189,7 @@ Set(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfi namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -26845,7 +27205,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26855,11 +27215,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, - ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26877,7 +27237,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -26893,7 +27253,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26903,11 +27263,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ThermostatUserInterfaceConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26931,7 +27291,7 @@ namespace Attributes { namespace CurrentHue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -26947,7 +27307,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26957,10 +27317,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -26977,7 +27338,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace CurrentSaturation { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -26993,7 +27354,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27003,10 +27364,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27023,7 +27385,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace RemainingTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -27039,7 +27401,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27049,10 +27411,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27069,7 +27432,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace CurrentX { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -27085,7 +27448,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27095,10 +27458,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27115,7 +27479,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace CurrentY { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -27131,7 +27495,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27141,10 +27505,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27161,7 +27526,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace DriftCompensation { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::DriftCompensationEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::ColorControl::DriftCompensationEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -27177,7 +27542,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::DriftCompensationEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ColorControl::DriftCompensationEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -27188,10 +27553,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::DriftCompensationEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ColorControl::DriftCompensationEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27208,7 +27574,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace CompensationText { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[254 + 1]; Protocols::InteractionModel::Status status = @@ -27226,7 +27592,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(254 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -27235,10 +27601,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(254 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -27254,7 +27621,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace ColorTemperatureMireds { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -27270,7 +27637,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27280,10 +27647,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27300,7 +27668,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ColorMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::ColorModeEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::ColorControl::ColorModeEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -27316,7 +27684,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::ColorModeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ColorControl::ColorModeEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -27327,10 +27695,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::ColorModeEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ColorControl::ColorModeEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27347,7 +27716,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace Options { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -27364,8 +27733,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27375,11 +27744,11 @@ Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27396,7 +27765,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace NumberOfPrimaries { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -27415,7 +27784,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -27425,10 +27794,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -27441,16 +27811,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -27459,7 +27830,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -27470,7 +27841,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -27484,7 +27855,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace Primary1X { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -27500,7 +27871,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27510,10 +27881,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27530,7 +27902,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace Primary1Y { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -27546,7 +27918,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27556,10 +27928,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27576,7 +27949,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace Primary1Intensity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -27595,7 +27968,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -27605,10 +27978,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -27621,16 +27995,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -27639,7 +28014,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -27650,7 +28025,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -27664,7 +28039,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace Primary2X { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -27680,7 +28055,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27690,10 +28065,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27710,7 +28086,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace Primary2Y { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -27726,7 +28102,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27736,10 +28112,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27756,7 +28133,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace Primary2Intensity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -27775,7 +28152,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -27785,10 +28162,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -27801,16 +28179,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -27819,7 +28198,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -27830,7 +28209,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -27844,7 +28223,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace Primary3X { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -27860,7 +28239,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27870,10 +28249,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27890,7 +28270,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace Primary3Y { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -27906,7 +28286,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27916,10 +28296,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -27936,7 +28317,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace Primary3Intensity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -27955,7 +28336,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -27965,10 +28346,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -27981,16 +28363,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -27999,7 +28382,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -28010,7 +28393,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -28024,7 +28407,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace Primary4X { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -28040,7 +28423,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28050,10 +28433,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28070,7 +28454,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace Primary4Y { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -28086,7 +28470,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28096,10 +28480,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28116,7 +28501,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace Primary4Intensity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -28135,7 +28520,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -28145,10 +28530,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -28161,16 +28547,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -28179,7 +28566,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -28190,7 +28577,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -28204,7 +28591,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace Primary5X { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -28220,7 +28607,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28230,10 +28617,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28250,7 +28638,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace Primary5Y { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -28266,7 +28654,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28276,10 +28664,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28296,7 +28685,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace Primary5Intensity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -28315,7 +28704,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -28325,10 +28714,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -28341,16 +28731,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -28359,7 +28750,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -28370,7 +28761,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -28384,7 +28775,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace Primary6X { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -28400,7 +28791,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28410,10 +28801,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28430,7 +28822,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace Primary6Y { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -28446,7 +28838,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28456,10 +28848,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28476,7 +28869,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace Primary6Intensity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -28495,7 +28888,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -28505,10 +28898,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -28521,16 +28915,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -28539,7 +28934,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -28550,7 +28945,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -28564,7 +28959,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace WhitePointX { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -28580,7 +28975,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28590,10 +28985,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28610,7 +29006,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace WhitePointY { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -28626,7 +29022,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28636,10 +29032,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28656,7 +29053,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ColorPointRX { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -28672,7 +29069,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28682,10 +29079,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28702,7 +29100,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ColorPointRY { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -28718,7 +29116,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28728,10 +29126,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28748,7 +29147,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ColorPointRIntensity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -28767,7 +29166,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -28777,10 +29176,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -28793,16 +29193,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -28811,7 +29212,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -28822,7 +29223,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -28836,7 +29237,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace ColorPointGX { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -28852,7 +29253,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28862,10 +29263,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28882,7 +29284,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ColorPointGY { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -28898,7 +29300,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28908,10 +29310,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -28928,7 +29331,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ColorPointGIntensity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -28947,7 +29350,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -28957,10 +29360,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -28973,16 +29377,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -28991,7 +29396,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -29002,7 +29407,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -29016,7 +29421,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace ColorPointBX { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -29032,7 +29437,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29042,10 +29447,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29062,7 +29468,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ColorPointBY { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -29078,7 +29484,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29088,10 +29494,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29108,7 +29515,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ColorPointBIntensity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -29127,7 +29534,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -29137,10 +29544,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -29153,16 +29561,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -29171,7 +29580,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -29182,7 +29591,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -29196,7 +29605,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace EnhancedCurrentHue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -29212,7 +29621,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29222,10 +29631,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29242,7 +29652,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace EnhancedColorMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::EnhancedColorModeEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::ColorControl::EnhancedColorModeEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -29258,7 +29668,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::EnhancedColorModeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ColorControl::EnhancedColorModeEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -29269,10 +29679,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::EnhancedColorModeEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ColorControl::EnhancedColorModeEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29289,7 +29700,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace ColorLoopActive { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -29305,7 +29716,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29315,10 +29726,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29335,7 +29747,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace ColorLoopDirection { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -29351,7 +29763,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29361,10 +29773,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29381,7 +29794,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace ColorLoopTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -29397,7 +29810,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29407,10 +29820,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29427,7 +29841,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ColorLoopStartEnhancedHue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -29443,7 +29857,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29453,10 +29867,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29473,7 +29888,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ColorLoopStoredEnhancedHue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -29489,7 +29904,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29499,10 +29914,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29519,7 +29935,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ColorCapabilities { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -29536,7 +29952,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { @@ -29548,10 +29964,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -29569,7 +29986,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace ColorTempPhysicalMinMireds { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -29585,7 +30002,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29595,10 +30012,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29615,7 +30033,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ColorTempPhysicalMaxMireds { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -29631,7 +30049,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29641,10 +30059,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29661,7 +30080,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace CoupleColorTempToLevelMinMireds { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -29677,7 +30096,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29687,10 +30106,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29707,7 +30127,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace StartUpColorTemperatureMireds { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -29726,7 +30146,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -29736,10 +30156,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -29752,16 +30173,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -29770,7 +30192,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -29781,7 +30203,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -29795,7 +30217,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -29811,7 +30233,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29821,10 +30243,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29841,7 +30264,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -29857,7 +30280,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29867,10 +30290,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ColorControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ColorControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29893,7 +30317,7 @@ namespace Attributes { namespace PhysicalMinLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -29909,7 +30333,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29919,10 +30343,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29939,7 +30364,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace PhysicalMaxLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -29955,7 +30380,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29965,10 +30390,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -29985,7 +30411,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace BallastStatus { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -30002,7 +30428,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { @@ -30014,10 +30440,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -30035,7 +30462,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace MinLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -30051,7 +30478,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -30061,10 +30488,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -30081,7 +30509,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace MaxLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -30097,7 +30525,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -30107,10 +30535,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -30127,7 +30556,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace IntrinsicBallastFactor { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -30146,7 +30575,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -30156,10 +30585,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -30172,16 +30602,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -30190,7 +30621,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -30201,7 +30632,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30215,7 +30646,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace BallastFactorAdjustment { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -30234,7 +30665,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -30244,10 +30675,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -30260,16 +30692,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -30278,7 +30711,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -30289,7 +30722,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30303,7 +30736,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace LampQuantity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -30319,7 +30752,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -30329,10 +30762,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -30349,7 +30783,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace LampType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; Protocols::InteractionModel::Status status = @@ -30367,7 +30801,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -30376,11 +30810,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -30396,7 +30830,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace LampManufacturer { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[16 + 1]; Protocols::InteractionModel::Status status = @@ -30414,7 +30848,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -30423,11 +30857,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -30443,7 +30877,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace LampRatedHours { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -30462,7 +30896,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -30472,10 +30906,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT24U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -30488,16 +30923,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT24U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits>; Traits::StorageType value; @@ -30506,7 +30942,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -30517,7 +30953,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30531,7 +30967,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace LampBurnHours { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -30550,7 +30986,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -30560,10 +30996,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT24U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -30576,16 +31013,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT24U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits>; Traits::StorageType value; @@ -30594,7 +31032,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -30605,7 +31043,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30619,7 +31057,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace LampAlarmMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -30636,7 +31074,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { @@ -30648,10 +31086,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -30669,7 +31108,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace LampBurnHoursTripPoint { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -30688,7 +31127,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -30698,10 +31137,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT24U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -30714,16 +31154,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT24U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits>; Traits::StorageType value; @@ -30732,7 +31173,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -30743,7 +31184,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30757,7 +31198,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -30773,7 +31214,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -30783,11 +31224,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -30804,7 +31245,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -30820,7 +31261,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -30830,10 +31271,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::BallastConfiguration::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::BallastConfiguration::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -30856,7 +31298,7 @@ namespace Attributes { namespace MeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -30875,7 +31317,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -30885,11 +31327,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::IlluminanceMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -30902,17 +31344,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::IlluminanceMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -30921,7 +31363,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -30932,7 +31374,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -30946,7 +31388,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MinMeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -30965,7 +31407,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -30975,11 +31417,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::IlluminanceMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -30992,17 +31434,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::IlluminanceMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -31011,7 +31453,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -31022,7 +31464,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31036,7 +31478,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MaxMeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -31055,7 +31497,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -31065,11 +31507,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::IlluminanceMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -31082,17 +31524,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::IlluminanceMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -31101,7 +31543,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -31112,7 +31554,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31126,7 +31568,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace Tolerance { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -31142,7 +31584,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -31152,11 +31594,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::IlluminanceMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -31174,7 +31616,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace LightSensorType { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -31193,8 +31635,8 @@ Get(chip::EndpointId endpoint, DataModel::Nullable; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -31204,11 +31646,11 @@ Set(chip::EndpointId endpoint, chip::app::Clusters::IlluminanceMeasurement::Ligh Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::IlluminanceMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::IlluminanceMeasurement::LightSensorTypeEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::IlluminanceMeasurement::LightSensorTypeEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -31221,16 +31663,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::IlluminanceMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -31240,7 +31683,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) } Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { @@ -31253,7 +31696,7 @@ Set(chip::EndpointId endpoint, } Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -31268,7 +31711,7 @@ Set(chip::EndpointId endpoint, namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -31284,7 +31727,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -31294,11 +31737,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::IlluminanceMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -31315,7 +31758,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -31331,7 +31774,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -31341,11 +31784,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::IlluminanceMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::IlluminanceMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -31368,7 +31811,7 @@ namespace Attributes { namespace MeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -31387,7 +31830,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -31397,11 +31840,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TemperatureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -31414,17 +31857,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TemperatureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -31433,7 +31876,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -31444,7 +31887,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31458,7 +31901,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MinMeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -31477,7 +31920,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -31487,11 +31930,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TemperatureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -31504,17 +31947,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TemperatureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -31523,7 +31966,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -31534,7 +31977,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31548,7 +31991,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MaxMeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -31567,7 +32010,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -31577,11 +32020,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TemperatureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -31594,17 +32037,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TemperatureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -31613,7 +32056,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_TEMPERATURE_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -31624,7 +32067,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31638,7 +32081,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace Tolerance { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -31654,7 +32097,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -31664,11 +32107,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TemperatureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -31685,7 +32128,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -31701,7 +32144,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -31711,11 +32154,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TemperatureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -31732,7 +32175,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -31748,7 +32191,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -31758,11 +32201,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TemperatureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TemperatureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -31785,7 +32228,7 @@ namespace Attributes { namespace MeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -31804,7 +32247,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -31814,10 +32257,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PressureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -31830,16 +32274,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PressureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -31848,7 +32293,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -31859,7 +32304,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31873,7 +32318,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MinMeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -31892,7 +32337,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -31902,10 +32347,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PressureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -31918,16 +32364,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PressureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -31936,7 +32383,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -31947,7 +32394,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -31961,7 +32408,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MaxMeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -31980,7 +32427,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -31990,10 +32437,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PressureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -32006,16 +32454,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PressureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -32024,7 +32473,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -32035,7 +32484,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -32049,7 +32498,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace Tolerance { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -32065,7 +32514,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -32075,10 +32524,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PressureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -32095,7 +32545,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ScaledValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -32114,7 +32564,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -32124,10 +32574,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PressureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -32140,16 +32591,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PressureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -32158,7 +32610,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -32169,7 +32621,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -32183,7 +32635,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MinScaledValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -32202,7 +32654,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -32212,10 +32664,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PressureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -32228,16 +32681,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PressureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -32246,7 +32700,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -32257,7 +32711,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -32271,7 +32725,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MaxScaledValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -32290,7 +32744,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -32300,10 +32754,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PressureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -32316,16 +32771,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PressureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -32334,7 +32790,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -32345,7 +32801,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -32359,7 +32815,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace ScaledTolerance { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -32375,7 +32831,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -32385,10 +32841,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PressureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -32405,7 +32862,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace Scale { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -32421,7 +32878,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * valu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -32431,10 +32888,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PressureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -32451,7 +32909,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -32467,7 +32925,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -32477,10 +32935,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PressureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -32497,7 +32956,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -32513,7 +32972,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -32523,10 +32982,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::PressureMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::PressureMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -32549,7 +33009,7 @@ namespace Attributes { namespace MeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -32568,7 +33028,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -32578,10 +33038,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FlowMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -32594,16 +33055,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FlowMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -32612,7 +33074,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -32623,7 +33085,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -32637,7 +33099,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MinMeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -32656,7 +33118,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -32666,10 +33128,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FlowMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -32682,16 +33145,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FlowMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -32700,7 +33164,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -32711,7 +33175,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -32725,7 +33189,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MaxMeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -32744,7 +33208,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -32754,10 +33218,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FlowMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -32770,16 +33235,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FlowMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -32788,7 +33254,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -32799,7 +33265,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -32813,7 +33279,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace Tolerance { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -32829,7 +33295,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -32839,10 +33305,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FlowMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -32859,7 +33326,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -32875,7 +33342,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -32885,10 +33352,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FlowMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -32905,7 +33373,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -32921,7 +33389,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -32931,10 +33399,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FlowMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FlowMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -32957,7 +33426,7 @@ namespace Attributes { namespace MeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -32976,7 +33445,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -32986,11 +33455,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -33003,17 +33472,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -33022,7 +33491,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -33033,7 +33502,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -33047,7 +33516,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MinMeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -33066,7 +33535,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -33076,11 +33545,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -33093,17 +33562,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -33112,7 +33581,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -33123,7 +33592,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -33137,7 +33606,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace MaxMeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -33156,7 +33625,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -33166,11 +33635,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -33183,17 +33652,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -33202,7 +33671,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -33213,7 +33682,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -33227,7 +33696,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace Tolerance { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -33243,7 +33712,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33253,11 +33722,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33274,7 +33743,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -33290,7 +33759,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33300,11 +33769,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33321,7 +33790,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -33337,7 +33806,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33347,11 +33816,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::RelativeHumidityMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33374,7 +33843,7 @@ namespace Attributes { namespace Occupancy { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -33391,9 +33860,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, - MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33403,10 +33871,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OccupancySensing::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -33424,8 +33893,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace OccupancySensorType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -33441,8 +33909,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33452,11 +33920,11 @@ Set(chip::EndpointId endpoint, chip::app::Clusters::OccupancySensing::OccupancyS Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OccupancySensing::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33473,7 +33941,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace OccupancySensorTypeBitmap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -33490,7 +33958,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { @@ -33502,10 +33970,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OccupancySensing::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -33523,7 +33992,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace PIROccupiedToUnoccupiedDelay { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -33539,7 +34008,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33549,10 +34018,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OccupancySensing::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33569,7 +34039,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace PIRUnoccupiedToOccupiedDelay { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -33585,7 +34055,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33595,10 +34065,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OccupancySensing::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33615,7 +34086,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace PIRUnoccupiedToOccupiedThreshold { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -33631,7 +34102,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33641,10 +34112,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OccupancySensing::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33661,7 +34133,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace UltrasonicOccupiedToUnoccupiedDelay { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -33677,7 +34149,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33687,10 +34159,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OccupancySensing::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33707,7 +34180,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace UltrasonicUnoccupiedToOccupiedDelay { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -33723,7 +34196,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33733,10 +34206,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OccupancySensing::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33753,7 +34227,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace UltrasonicUnoccupiedToOccupiedThreshold { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -33769,7 +34243,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33779,10 +34253,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OccupancySensing::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33799,7 +34274,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace PhysicalContactOccupiedToUnoccupiedDelay { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -33815,7 +34290,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33825,10 +34300,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OccupancySensing::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33845,7 +34321,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace PhysicalContactUnoccupiedToOccupiedDelay { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -33861,7 +34337,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33871,10 +34347,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OccupancySensing::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33891,7 +34368,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace PhysicalContactUnoccupiedToOccupiedThreshold { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -33907,7 +34384,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33917,10 +34394,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OccupancySensing::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33937,7 +34415,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -33953,7 +34431,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33963,10 +34441,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OccupancySensing::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OccupancySensing::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -33989,7 +34468,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -34005,7 +34484,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34015,11 +34494,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CarbonMonoxideConcentrationMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34043,7 +34522,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -34059,7 +34538,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34069,11 +34548,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CarbonDioxideConcentrationMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34097,7 +34576,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -34113,7 +34592,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34123,11 +34602,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::NitrogenDioxideConcentrationMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34151,7 +34630,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -34167,7 +34646,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34177,11 +34656,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::OzoneConcentrationMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34204,7 +34683,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -34220,7 +34699,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34230,11 +34709,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Pm25ConcentrationMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34257,7 +34736,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -34273,7 +34752,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34283,11 +34762,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FormaldehydeConcentrationMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34311,7 +34790,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -34327,7 +34806,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34337,11 +34816,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Pm1ConcentrationMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34364,7 +34843,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -34380,7 +34859,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34390,11 +34869,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Pm10ConcentrationMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34417,7 +34896,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -34433,7 +34912,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34443,11 +34922,12 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id, writable, - ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute( + ConcreteAttributePath(endpoint, Clusters::TotalVolatileOrganicCompoundsConcentrationMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34471,7 +34951,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -34487,7 +34967,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34497,11 +34977,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::RadonConcentrationMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34524,7 +35004,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -34540,7 +35020,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34550,11 +35030,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WiFiNetworkManagement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WiFiNetworkManagement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34571,7 +35051,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -34587,7 +35067,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34597,10 +35077,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WiFiNetworkManagement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WiFiNetworkManagement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34623,7 +35104,7 @@ namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -34639,7 +35120,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34649,11 +35130,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ThreadBorderRouterManagement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34676,7 +35157,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -34692,7 +35173,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34702,11 +35183,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ThreadNetworkDirectory::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ThreadNetworkDirectory::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34723,7 +35204,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -34739,7 +35220,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34749,11 +35230,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ThreadNetworkDirectory::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ThreadNetworkDirectory::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34776,7 +35257,7 @@ namespace Attributes { namespace MACAddress { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[12 + 1]; Protocols::InteractionModel::Status status = @@ -34794,7 +35275,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(12 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -34803,10 +35284,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::WakeOnLan::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WakeOnLan::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(12 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -34822,7 +35304,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace LinkLocalAddress { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableByteSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableByteSpan & value) { uint8_t zclString[16 + 1]; Protocols::InteractionModel::Status status = @@ -34840,7 +35322,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) { static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -34849,10 +35331,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::WakeOnLan::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WakeOnLan::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value) { static_assert(16 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -34868,7 +35351,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -34884,7 +35367,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34894,10 +35377,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WakeOnLan::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WakeOnLan::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34914,7 +35398,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -34930,7 +35414,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34940,10 +35424,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::WakeOnLan::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::WakeOnLan::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34966,7 +35451,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -34981,7 +35466,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -34991,10 +35476,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Channel::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Channel::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35011,7 +35497,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -35026,7 +35512,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35036,10 +35522,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::Channel::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::Channel::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35062,7 +35549,7 @@ namespace Attributes { namespace CurrentTarget { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -35078,7 +35565,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35088,10 +35575,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TargetNavigator::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TargetNavigator::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35108,7 +35596,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -35124,7 +35612,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35134,10 +35622,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TargetNavigator::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TargetNavigator::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35154,7 +35643,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -35170,7 +35659,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35180,10 +35669,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::TargetNavigator::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::TargetNavigator::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35206,7 +35696,7 @@ namespace Attributes { namespace CurrentState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -35222,7 +35712,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -35233,10 +35723,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MediaPlayback::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35253,7 +35744,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace StartTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -35272,7 +35763,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -35282,10 +35773,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MediaPlayback::Id, Id), + EmberAfWriteDataInput(writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -35298,16 +35790,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MediaPlayback::Id, Id), + EmberAfWriteDataInput(writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -35316,7 +35809,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -35327,7 +35820,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -35341,7 +35834,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace Duration { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -35360,7 +35853,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -35370,10 +35863,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MediaPlayback::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT64U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -35386,16 +35880,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MediaPlayback::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT64U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -35404,7 +35899,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -35415,7 +35910,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -35429,7 +35924,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace PlaybackSpeed { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, float * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, float * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -35445,7 +35940,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, float * value return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, float value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35455,10 +35950,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MediaPlayback::Id, Id), + EmberAfWriteDataInput(writable, ZCL_SINGLE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, float value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35475,7 +35971,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value) namespace SeekRangeEnd { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -35494,7 +35990,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -35504,10 +36000,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MediaPlayback::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT64U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -35520,16 +36017,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MediaPlayback::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT64U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -35538,7 +36036,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -35549,7 +36047,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -35563,7 +36061,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace SeekRangeStart { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -35582,7 +36080,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -35592,10 +36090,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MediaPlayback::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT64U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -35608,16 +36107,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MediaPlayback::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT64U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -35626,7 +36126,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -35637,7 +36137,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -35651,7 +36151,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -35667,7 +36167,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35677,10 +36177,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MediaPlayback::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35697,7 +36198,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -35713,7 +36214,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35723,10 +36224,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaPlayback::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MediaPlayback::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35749,7 +36251,7 @@ namespace Attributes { namespace CurrentInput { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -35765,7 +36267,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35775,10 +36277,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaInput::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MediaInput::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35795,7 +36298,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -35811,7 +36314,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35821,10 +36324,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaInput::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MediaInput::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35841,7 +36345,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -35857,7 +36361,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35867,10 +36371,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::MediaInput::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::MediaInput::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35893,7 +36398,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -35908,7 +36413,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35918,10 +36423,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LowPower::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LowPower::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35938,7 +36444,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -35953,7 +36459,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35963,10 +36469,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::LowPower::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::LowPower::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -35989,7 +36496,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -36005,7 +36512,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36015,10 +36522,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::KeypadInput::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::KeypadInput::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36035,7 +36543,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -36051,7 +36559,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36061,10 +36569,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::KeypadInput::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::KeypadInput::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36087,7 +36596,7 @@ namespace Attributes { namespace SupportedStreamingProtocols { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -36104,7 +36613,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { @@ -36116,10 +36625,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ContentLauncher::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ContentLauncher::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; @@ -36137,7 +36647,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -36153,7 +36663,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36163,10 +36673,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ContentLauncher::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ContentLauncher::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36183,7 +36694,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -36199,7 +36710,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36209,10 +36720,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ContentLauncher::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ContentLauncher::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36235,7 +36747,7 @@ namespace Attributes { namespace CurrentOutput { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -36251,7 +36763,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36261,10 +36773,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::AudioOutput::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::AudioOutput::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36281,7 +36794,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -36297,7 +36810,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36307,10 +36820,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::AudioOutput::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::AudioOutput::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36327,7 +36841,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -36343,7 +36857,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36353,10 +36867,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::AudioOutput::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::AudioOutput::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36379,7 +36894,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -36395,7 +36910,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36405,10 +36920,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ApplicationLauncher::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36425,7 +36941,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -36441,7 +36957,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36451,10 +36967,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ApplicationLauncher::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ApplicationLauncher::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36477,7 +36994,7 @@ namespace Attributes { namespace VendorName { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; Protocols::InteractionModel::Status status = @@ -36495,7 +37012,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -36504,11 +37021,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ApplicationBasic::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -36524,7 +37041,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace VendorID { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::VendorId * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::VendorId * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -36540,7 +37057,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::VendorI return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::VendorId value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36550,10 +37067,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorI Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_VENDOR_ID_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ApplicationBasic::Id, Id), + EmberAfWriteDataInput(writable, ZCL_VENDOR_ID_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::VendorId value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36570,7 +37088,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorI namespace ApplicationName { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[256 + 2]; Protocols::InteractionModel::Status status = @@ -36588,7 +37106,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(256 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -36597,11 +37115,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::LittleEndian::Put16(zclString, length); memcpy(&zclString[2], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ApplicationBasic::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(256 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -36617,7 +37135,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace ProductID { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -36633,7 +37151,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36643,10 +37161,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ApplicationBasic::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36663,8 +37182,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace Status { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -36680,8 +37198,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36691,11 +37209,11 @@ Set(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBasic::Applicatio Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ApplicationBasic::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36712,7 +37230,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace ApplicationVersion { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[32 + 1]; Protocols::InteractionModel::Status status = @@ -36730,7 +37248,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -36739,11 +37257,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ApplicationBasic::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(32 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -36759,7 +37277,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -36775,7 +37293,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36785,10 +37303,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ApplicationBasic::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36805,7 +37324,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -36821,7 +37340,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36831,10 +37350,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ApplicationBasic::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ApplicationBasic::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36857,7 +37377,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -36873,7 +37393,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36883,10 +37403,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::AccountLogin::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::AccountLogin::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36903,7 +37424,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -36919,7 +37440,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36929,10 +37450,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::AccountLogin::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::AccountLogin::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36955,7 +37477,7 @@ namespace Attributes { namespace Enabled { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -36971,7 +37493,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -36981,10 +37503,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ContentControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37001,7 +37524,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace OnDemandRatingThreshold { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[8 + 1]; Protocols::InteractionModel::Status status = @@ -37019,7 +37542,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(8 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -37028,10 +37551,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ContentControl::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(8 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -37047,7 +37571,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace ScheduledContentRatingThreshold { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[8 + 1]; Protocols::InteractionModel::Status status = @@ -37065,7 +37589,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(8 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -37074,10 +37598,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ContentControl::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(8 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -37093,7 +37618,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace ScreenDailyTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -37109,7 +37634,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37119,10 +37644,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ContentControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37139,7 +37665,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace RemainingScreenTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -37155,7 +37681,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37165,10 +37691,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ContentControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ELAPSED_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37185,7 +37712,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace BlockUnrated { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -37201,7 +37728,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37211,10 +37738,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ContentControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37231,7 +37759,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -37247,7 +37775,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37257,10 +37785,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ContentControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37277,7 +37806,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -37293,7 +37822,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37303,10 +37832,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ContentControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ContentControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37329,7 +37859,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -37345,7 +37875,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37355,10 +37885,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ContentAppObserver::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ContentAppObserver::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37375,7 +37906,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -37391,7 +37922,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37401,10 +37932,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ContentAppObserver::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ContentAppObserver::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37425,99 +37957,9 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace EcosystemInformation { namespace Attributes { -namespace RemovedOn { - -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType temp; - uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); - Protocols::InteractionModel::Status status = - emberAfReadAttribute(endpoint, Clusters::EcosystemInformation::Id, Id, readable, sizeof(temp)); - VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); - if (Traits::IsNullValue(temp)) - { - value.SetNull(); - } - else - { - value.SetNonNull() = Traits::StorageToWorking(temp); - } - return status; -} - -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EcosystemInformation::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE, - markDirty); -} - -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) -{ - using Traits = NumericAttributeTraits; - if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) - { - return Protocols::InteractionModel::Status::ConstraintError; - } - Traits::StorageType storageValue; - Traits::WorkingToStorage(value, storageValue); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EcosystemInformation::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); -} - -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::EcosystemInformation::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE, - markDirty); -} - -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) -{ - using Traits = NumericAttributeTraits; - Traits::StorageType value; - Traits::SetNull(value); - uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::EcosystemInformation::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE); -} - -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, - MarkAttributeDirty markDirty) -{ - if (value.IsNull()) - { - return SetNull(endpoint, markDirty); - } - - return Set(endpoint, value.Value(), markDirty); -} - -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) -{ - if (value.IsNull()) - { - return SetNull(endpoint); - } - - return Set(endpoint, value.Value()); -} - -} // namespace RemovedOn - namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -37533,7 +37975,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37543,11 +37985,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EcosystemInformation::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::EcosystemInformation::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37564,7 +38006,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -37580,7 +38022,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37590,10 +38032,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::EcosystemInformation::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::EcosystemInformation::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37617,7 +38060,7 @@ namespace Attributes { namespace SupportedDeviceCategories { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::BitMask * value) +Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -37634,7 +38077,7 @@ Get(chip::EndpointId endpoint, chip::BitMask value, +Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; @@ -37645,11 +38088,12 @@ Set(chip::EndpointId endpoint, chip::BitMask value) +Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37666,7 +38110,7 @@ Set(chip::EndpointId endpoint, chip::BitMask; Traits::StorageType temp; @@ -37682,7 +38126,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37692,10 +38136,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CommissionerControl::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommissionerControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37712,7 +38157,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -37728,7 +38173,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37738,10 +38183,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::CommissionerControl::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::CommissionerControl::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37764,7 +38210,7 @@ namespace Attributes { namespace MeasurementType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -37780,7 +38226,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37790,11 +38236,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37811,7 +38257,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace DcVoltage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -37827,7 +38273,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37837,10 +38283,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37857,7 +38304,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace DcVoltageMin { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -37873,7 +38320,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37883,10 +38330,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37903,7 +38351,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace DcVoltageMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -37919,7 +38367,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37929,10 +38377,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37949,7 +38398,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace DcCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -37965,7 +38414,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37975,10 +38424,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -37995,7 +38445,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace DcCurrentMin { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38011,7 +38461,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38021,10 +38471,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38041,7 +38492,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace DcCurrentMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38057,7 +38508,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38067,10 +38518,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38087,7 +38539,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace DcPower { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38103,7 +38555,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38113,10 +38565,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38133,7 +38586,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace DcPowerMin { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38149,7 +38602,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38159,10 +38612,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38179,7 +38633,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace DcPowerMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38195,7 +38649,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38205,10 +38659,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38225,7 +38680,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace DcVoltageMultiplier { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38241,7 +38696,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38251,10 +38706,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38271,7 +38727,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace DcVoltageDivisor { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38287,7 +38743,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38297,10 +38753,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38317,7 +38774,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace DcCurrentMultiplier { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38333,7 +38790,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38343,10 +38800,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38363,7 +38821,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace DcCurrentDivisor { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38379,7 +38837,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38389,10 +38847,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38409,7 +38868,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace DcPowerMultiplier { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38425,7 +38884,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38435,10 +38894,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38455,7 +38915,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace DcPowerDivisor { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38471,7 +38931,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38481,10 +38941,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38501,7 +38962,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace AcFrequency { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38517,7 +38978,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38527,10 +38988,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38547,7 +39009,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace AcFrequencyMin { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38563,7 +39025,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38573,10 +39035,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38593,7 +39056,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace AcFrequencyMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38609,7 +39072,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38619,10 +39082,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38639,7 +39103,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace NeutralCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38655,7 +39119,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38665,10 +39129,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38685,7 +39150,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace TotalActivePower { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38701,7 +39166,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int32_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38711,10 +39176,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38731,7 +39197,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value namespace TotalReactivePower { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38747,7 +39213,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int32_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38757,10 +39223,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38777,7 +39244,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value namespace TotalApparentPower { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38793,7 +39260,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38803,10 +39270,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38823,7 +39291,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace Measured1stHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38839,7 +39307,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38849,10 +39317,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38869,7 +39338,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace Measured3rdHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38885,7 +39354,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38895,10 +39364,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38915,7 +39385,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace Measured5thHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38931,7 +39401,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38941,10 +39411,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38961,7 +39432,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace Measured7thHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -38977,7 +39448,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -38987,10 +39458,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39007,7 +39479,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace Measured9thHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39023,7 +39495,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39033,10 +39505,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39053,7 +39526,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace Measured11thHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39069,7 +39542,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39079,10 +39552,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39099,7 +39573,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace MeasuredPhase1stHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39115,7 +39589,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39125,10 +39599,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39145,7 +39620,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace MeasuredPhase3rdHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39161,7 +39636,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39171,10 +39646,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39191,7 +39667,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace MeasuredPhase5thHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39207,7 +39683,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39217,10 +39693,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39237,7 +39714,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace MeasuredPhase7thHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39253,7 +39730,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39263,10 +39740,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39283,7 +39761,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace MeasuredPhase9thHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39299,7 +39777,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39309,10 +39787,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39329,7 +39808,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace MeasuredPhase11thHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39345,7 +39824,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39355,10 +39834,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39375,7 +39855,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace AcFrequencyMultiplier { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39391,7 +39871,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39401,10 +39881,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39421,7 +39902,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace AcFrequencyDivisor { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39437,7 +39918,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39447,10 +39928,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39467,7 +39949,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace PowerMultiplier { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39483,7 +39965,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39493,10 +39975,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39513,7 +39996,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace PowerDivisor { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39529,7 +40012,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39539,10 +40022,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39559,7 +40043,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace HarmonicCurrentMultiplier { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39575,7 +40059,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * valu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39585,10 +40069,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39605,7 +40090,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) namespace PhaseHarmonicCurrentMultiplier { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39621,7 +40106,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * valu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39631,10 +40116,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39651,7 +40137,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) namespace InstantaneousVoltage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39667,7 +40153,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39677,10 +40163,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39697,7 +40184,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace InstantaneousLineCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39713,7 +40200,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39723,10 +40210,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39743,7 +40231,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace InstantaneousActiveCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39759,7 +40247,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39769,10 +40257,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39789,7 +40278,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace InstantaneousReactiveCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39805,7 +40294,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39815,10 +40304,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39835,7 +40325,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace InstantaneousPower { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39851,7 +40341,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39861,10 +40351,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39881,7 +40372,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace RmsVoltage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39897,7 +40388,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39907,10 +40398,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39927,7 +40419,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsVoltageMin { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39943,7 +40435,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39953,10 +40445,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39973,7 +40466,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsVoltageMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -39989,7 +40482,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -39999,10 +40492,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40019,7 +40513,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40035,7 +40529,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40045,10 +40539,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40065,7 +40560,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsCurrentMin { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40081,7 +40576,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40091,10 +40586,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40111,7 +40607,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsCurrentMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40127,7 +40623,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40137,10 +40633,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40157,7 +40654,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ActivePower { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40173,7 +40670,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40183,10 +40680,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40203,7 +40701,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace ActivePowerMin { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40219,7 +40717,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40229,10 +40727,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40249,7 +40748,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace ActivePowerMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40265,7 +40764,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40275,10 +40774,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40295,7 +40795,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace ReactivePower { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40311,7 +40811,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40321,10 +40821,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40341,7 +40842,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace ApparentPower { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40357,7 +40858,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40367,10 +40868,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40387,7 +40889,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace PowerFactor { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40403,7 +40905,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * valu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40413,10 +40915,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40433,7 +40936,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) namespace AverageRmsVoltageMeasurementPeriod { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40449,7 +40952,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40459,10 +40962,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40479,7 +40983,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace AverageRmsUnderVoltageCounter { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40495,7 +40999,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40505,10 +41009,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40525,7 +41030,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsExtremeOverVoltagePeriod { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40541,7 +41046,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40551,10 +41056,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40571,7 +41077,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsExtremeUnderVoltagePeriod { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40587,7 +41093,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40597,10 +41103,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40617,7 +41124,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsVoltageSagPeriod { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40633,7 +41140,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40643,10 +41150,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40663,7 +41171,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsVoltageSwellPeriod { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40679,7 +41187,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40689,10 +41197,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40709,7 +41218,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace AcVoltageMultiplier { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40725,7 +41234,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40735,10 +41244,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40755,7 +41265,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace AcVoltageDivisor { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40771,7 +41281,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40781,10 +41291,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40801,7 +41312,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace AcCurrentMultiplier { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40817,7 +41328,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40827,10 +41338,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40847,7 +41359,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace AcCurrentDivisor { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40863,7 +41375,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40873,10 +41385,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40893,7 +41406,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace AcPowerMultiplier { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40909,7 +41422,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40919,10 +41432,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40939,7 +41453,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace AcPowerDivisor { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -40955,7 +41469,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40965,10 +41479,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -40985,7 +41500,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace OverloadAlarmsMask { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41001,7 +41516,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41011,11 +41526,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41032,7 +41547,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace VoltageOverload { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41048,7 +41563,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41058,10 +41573,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41078,7 +41594,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace CurrentOverload { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41094,7 +41610,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41104,10 +41620,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41124,7 +41641,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace AcOverloadAlarmsMask { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41140,7 +41657,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41150,11 +41667,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41171,7 +41688,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace AcVoltageOverload { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41187,7 +41704,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41197,10 +41714,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41217,7 +41735,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace AcCurrentOverload { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41233,7 +41751,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41243,10 +41761,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41263,7 +41782,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace AcActivePowerOverload { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41279,7 +41798,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41289,10 +41808,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41309,7 +41829,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace AcReactivePowerOverload { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41325,7 +41845,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41335,10 +41855,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41355,7 +41876,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace AverageRmsOverVoltage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41371,7 +41892,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41381,10 +41902,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41401,7 +41923,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace AverageRmsUnderVoltage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41417,7 +41939,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41427,10 +41949,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41447,7 +41970,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace RmsExtremeOverVoltage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41463,7 +41986,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41473,10 +41996,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41493,7 +42017,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace RmsExtremeUnderVoltage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41509,7 +42033,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41519,10 +42043,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41539,7 +42064,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace RmsVoltageSag { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41555,7 +42080,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41565,10 +42090,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41585,7 +42111,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace RmsVoltageSwell { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41601,7 +42127,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41611,10 +42137,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41631,7 +42158,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace LineCurrentPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41647,7 +42174,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41657,10 +42184,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41677,7 +42205,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ActiveCurrentPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41693,7 +42221,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41703,10 +42231,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41723,7 +42252,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace ReactiveCurrentPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41739,7 +42268,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41749,10 +42278,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41769,7 +42299,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace RmsVoltagePhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41785,7 +42315,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41795,10 +42325,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41815,7 +42346,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsVoltageMinPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41831,7 +42362,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41841,10 +42372,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41861,7 +42393,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsVoltageMaxPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41877,7 +42409,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41887,10 +42419,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41907,7 +42440,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsCurrentPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41923,7 +42456,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41933,10 +42466,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41953,7 +42487,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsCurrentMinPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -41969,7 +42503,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41979,10 +42513,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -41999,7 +42534,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsCurrentMaxPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42015,7 +42550,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42025,10 +42560,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42045,7 +42581,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ActivePowerPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42061,7 +42597,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42071,10 +42607,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42091,7 +42628,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace ActivePowerMinPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42107,7 +42644,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42117,10 +42654,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42137,7 +42675,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace ActivePowerMaxPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42153,7 +42691,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42163,10 +42701,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42183,7 +42722,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace ReactivePowerPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42199,7 +42738,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42209,10 +42748,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42229,7 +42769,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace ApparentPowerPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42245,7 +42785,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42255,10 +42795,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42275,7 +42816,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace PowerFactorPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42291,7 +42832,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * valu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42301,10 +42842,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42321,7 +42863,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) namespace AverageRmsVoltageMeasurementPeriodPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42337,7 +42879,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42347,10 +42889,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42367,7 +42910,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace AverageRmsOverVoltageCounterPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42383,7 +42926,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42393,10 +42936,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42413,7 +42957,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace AverageRmsUnderVoltageCounterPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42429,7 +42973,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42439,10 +42983,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42459,7 +43004,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsExtremeOverVoltagePeriodPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42475,7 +43020,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42485,10 +43030,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42505,7 +43051,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsExtremeUnderVoltagePeriodPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42521,7 +43067,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42531,10 +43077,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42551,7 +43098,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsVoltageSagPeriodPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42567,7 +43114,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42577,10 +43124,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42597,7 +43145,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsVoltageSwellPeriodPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42613,7 +43161,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42623,10 +43171,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42643,7 +43192,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace LineCurrentPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42659,7 +43208,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42669,10 +43218,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42689,7 +43239,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ActiveCurrentPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42705,7 +43255,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42715,10 +43265,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42735,7 +43286,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace ReactiveCurrentPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42751,7 +43302,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42761,10 +43312,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42781,7 +43333,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace RmsVoltagePhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42797,7 +43349,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42807,10 +43359,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42827,7 +43380,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsVoltageMinPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42843,7 +43396,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42853,10 +43406,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42873,7 +43427,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsVoltageMaxPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42889,7 +43443,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42899,10 +43453,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42919,7 +43474,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsCurrentPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42935,7 +43490,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42945,10 +43500,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42965,7 +43521,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsCurrentMinPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -42981,7 +43537,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -42991,10 +43547,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43011,7 +43568,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsCurrentMaxPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -43027,7 +43584,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43037,10 +43594,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43057,7 +43615,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace ActivePowerPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -43073,7 +43631,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43083,10 +43641,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43103,7 +43662,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace ActivePowerMinPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -43119,7 +43678,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43129,10 +43688,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43149,7 +43709,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace ActivePowerMaxPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -43165,7 +43725,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43175,10 +43735,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43195,7 +43756,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace ReactivePowerPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -43211,7 +43772,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43221,10 +43782,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43241,7 +43803,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace ApparentPowerPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -43257,7 +43819,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43267,10 +43829,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43287,7 +43850,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace PowerFactorPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -43303,7 +43866,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * valu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43313,10 +43876,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43333,7 +43897,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) namespace AverageRmsVoltageMeasurementPeriodPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -43349,7 +43913,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43359,10 +43923,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43379,7 +43944,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace AverageRmsOverVoltageCounterPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -43395,7 +43960,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43405,10 +43970,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43425,7 +43991,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace AverageRmsUnderVoltageCounterPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -43441,7 +44007,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43451,10 +44017,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43471,7 +44038,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsExtremeOverVoltagePeriodPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -43487,7 +44054,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43497,10 +44064,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43517,7 +44085,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsExtremeUnderVoltagePeriodPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -43533,7 +44101,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43543,10 +44111,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43563,7 +44132,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsVoltageSagPeriodPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -43579,7 +44148,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43589,10 +44158,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43609,7 +44179,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RmsVoltageSwellPeriodPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -43625,7 +44195,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43635,10 +44205,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43655,7 +44226,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -43671,7 +44242,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43681,11 +44252,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43702,7 +44273,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -43718,7 +44289,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43728,10 +44299,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::ElectricalMeasurement::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::ElectricalMeasurement::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43754,7 +44326,7 @@ namespace Attributes { namespace Boolean { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -43770,7 +44342,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43780,10 +44352,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43800,7 +44373,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace Bitmap8 { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -43817,8 +44390,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43828,11 +44401,11 @@ Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43849,7 +44422,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace Bitmap16 { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -43866,8 +44439,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43877,11 +44450,11 @@ Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43898,7 +44471,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace Bitmap32 { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -43915,8 +44488,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43926,11 +44499,11 @@ Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43947,7 +44520,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace Bitmap64 { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value) { using Traits = NumericAttributeTraits>; @@ -43964,8 +44537,8 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43975,11 +44548,11 @@ Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -43996,7 +44569,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace Int8u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -44012,7 +44585,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44022,10 +44595,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44042,7 +44616,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace Int16u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -44058,7 +44632,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44068,10 +44642,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44088,7 +44663,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace Int24u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -44104,7 +44679,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44114,10 +44689,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT24U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44134,7 +44710,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace Int32u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -44150,7 +44726,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44160,10 +44736,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44180,7 +44757,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace Int40u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint64_t * value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -44196,7 +44773,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44206,10 +44783,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT40U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44226,7 +44804,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu namespace Int48u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint64_t * value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -44242,7 +44820,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44252,10 +44830,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT48U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44272,7 +44851,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu namespace Int56u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint64_t * value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -44288,7 +44867,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44298,10 +44877,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT56U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44318,7 +44898,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu namespace Int64u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint64_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -44334,7 +44914,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44344,10 +44924,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT64U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44364,7 +44945,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu namespace Int8s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -44380,7 +44961,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * valu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44390,10 +44971,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44410,7 +44992,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) namespace Int16s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -44426,7 +45008,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44436,10 +45018,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44456,7 +45039,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace Int24s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int32_t * value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -44472,7 +45055,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int32_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44482,10 +45065,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT24S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44502,7 +45086,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value namespace Int32s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -44518,7 +45102,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int32_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44528,10 +45112,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44548,7 +45133,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value namespace Int40s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int64_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int64_t * value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -44564,7 +45149,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int64_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44574,10 +45159,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT40S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44594,7 +45180,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value namespace Int48s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int64_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int64_t * value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -44610,7 +45196,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int64_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44620,10 +45206,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT48S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44640,7 +45227,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value namespace Int56s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int64_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int64_t * value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -44656,7 +45243,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int64_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44666,10 +45253,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT56S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44686,7 +45274,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value namespace Int64s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int64_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int64_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -44702,7 +45290,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int64_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44712,10 +45300,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT64S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44732,7 +45321,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value namespace Enum8 { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -44748,7 +45337,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44758,10 +45347,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44778,7 +45368,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace Enum16 { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -44794,7 +45384,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44804,10 +45394,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44824,7 +45415,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace FloatSingle { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, float * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, float * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -44840,7 +45431,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, float * value return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, float value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44850,10 +45441,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_SINGLE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, float value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44870,7 +45462,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value) namespace FloatDouble { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, double * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, double * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -44886,7 +45478,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, double * valu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, double value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44896,10 +45488,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_DOUBLE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_DOUBLE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, double value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -44916,7 +45509,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value) namespace OctetString { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableByteSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableByteSpan & value) { uint8_t zclString[10 + 1]; Protocols::InteractionModel::Status status = @@ -44934,7 +45527,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) { static_assert(10 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -44943,10 +45536,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value) { static_assert(10 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -44962,7 +45556,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa namespace LongOctetString { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableByteSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableByteSpan & value) { uint8_t zclString[1000 + 2]; Protocols::InteractionModel::Status status = @@ -44980,7 +45574,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) { static_assert(1000 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -44989,11 +45583,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa auto length = static_cast(value.size()); Encoding::LittleEndian::Put16(zclString, length); memcpy(&zclString[2], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_LONG_OCTET_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value) { static_assert(1000 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -45009,7 +45603,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa namespace CharString { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[10 + 1]; Protocols::InteractionModel::Status status = @@ -45027,7 +45621,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(10 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -45036,10 +45630,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(10 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -45055,7 +45650,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace LongCharString { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value) { uint8_t zclString[1000 + 2]; Protocols::InteractionModel::Status status = @@ -45073,7 +45668,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Mutable return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(1000 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -45082,11 +45677,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::LittleEndian::Put16(zclString, length); memcpy(&zclString[2], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE, - markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_LONG_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(1000 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -45102,7 +45697,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa namespace EpochUs { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint64_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -45118,7 +45713,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -45128,10 +45723,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_EPOCH_US_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -45148,7 +45744,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu namespace EpochS { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -45164,7 +45760,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -45174,10 +45770,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_EPOCH_S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -45194,7 +45791,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace VendorId { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::VendorId * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::VendorId * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -45210,7 +45807,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::VendorI return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::VendorId value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -45220,10 +45817,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorI Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_VENDOR_ID_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_VENDOR_ID_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::VendorId value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -45240,7 +45838,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorI namespace EnumAttr { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -45256,7 +45854,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -45267,10 +45865,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -45287,7 +45886,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace RangeRestrictedInt8u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -45303,7 +45902,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -45313,10 +45912,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -45333,7 +45933,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace RangeRestrictedInt8s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -45349,7 +45949,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * valu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -45359,10 +45959,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -45379,7 +45980,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) namespace RangeRestrictedInt16u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -45395,7 +45996,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -45405,10 +46006,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -45425,7 +46027,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace RangeRestrictedInt16s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -45441,7 +46043,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -45451,10 +46053,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -45471,7 +46074,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value namespace TimedWriteBoolean { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -45487,7 +46090,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -45497,10 +46100,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -45517,7 +46121,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace GlobalEnum { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::Globals::TestGlobalEnum * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Globals::TestGlobalEnum * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -45533,7 +46137,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Cl return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Globals::TestGlobalEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Globals::TestGlobalEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -45544,10 +46148,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Globals::TestGlobalEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Globals::TestGlobalEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -45564,7 +46169,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl namespace Unsupported { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -45580,7 +46185,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -45590,10 +46195,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -45608,9 +46214,103 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) } // namespace Unsupported +namespace ReadFailureCode { + +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + Protocols::InteractionModel::Status status = + emberAfReadAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + *value = Traits::StorageToWorking(temp); + return status; +} + +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); +} + +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); +} + +} // namespace ReadFailureCode + +namespace FailureInt32U { + +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) +{ + using Traits = NumericAttributeTraits; + Traits::StorageType temp; + uint8_t * readable = Traits::ToAttributeStoreRepresentation(temp); + Protocols::InteractionModel::Status status = + emberAfReadAttribute(endpoint, Clusters::UnitTesting::Id, Id, readable, sizeof(temp)); + VerifyOrReturnError(Protocols::InteractionModel::Status::Success == status, status); + if (!Traits::CanRepresentValue(/* isNullable = */ false, temp)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + *value = Traits::StorageToWorking(temp); + return status; +} + +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); +} + +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) +{ + using Traits = NumericAttributeTraits; + if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) + { + return Protocols::InteractionModel::Status::ConstraintError; + } + Traits::StorageType storageValue; + Traits::WorkingToStorage(value, storageValue); + uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); + return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); +} + +} // namespace FailureInt32U + namespace NullableBoolean { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -45629,7 +46329,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -45639,10 +46339,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -45655,16 +46356,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -45673,7 +46375,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -45684,7 +46386,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -45699,7 +46401,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableBitmap8 { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, DataModel::Nullable> & value) +Get(EndpointId endpoint, DataModel::Nullable> & value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -45718,8 +46420,8 @@ Get(chip::EndpointId endpoint, DataModel::Nullable value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -45729,11 +46431,11 @@ Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -45746,16 +46448,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits>; Traits::StorageType value; @@ -45765,7 +46468,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) } Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable> & value, MarkAttributeDirty markDirty) { @@ -45778,7 +46481,7 @@ Set(chip::EndpointId endpoint, } Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable> & value) { if (value.IsNull()) @@ -45794,7 +46497,7 @@ Set(chip::EndpointId endpoint, namespace NullableBitmap16 { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, DataModel::Nullable> & value) +Get(EndpointId endpoint, DataModel::Nullable> & value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -45813,8 +46516,8 @@ Get(chip::EndpointId endpoint, DataModel::Nullable value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -45824,11 +46527,11 @@ Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -45841,16 +46544,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP16_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits>; Traits::StorageType value; @@ -45860,7 +46564,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) } Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable> & value, MarkAttributeDirty markDirty) { @@ -45873,7 +46577,7 @@ Set(chip::EndpointId endpoint, } Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable> & value) { if (value.IsNull()) @@ -45889,7 +46593,7 @@ Set(chip::EndpointId endpoint, namespace NullableBitmap32 { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, DataModel::Nullable> & value) +Get(EndpointId endpoint, DataModel::Nullable> & value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -45908,8 +46612,8 @@ Get(chip::EndpointId endpoint, DataModel::Nullable value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -45919,11 +46623,11 @@ Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -45936,16 +46640,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits>; Traits::StorageType value; @@ -45955,7 +46660,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) } Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable> & value, MarkAttributeDirty markDirty) { @@ -45968,7 +46673,7 @@ Set(chip::EndpointId endpoint, } Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable> & value) { if (value.IsNull()) @@ -45984,7 +46689,7 @@ Set(chip::EndpointId endpoint, namespace NullableBitmap64 { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, DataModel::Nullable> & value) +Get(EndpointId endpoint, DataModel::Nullable> & value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -46003,8 +46708,8 @@ Get(chip::EndpointId endpoint, DataModel::Nullable value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46014,11 +46719,11 @@ Set(chip::EndpointId endpoint, chip::BitMask value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46031,16 +46736,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP64_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP64_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP64_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits>; Traits::StorageType value; @@ -46050,7 +46756,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) } Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable> & value, MarkAttributeDirty markDirty) { @@ -46063,7 +46769,7 @@ Set(chip::EndpointId endpoint, } Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable> & value) { if (value.IsNull()) @@ -46078,7 +46784,7 @@ Set(chip::EndpointId endpoint, namespace NullableInt8u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -46097,7 +46803,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46107,10 +46813,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46123,16 +46830,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -46141,7 +46849,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -46152,7 +46860,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -46166,7 +46874,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableInt16u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -46185,7 +46893,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46195,10 +46903,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46211,16 +46920,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -46229,7 +46939,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -46240,7 +46950,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -46254,7 +46964,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableInt24u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -46273,7 +46983,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46283,10 +46993,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT24U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46299,16 +47010,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT24U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits>; Traits::StorageType value; @@ -46317,7 +47029,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -46328,7 +47040,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -46342,7 +47054,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableInt32u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -46361,7 +47073,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46371,10 +47083,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46387,16 +47100,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -46405,7 +47119,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -46416,7 +47130,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -46430,7 +47144,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableInt40u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -46449,7 +47163,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46459,10 +47173,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT40U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46475,16 +47190,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT40U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits>; Traits::StorageType value; @@ -46493,7 +47209,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -46504,7 +47220,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -46518,7 +47234,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableInt48u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -46537,7 +47253,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46547,10 +47263,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT48U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46563,16 +47280,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT48U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits>; Traits::StorageType value; @@ -46581,7 +47299,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -46592,7 +47310,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -46606,7 +47324,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableInt56u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -46625,7 +47343,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46635,10 +47353,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT56U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46651,16 +47370,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT56U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits>; Traits::StorageType value; @@ -46669,7 +47389,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -46680,7 +47400,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -46694,7 +47414,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableInt64u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -46713,7 +47433,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46723,10 +47443,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT64U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46739,16 +47460,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t valu return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT64U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -46757,7 +47479,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -46768,7 +47490,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -46782,7 +47504,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableInt8s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -46801,7 +47523,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46811,10 +47533,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46827,16 +47550,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -46845,7 +47569,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -46856,7 +47580,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -46870,7 +47594,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableInt16s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -46889,7 +47613,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46899,10 +47623,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46915,16 +47640,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -46933,7 +47659,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -46944,7 +47670,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -46958,7 +47684,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableInt24s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -46977,7 +47703,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -46987,10 +47713,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT24S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -47003,16 +47730,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT24S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits>; Traits::StorageType value; @@ -47021,7 +47749,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT24S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -47032,7 +47760,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -47046,7 +47774,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableInt32s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -47065,7 +47793,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -47075,10 +47803,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -47091,16 +47820,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT32S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -47109,7 +47839,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -47120,7 +47850,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -47134,7 +47864,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableInt40s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -47153,7 +47883,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -47163,10 +47893,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT40S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -47179,16 +47910,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT40S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits>; Traits::StorageType value; @@ -47197,7 +47929,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT40S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -47208,7 +47940,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -47222,7 +47954,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableInt48s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -47241,7 +47973,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -47251,10 +47983,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT48S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -47267,16 +48000,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT48S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits>; Traits::StorageType value; @@ -47285,7 +48019,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT48S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -47296,7 +48030,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -47310,7 +48044,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableInt56s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits>; Traits::StorageType temp; @@ -47329,7 +48063,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -47339,10 +48073,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT56S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value) { using Traits = NumericAttributeTraits>; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -47355,16 +48090,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits>; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT56S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits>; Traits::StorageType value; @@ -47373,7 +48109,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT56S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -47384,7 +48120,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -47398,7 +48134,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableInt64s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -47417,7 +48153,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -47427,10 +48163,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT64S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -47443,16 +48180,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT64S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -47461,7 +48199,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT64S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -47472,7 +48210,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -47486,7 +48224,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableEnum8 { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -47505,7 +48243,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -47515,10 +48253,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -47531,16 +48270,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -47549,7 +48289,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -47560,7 +48300,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -47574,7 +48314,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableEnum16 { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -47593,7 +48333,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -47603,10 +48343,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -47619,16 +48360,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM16_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -47637,7 +48379,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM16_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -47648,7 +48390,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -47662,7 +48404,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableFloatSingle { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -47681,7 +48423,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, float value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -47691,10 +48433,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_SINGLE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, float value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -47707,16 +48450,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_SINGLE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -47725,7 +48469,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_SINGLE_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -47736,7 +48480,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -47750,7 +48494,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableFloatDouble { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -47769,7 +48513,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, double value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -47779,10 +48523,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_DOUBLE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_DOUBLE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, double value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -47795,16 +48540,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_DOUBLE_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_DOUBLE_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_DOUBLE_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -47813,7 +48559,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_DOUBLE_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -47824,7 +48570,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -47838,7 +48584,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableOctetString { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { if (value.IsNull()) { @@ -47864,7 +48610,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty) { static_assert(10 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -47873,10 +48619,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value) { static_assert(10 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -47888,19 +48635,20 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpa return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { uint8_t zclString[1] = { 0xFF }; - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { uint8_t zclString[1] = { 0xFF }; return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_OCTET_STRING_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -47911,7 +48659,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -47925,7 +48673,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableCharString { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { if (value.IsNull()) { @@ -47951,7 +48699,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty) { static_assert(10 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -47960,10 +48708,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa auto length = static_cast(value.size()); Encoding::Put8(zclString, length); memcpy(&zclString[1], value.data(), value.size()); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value) { static_assert(10 < NumericAttributeTraits::kNullValue, "value.size() might be too big"); @@ -47975,19 +48724,20 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpa return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { uint8_t zclString[1] = { 0xFF }; - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { uint8_t zclString[1] = { 0xFF }; return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, zclString, ZCL_CHAR_STRING_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -47998,7 +48748,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -48012,7 +48762,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableEnumAttr { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; @@ -48032,7 +48782,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -48043,10 +48793,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -48059,16 +48810,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -48077,7 +48829,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { @@ -48089,7 +48841,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -48104,7 +48856,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace NullableRangeRestrictedInt8u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -48123,7 +48875,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -48133,10 +48885,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -48149,16 +48902,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -48167,7 +48921,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -48178,7 +48932,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -48192,7 +48946,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableRangeRestrictedInt8s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -48211,7 +48965,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -48221,10 +48975,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -48237,16 +48992,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -48255,7 +49011,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -48266,7 +49022,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -48280,7 +49036,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableRangeRestrictedInt16u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -48299,7 +49055,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -48309,10 +49065,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -48325,16 +49082,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -48343,7 +49101,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -48354,7 +49112,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -48368,7 +49126,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace NullableRangeRestrictedInt16s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -48387,7 +49145,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nu return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -48397,10 +49155,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -48413,16 +49172,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16S_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -48431,7 +49191,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16S_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { if (value.IsNull()) @@ -48442,7 +49202,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) { @@ -48456,7 +49216,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::a namespace WriteOnlyInt8u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -48472,7 +49232,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -48482,10 +49242,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -48502,7 +49263,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value namespace NullableGlobalEnum { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value) { using Traits = NumericAttributeTraits; @@ -48522,7 +49283,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Globals::TestGlobalEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Globals::TestGlobalEnum value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; @@ -48533,10 +49294,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Globals::TestGlobalEnum value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Globals::TestGlobalEnum value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ true, value)) @@ -48549,16 +49311,17 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Cl return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; Traits::StorageType value; Traits::SetNull(value); uint8_t * writable = Traits::ToAttributeStoreRepresentation(value); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_ENUM8_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) +Protocols::InteractionModel::Status SetNull(EndpointId endpoint) { using Traits = NumericAttributeTraits; Traits::StorageType value; @@ -48567,7 +49330,7 @@ Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint) return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_ENUM8_ATTRIBUTE_TYPE); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty) { @@ -48579,7 +49342,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, return Set(endpoint, value.Value(), markDirty); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value) { if (value.IsNull()) @@ -48594,7 +49357,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -48610,7 +49373,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -48620,10 +49383,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -48640,7 +49404,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -48656,7 +49420,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -48666,10 +49430,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -48686,7 +49451,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace MeiInt8u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -48702,7 +49467,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * val return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -48712,10 +49477,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::UnitTesting::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT8U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -48738,7 +49504,7 @@ namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -48754,7 +49520,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -48764,10 +49530,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FaultInjection::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FaultInjection::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -48784,7 +49551,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -48800,7 +49567,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -48810,10 +49577,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::FaultInjection::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::FaultInjection::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -48836,7 +49604,7 @@ namespace Attributes { namespace FlipFlop { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -48852,7 +49620,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value) return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -48862,10 +49630,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, M Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SampleMei::Id, Id, writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::SampleMei::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BOOLEAN_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -48882,7 +49651,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -48898,7 +49667,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -48908,10 +49677,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SampleMei::Id, Id, writable, ZCL_BITMAP32_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::SampleMei::Id, Id), + EmberAfWriteDataInput(writable, ZCL_BITMAP32_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -48928,7 +49698,7 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t valu namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value) +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value) { using Traits = NumericAttributeTraits; Traits::StorageType temp; @@ -48944,7 +49714,7 @@ Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * va return status; } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) @@ -48954,10 +49724,11 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu Traits::StorageType storageValue; Traits::WorkingToStorage(value, storageValue); uint8_t * writable = Traits::ToAttributeStoreRepresentation(storageValue); - return emberAfWriteAttribute(endpoint, Clusters::SampleMei::Id, Id, writable, ZCL_INT16U_ATTRIBUTE_TYPE, markDirty); + return emberAfWriteAttribute(ConcreteAttributePath(endpoint, Clusters::SampleMei::Id, Id), + EmberAfWriteDataInput(writable, ZCL_INT16U_ATTRIBUTE_TYPE).SetMarkDirty(markDirty)); } -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value) +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value) { using Traits = NumericAttributeTraits; if (!Traits::CanRepresentValue(/* isNullable = */ false, value)) diff --git a/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.h index cab9691ebbf4ed..f44307d55e9ae1 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 @@ -40,29 +40,29 @@ namespace Identify { namespace Attributes { namespace IdentifyTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace IdentifyTime namespace IdentifyType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Identify::IdentifyTypeEnum * value); // IdentifyTypeEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Identify::IdentifyTypeEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Identify::IdentifyTypeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Identify::IdentifyTypeEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Identify::IdentifyTypeEnum value, MarkAttributeDirty markDirty); } // namespace IdentifyType namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -72,24 +72,23 @@ namespace Groups { namespace Attributes { namespace NameSupport { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value); // NameSupportBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value); -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace NameSupport namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -99,54 +98,54 @@ namespace OnOff { namespace Attributes { namespace OnOff { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace OnOff namespace GlobalSceneControl { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace GlobalSceneControl namespace OnTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace OnTime namespace OffWaitTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace OffWaitTime namespace StartUpOnOff { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, DataModel::Nullable & value); // StartUpOnOffEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::OnOff::StartUpOnOffEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::OnOff::StartUpOnOffEnum value, +Get(EndpointId endpoint, DataModel::Nullable & value); // StartUpOnOffEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::OnOff::StartUpOnOffEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::OnOff::StartUpOnOffEnum value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace StartUpOnOff namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -156,27 +155,27 @@ namespace OnOffSwitchConfiguration { namespace Attributes { namespace SwitchType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // enum8 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace SwitchType namespace SwitchActions { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // enum8 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace SwitchActions namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -186,132 +185,131 @@ namespace LevelControl { namespace Attributes { namespace CurrentLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace CurrentLevel namespace RemainingTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RemainingTime namespace MinLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MinLevel namespace MaxLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MaxLevel namespace CurrentFrequency { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace CurrentFrequency namespace MinFrequency { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace MinFrequency namespace MaxFrequency { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace MaxFrequency namespace Options { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value); // OptionsBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value); -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace Options namespace OnOffTransitionTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace OnOffTransitionTime namespace OnLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace OnLevel namespace OnTransitionTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace OnTransitionTime namespace OffTransitionTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace OffTransitionTime namespace DefaultMoveRate { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace DefaultMoveRate namespace StartUpCurrentLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace StartUpCurrentLevel namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -321,69 +319,69 @@ namespace BinaryInputBasic { namespace Attributes { namespace ActiveText { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace ActiveText namespace Description { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace Description namespace InactiveText { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace InactiveText namespace OutOfService { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace OutOfService namespace Polarity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // enum8 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace Polarity namespace PresentValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace PresentValue namespace Reliability { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // enum8 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace Reliability namespace StatusFlags { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // bitmap8 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace StatusFlags namespace ApplicationType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace ApplicationType namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -393,15 +391,15 @@ namespace PulseWidthModulation { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -415,15 +413,15 @@ namespace Binding { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -433,9 +431,9 @@ namespace AccessControl { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap } // namespace Attributes @@ -445,21 +443,21 @@ namespace Actions { namespace Attributes { namespace SetupURL { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace SetupURL namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -469,33 +467,33 @@ namespace BasicInformation { namespace Attributes { namespace NodeLabel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace NodeLabel namespace LocalConfigDisabled { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace LocalConfigDisabled namespace Reachable { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace Reachable namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -505,15 +503,15 @@ namespace OtaSoftwareUpdateProvider { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -523,42 +521,41 @@ namespace OtaSoftwareUpdateRequestor { namespace Attributes { namespace UpdatePossible { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace UpdatePossible namespace UpdateState { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum * value); // UpdateStateEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum * value); // UpdateStateEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::OtaSoftwareUpdateRequestor::UpdateStateEnum value, MarkAttributeDirty markDirty); } // namespace UpdateState namespace UpdateStateProgress { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace UpdateStateProgress namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -568,21 +565,21 @@ namespace LocalizationConfiguration { namespace Attributes { namespace ActiveLocale { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace ActiveLocale namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -592,33 +589,31 @@ namespace TimeFormatLocalization { namespace Attributes { namespace HourFormat { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::HourFormatEnum * value); // HourFormatEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::TimeFormatLocalization::HourFormatEnum value); -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::HourFormatEnum value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::HourFormatEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::HourFormatEnum value, + MarkAttributeDirty markDirty); } // namespace HourFormat namespace ActiveCalendarType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum * value); // CalendarTypeEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum value); -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::TimeFormatLocalization::CalendarTypeEnum value, + MarkAttributeDirty markDirty); } // namespace ActiveCalendarType namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -628,23 +623,23 @@ namespace UnitLocalization { namespace Attributes { namespace TemperatureUnit { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnitEnum * value); // TempUnitEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnitEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnitEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnitEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::UnitLocalization::TempUnitEnum value, MarkAttributeDirty markDirty); } // namespace TemperatureUnit namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -654,15 +649,15 @@ namespace PowerSourceConfiguration { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -672,239 +667,237 @@ namespace PowerSource { namespace Attributes { namespace Status { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatusEnum * value); // PowerSourceStatusEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatusEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatusEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatusEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::PowerSourceStatusEnum value, MarkAttributeDirty markDirty); } // namespace Status namespace Order { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace Order namespace Description { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace Description namespace WiredAssessedInputVoltage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace WiredAssessedInputVoltage namespace WiredAssessedInputFrequency { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace WiredAssessedInputFrequency namespace WiredCurrentType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum * value); // WiredCurrentTypeEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::WiredCurrentTypeEnum value, MarkAttributeDirty markDirty); } // namespace WiredCurrentType namespace WiredAssessedCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace WiredAssessedCurrent namespace WiredNominalVoltage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace WiredNominalVoltage namespace WiredMaximumCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace WiredMaximumCurrent namespace WiredPresent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace WiredPresent namespace BatVoltage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace BatVoltage namespace BatPercentRemaining { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace BatPercentRemaining namespace BatTimeRemaining { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace BatTimeRemaining namespace BatChargeLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevelEnum * value); // BatChargeLevelEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevelEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevelEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevelEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeLevelEnum value, MarkAttributeDirty markDirty); } // namespace BatChargeLevel namespace BatReplacementNeeded { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace BatReplacementNeeded namespace BatReplaceability { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceabilityEnum * value); // BatReplaceabilityEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceabilityEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceabilityEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceabilityEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::BatReplaceabilityEnum value, MarkAttributeDirty markDirty); } // namespace BatReplaceability namespace BatPresent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace BatPresent namespace BatReplacementDescription { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace BatReplacementDescription namespace BatCommonDesignation { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatCommonDesignationEnum * value); // BatCommonDesignationEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::PowerSource::BatCommonDesignationEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatCommonDesignationEnum value, +Get(EndpointId endpoint, chip::app::Clusters::PowerSource::BatCommonDesignationEnum * value); // BatCommonDesignationEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::BatCommonDesignationEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::BatCommonDesignationEnum value, MarkAttributeDirty markDirty); } // namespace BatCommonDesignation namespace BatANSIDesignation { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace BatANSIDesignation namespace BatIECDesignation { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace BatIECDesignation namespace BatApprovedChemistry { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum * value); // BatApprovedChemistryEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value, +Get(EndpointId endpoint, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum * value); // BatApprovedChemistryEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::BatApprovedChemistryEnum value, MarkAttributeDirty markDirty); } // namespace BatApprovedChemistry namespace BatCapacity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace BatCapacity namespace BatQuantity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace BatQuantity namespace BatChargeState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeStateEnum * value); // BatChargeStateEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeStateEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeStateEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PowerSource::BatChargeStateEnum value, MarkAttributeDirty markDirty); } // namespace BatChargeState namespace BatTimeToFullCharge { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace BatTimeToFullCharge namespace BatFunctionalWhileCharging { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace BatFunctionalWhileCharging namespace BatChargingCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace BatChargingCurrent namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -914,45 +907,45 @@ namespace GeneralCommissioning { namespace Attributes { namespace Breadcrumb { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * value); // int64u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint64_t * value); // int64u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); } // namespace Breadcrumb namespace TCAcceptedVersion { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace TCAcceptedVersion namespace TCMinRequiredVersion { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace TCMinRequiredVersion namespace TCAcknowledgements { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // bitmap16 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // bitmap16 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace TCAcknowledgements namespace TCAcknowledgementsRequired { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace TCAcknowledgementsRequired namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -962,100 +955,99 @@ namespace NetworkCommissioning { namespace Attributes { namespace MaxNetworks { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MaxNetworks namespace ScanMaxTimeSeconds { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace ScanMaxTimeSeconds namespace ConnectMaxTimeSeconds { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace ConnectMaxTimeSeconds namespace InterfaceEnabled { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace InterfaceEnabled namespace LastNetworkingStatus { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, DataModel::Nullable & value); // NetworkCommissioningStatusEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::NetworkCommissioning::NetworkCommissioningStatusEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::NetworkCommissioning::NetworkCommissioningStatusEnum value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace LastNetworkingStatus namespace LastNetworkID { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - DataModel::Nullable & value); // octet_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // octet_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace LastNetworkID namespace LastConnectErrorValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int32s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace LastConnectErrorValue namespace SupportedThreadFeatures { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // ThreadCapabilitiesBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace SupportedThreadFeatures namespace ThreadVersion { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ThreadVersion namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1065,15 +1057,15 @@ namespace DiagnosticLogs { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1083,9 +1075,9 @@ namespace GeneralDiagnostics { namespace Attributes { namespace TestEventTriggersEnabled { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace TestEventTriggersEnabled } // namespace Attributes @@ -1095,9 +1087,9 @@ namespace SoftwareDiagnostics { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1107,15 +1099,15 @@ namespace ThreadNetworkDiagnostics { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1125,15 +1117,15 @@ namespace WiFiNetworkDiagnostics { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1143,15 +1135,15 @@ namespace EthernetNetworkDiagnostics { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1161,44 +1153,43 @@ namespace TimeSynchronization { namespace Attributes { namespace TimeSource { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum * value); // TimeSourceEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeSourceEnum value, MarkAttributeDirty markDirty); } // namespace TimeSource namespace TimeZoneDatabase { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum * value); // TimeZoneDatabaseEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum value); -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum value, MarkAttributeDirty markDirty); +Get(EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum * value); // TimeZoneDatabaseEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::TimeSynchronization::TimeZoneDatabaseEnum value, + MarkAttributeDirty markDirty); } // namespace TimeZoneDatabase namespace NTPServerAvailable { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace NTPServerAvailable namespace SupportsDNSResolve { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace SupportsDNSResolve namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1208,111 +1199,111 @@ namespace BridgedDeviceBasicInformation { namespace Attributes { namespace VendorName { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace VendorName namespace VendorID { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::VendorId * value); // vendor_id -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::VendorId * value); // vendor_id +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::VendorId value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::VendorId value, MarkAttributeDirty markDirty); } // namespace VendorID namespace ProductName { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace ProductName namespace ProductID { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ProductID namespace NodeLabel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace NodeLabel namespace HardwareVersion { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace HardwareVersion namespace HardwareVersionString { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace HardwareVersionString namespace SoftwareVersion { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace SoftwareVersion namespace SoftwareVersionString { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace SoftwareVersionString namespace ManufacturingDate { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace ManufacturingDate namespace PartNumber { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace PartNumber namespace ProductURL { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace ProductURL namespace ProductLabel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace ProductLabel namespace SerialNumber { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace SerialNumber namespace Reachable { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace Reachable namespace UniqueID { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace UniqueID namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1322,33 +1313,33 @@ namespace Switch { namespace Attributes { namespace NumberOfPositions { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfPositions namespace CurrentPosition { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace CurrentPosition namespace MultiPressMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MultiPressMax namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1358,15 +1349,15 @@ namespace AdministratorCommissioning { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1376,15 +1367,15 @@ namespace OperationalCredentials { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1398,15 +1389,15 @@ namespace FixedLabel { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1416,15 +1407,15 @@ namespace UserLabel { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1434,15 +1425,15 @@ namespace ProxyConfiguration { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1452,15 +1443,15 @@ namespace ProxyDiscovery { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1470,15 +1461,15 @@ namespace ProxyValid { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1488,21 +1479,21 @@ namespace BooleanState { namespace Attributes { namespace StateValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace StateValue namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1513,39 +1504,39 @@ namespace Attributes { namespace UserActiveModeTriggerHint { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // UserActiveModeTriggerBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace UserActiveModeTriggerHint namespace UserActiveModeTriggerInstruction { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace UserActiveModeTriggerInstruction namespace OperatingMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::IcdManagement::OperatingModeEnum * value); // OperatingModeEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::IcdManagement::OperatingModeEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::IcdManagement::OperatingModeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::IcdManagement::OperatingModeEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::IcdManagement::OperatingModeEnum value, MarkAttributeDirty markDirty); } // namespace OperatingMode namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1555,35 +1546,35 @@ namespace Timer { namespace Attributes { namespace SetTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // elapsed_s +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace SetTime namespace TimeRemaining { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // elapsed_s +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace TimeRemaining namespace TimerState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Timer::TimerStatusEnum * value); // TimerStatusEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Timer::TimerStatusEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Timer::TimerStatusEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Timer::TimerStatusEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Timer::TimerStatusEnum value, MarkAttributeDirty markDirty); } // namespace TimerState namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1593,15 +1584,15 @@ namespace OvenCavityOperationalState { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1611,43 +1602,43 @@ namespace OvenMode { namespace Attributes { namespace CurrentMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace CurrentMode namespace StartUpMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace StartUpMode namespace OnMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace OnMode namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1658,33 +1649,30 @@ namespace Attributes { namespace SelectedDrynessLevel { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, DataModel::Nullable & value); // DrynessLevelEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::LaundryDryerControls::DrynessLevelEnum value); -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryDryerControls::DrynessLevelEnum value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::LaundryDryerControls::DrynessLevelEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::LaundryDryerControls::DrynessLevelEnum value, + MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable & value); +Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable & value, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace SelectedDrynessLevel namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1694,60 +1682,60 @@ namespace ModeSelect { namespace Attributes { namespace Description { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace Description namespace StandardNamespace { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // enum16 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // enum16 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace StandardNamespace namespace CurrentMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace CurrentMode namespace StartUpMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace StartUpMode namespace OnMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace OnMode namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1757,9 +1745,9 @@ namespace LaundryWasherMode { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1769,9 +1757,9 @@ namespace RefrigeratorAndTemperatureControlledCabinetMode { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1781,35 +1769,34 @@ namespace LaundryWasherControls { namespace Attributes { namespace SpinSpeedCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace SpinSpeedCurrent namespace NumberOfRinses { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum * value); // NumberOfRinsesEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value); -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value, MarkAttributeDirty markDirty); +Get(EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum * value); // NumberOfRinsesEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::LaundryWasherControls::NumberOfRinsesEnum value, + MarkAttributeDirty markDirty); } // namespace NumberOfRinses namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1819,9 +1806,9 @@ namespace RvcRunMode { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1831,9 +1818,9 @@ namespace RvcCleanMode { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1843,45 +1830,45 @@ namespace TemperatureControl { namespace Attributes { namespace TemperatureSetpoint { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace TemperatureSetpoint namespace MinTemperature { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MinTemperature namespace MaxTemperature { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MaxTemperature namespace Step { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace Step namespace SelectedTemperatureLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace SelectedTemperatureLevel namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1891,45 +1878,42 @@ namespace RefrigeratorAlarm { namespace Attributes { namespace Mask { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value); // AlarmBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, - MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace Mask namespace State { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value); // AlarmBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, - MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace State namespace Supported { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value); // AlarmBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, - MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace Supported namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1939,9 +1923,9 @@ namespace DishwasherMode { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1951,9 +1935,9 @@ namespace AirQuality { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -1963,113 +1947,113 @@ namespace SmokeCoAlarm { namespace Attributes { namespace ExpressedState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum * value); // ExpressedStateEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ExpressedStateEnum value, MarkAttributeDirty markDirty); } // namespace ExpressedState namespace SmokeState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum * value); // AlarmStateEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, MarkAttributeDirty markDirty); } // namespace SmokeState namespace COState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum * value); // AlarmStateEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, MarkAttributeDirty markDirty); } // namespace COState namespace BatteryAlert { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum * value); // AlarmStateEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, MarkAttributeDirty markDirty); } // namespace BatteryAlert namespace DeviceMuted { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::MuteStateEnum * value); // MuteStateEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::MuteStateEnum value, MarkAttributeDirty markDirty); } // namespace DeviceMuted namespace TestInProgress { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace TestInProgress namespace HardwareFaultAlert { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace HardwareFaultAlert namespace EndOfServiceAlert { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum * value); // EndOfServiceEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::EndOfServiceEnum value, MarkAttributeDirty markDirty); } // namespace EndOfServiceAlert namespace InterconnectSmokeAlarm { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum * value); // AlarmStateEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, MarkAttributeDirty markDirty); } // namespace InterconnectSmokeAlarm namespace InterconnectCOAlarm { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum * value); // AlarmStateEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::AlarmStateEnum value, MarkAttributeDirty markDirty); } // namespace InterconnectCOAlarm namespace ContaminationState { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum * value); // ContaminationStateEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value, +Get(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum * value); // ContaminationStateEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::ContaminationStateEnum value, MarkAttributeDirty markDirty); } // namespace ContaminationState namespace SmokeSensitivityLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::SensitivityEnum * value); // SensitivityEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::SmokeCoAlarm::SensitivityEnum value, MarkAttributeDirty markDirty); } // namespace SmokeSensitivityLevel namespace ExpiryDate { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // epoch_s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // epoch_s +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace ExpiryDate namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2079,55 +2063,51 @@ namespace DishwasherAlarm { namespace Attributes { namespace Mask { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value); // AlarmBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace Mask namespace Latch { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value); // AlarmBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace Latch namespace State { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value); // AlarmBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace State namespace Supported { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value); // AlarmBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace Supported namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2137,9 +2117,9 @@ namespace MicrowaveOvenMode { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2149,9 +2129,9 @@ namespace MicrowaveOvenControl { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2161,15 +2141,15 @@ namespace OperationalState { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2179,15 +2159,15 @@ namespace RvcOperationalState { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2197,32 +2177,32 @@ namespace ScenesManagement { namespace Attributes { namespace LastConfiguredBy { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // node_id -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::NodeId value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::NodeId value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // node_id +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::NodeId value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::NodeId value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace LastConfiguredBy namespace SceneTableSize { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace SceneTableSize namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2232,9 +2212,9 @@ namespace HepaFilterMonitoring { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2244,9 +2224,9 @@ namespace ActivatedCarbonFilterMonitoring { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2256,82 +2236,78 @@ namespace BooleanStateConfiguration { namespace Attributes { namespace SupportedSensitivityLevels { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace SupportedSensitivityLevels namespace DefaultSensitivityLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace DefaultSensitivityLevel namespace AlarmsActive { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, - chip::BitMask * value); // AlarmModeBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // AlarmModeBitmap +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace AlarmsActive namespace AlarmsSuppressed { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, - chip::BitMask * value); // AlarmModeBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // AlarmModeBitmap +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace AlarmsSuppressed namespace AlarmsEnabled { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, - chip::BitMask * value); // AlarmModeBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // AlarmModeBitmap +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace AlarmsEnabled namespace AlarmsSupported { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, - chip::BitMask * value); // AlarmModeBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // AlarmModeBitmap +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace AlarmsSupported namespace SensorFault { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // SensorFaultBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace SensorFault namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2341,133 +2317,131 @@ namespace ValveConfigurationAndControl { namespace Attributes { namespace OpenDuration { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // elapsed_s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // elapsed_s +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace OpenDuration namespace DefaultOpenDuration { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // elapsed_s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // elapsed_s +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace DefaultOpenDuration namespace AutoCloseTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_us -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // epoch_us +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace AutoCloseTime namespace CurrentState { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, DataModel::Nullable & value); // ValveStateEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value, - MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status +Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace CurrentState namespace TargetState { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, DataModel::Nullable & value); // ValveStateEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value, - MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, chip::app::Clusters::ValveConfigurationAndControl::ValveStateEnum value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status +Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace TargetState namespace CurrentLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // percent +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace CurrentLevel namespace TargetLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // percent +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace TargetLevel namespace DefaultOpenLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Percent * value); // percent -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::Percent * value); // percent +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); } // namespace DefaultOpenLevel namespace ValveFault { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // ValveFaultBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace ValveFault namespace LevelStep { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace LevelStep namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2477,9 +2451,9 @@ namespace ElectricalPowerMeasurement { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2489,9 +2463,9 @@ namespace ElectricalEnergyMeasurement { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2505,45 +2479,45 @@ namespace DemandResponseLoadControl { namespace Attributes { namespace NumberOfLoadControlPrograms { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfLoadControlPrograms namespace NumberOfEventsPerProgram { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfEventsPerProgram namespace NumberOfTransitions { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfTransitions namespace DefaultRandomStart { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace DefaultRandomStart namespace DefaultRandomDuration { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace DefaultRandomDuration namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2553,15 +2527,15 @@ namespace Messages { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2571,9 +2545,9 @@ namespace DeviceEnergyManagement { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2583,9 +2557,9 @@ namespace EnergyEvse { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2595,27 +2569,27 @@ namespace EnergyPreference { namespace Attributes { namespace CurrentEnergyBalance { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace CurrentEnergyBalance namespace CurrentLowPowerModeSensitivity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace CurrentLowPowerModeSensitivity namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2625,9 +2599,9 @@ namespace PowerTopology { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2637,31 +2611,31 @@ namespace EnergyEvseMode { namespace Attributes { namespace StartUpMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace StartUpMode namespace OnMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace OnMode namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2671,31 +2645,31 @@ namespace WaterHeaterMode { namespace Attributes { namespace StartUpMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace StartUpMode namespace OnMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace OnMode namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2705,31 +2679,31 @@ namespace DeviceEnergyManagementMode { namespace Attributes { namespace StartUpMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace StartUpMode namespace OnMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace OnMode namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -2739,271 +2713,270 @@ namespace DoorLock { namespace Attributes { namespace LockState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // DlLockState -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockState value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockState value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockState value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockState value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace LockState namespace LockType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType * value); // DlLockType -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType * value); // DlLockType +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::DoorLock::DlLockType value, MarkAttributeDirty markDirty); } // namespace LockType namespace ActuatorEnabled { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace ActuatorEnabled namespace DoorState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // DoorStateEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DoorStateEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::DoorStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::DoorLock::DoorStateEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::DoorLock::DoorStateEnum value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace DoorState namespace DoorOpenEvents { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace DoorOpenEvents namespace DoorClosedEvents { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace DoorClosedEvents namespace OpenPeriod { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace OpenPeriod namespace NumberOfTotalUsersSupported { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace NumberOfTotalUsersSupported namespace NumberOfPINUsersSupported { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace NumberOfPINUsersSupported namespace NumberOfRFIDUsersSupported { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace NumberOfRFIDUsersSupported namespace NumberOfWeekDaySchedulesSupportedPerUser { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfWeekDaySchedulesSupportedPerUser namespace NumberOfYearDaySchedulesSupportedPerUser { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfYearDaySchedulesSupportedPerUser namespace NumberOfHolidaySchedulesSupported { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfHolidaySchedulesSupported namespace MaxPINCodeLength { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MaxPINCodeLength namespace MinPINCodeLength { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MinPINCodeLength namespace MaxRFIDCodeLength { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MaxRFIDCodeLength namespace MinRFIDCodeLength { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MinRFIDCodeLength namespace CredentialRulesSupport { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::BitMask * value); // DlCredentialRuleMask -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // DlCredentialRuleMask +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, - MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace CredentialRulesSupport namespace NumberOfCredentialsSupportedPerUser { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfCredentialsSupportedPerUser namespace Language { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace Language namespace LEDSettings { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace LEDSettings namespace AutoRelockTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace AutoRelockTime namespace SoundVolume { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace SoundVolume namespace OperatingMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::DoorLock::OperatingModeEnum * value); // OperatingModeEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::OperatingModeEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::DoorLock::OperatingModeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::DoorLock::OperatingModeEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::DoorLock::OperatingModeEnum value, MarkAttributeDirty markDirty); } // namespace OperatingMode namespace SupportedOperatingModes { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // DlSupportedOperatingModes -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace SupportedOperatingModes namespace DefaultConfigurationRegister { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // DlDefaultConfigurationRegister -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace DefaultConfigurationRegister namespace EnableLocalProgramming { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace EnableLocalProgramming namespace EnableOneTouchLocking { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace EnableOneTouchLocking namespace EnableInsideStatusLED { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace EnableInsideStatusLED namespace EnablePrivacyModeButton { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace EnablePrivacyModeButton namespace LocalProgrammingFeatures { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // DlLocalProgrammingFeatures -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace LocalProgrammingFeatures namespace WrongCodeEntryLimit { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace WrongCodeEntryLimit namespace UserCodeTemporaryDisableTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace UserCodeTemporaryDisableTime namespace SendPINOverTheAir { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace SendPINOverTheAir namespace RequirePINforRemoteOperation { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace RequirePINforRemoteOperation namespace ExpiringUserTimeout { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ExpiringUserTimeout namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -3013,212 +2986,201 @@ namespace WindowCovering { namespace Attributes { namespace Type { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::Type * value); // Type -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::Type value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::Type value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::WindowCovering::Type * value); // Type +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::WindowCovering::Type value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::WindowCovering::Type value, MarkAttributeDirty markDirty); } // namespace Type namespace PhysicalClosedLimitLift { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace PhysicalClosedLimitLift namespace PhysicalClosedLimitTilt { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace PhysicalClosedLimitTilt namespace CurrentPositionLift { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace CurrentPositionLift namespace CurrentPositionTilt { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace CurrentPositionTilt namespace NumberOfActuationsLift { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace NumberOfActuationsLift namespace NumberOfActuationsTilt { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace NumberOfActuationsTilt namespace ConfigStatus { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value); // ConfigStatus -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace ConfigStatus namespace CurrentPositionLiftPercentage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // percent +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace CurrentPositionLiftPercentage namespace CurrentPositionTiltPercentage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // percent +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace CurrentPositionTiltPercentage namespace OperationalStatus { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::BitMask * value); // OperationalStatus -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // OperationalStatus +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, - MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace OperationalStatus namespace TargetPositionLiftPercent100ths { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - DataModel::Nullable & value); // percent100ths -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // percent100ths +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent100ths value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace TargetPositionLiftPercent100ths namespace TargetPositionTiltPercent100ths { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - DataModel::Nullable & value); // percent100ths -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // percent100ths +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent100ths value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace TargetPositionTiltPercent100ths namespace EndProductType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::WindowCovering::EndProductType * value); // EndProductType -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::EndProductType value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::WindowCovering::EndProductType value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::WindowCovering::EndProductType value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::WindowCovering::EndProductType value, MarkAttributeDirty markDirty); } // namespace EndProductType namespace CurrentPositionLiftPercent100ths { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - DataModel::Nullable & value); // percent100ths -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // percent100ths +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent100ths value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace CurrentPositionLiftPercent100ths namespace CurrentPositionTiltPercent100ths { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - DataModel::Nullable & value); // percent100ths -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // percent100ths +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent100ths value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent100ths value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, + MarkAttributeDirty markDirty); } // namespace CurrentPositionTiltPercent100ths namespace InstalledOpenLimitLift { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace InstalledOpenLimitLift namespace InstalledClosedLimitLift { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace InstalledClosedLimitLift namespace InstalledOpenLimitTilt { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace InstalledOpenLimitTilt namespace InstalledClosedLimitTilt { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace InstalledClosedLimitTilt namespace Mode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value); // Mode -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace Mode namespace SafetyStatus { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value); // SafetyStatus -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace SafetyStatus namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -3228,75 +3190,75 @@ namespace BarrierControl { namespace Attributes { namespace BarrierMovingState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // enum8 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace BarrierMovingState namespace BarrierSafetyStatus { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // bitmap16 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // bitmap16 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace BarrierSafetyStatus namespace BarrierCapabilities { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // bitmap8 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace BarrierCapabilities namespace BarrierOpenEvents { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace BarrierOpenEvents namespace BarrierCloseEvents { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace BarrierCloseEvents namespace BarrierCommandOpenEvents { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace BarrierCommandOpenEvents namespace BarrierCommandCloseEvents { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace BarrierCommandCloseEvents namespace BarrierOpenPeriod { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace BarrierOpenPeriod namespace BarrierClosePeriod { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace BarrierClosePeriod namespace BarrierPosition { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace BarrierPosition namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -3306,9 +3268,9 @@ namespace ServiceArea { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -3318,264 +3280,260 @@ namespace PumpConfigurationAndControl { namespace Attributes { namespace MaxPressure { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MaxPressure namespace MaxSpeed { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MaxSpeed namespace MaxFlow { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MaxFlow namespace MinConstPressure { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MinConstPressure namespace MaxConstPressure { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MaxConstPressure namespace MinCompPressure { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MinCompPressure namespace MaxCompPressure { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MaxCompPressure namespace MinConstSpeed { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MinConstSpeed namespace MaxConstSpeed { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MaxConstSpeed namespace MinConstFlow { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MinConstFlow namespace MaxConstFlow { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MaxConstFlow namespace MinConstTemp { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MinConstTemp namespace MaxConstTemp { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MaxConstTemp namespace PumpStatus { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // PumpStatusBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace PumpStatus namespace EffectiveOperationMode { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum * value); // OperationModeEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum * value); // OperationModeEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value, - MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value, MarkAttributeDirty markDirty); } // namespace EffectiveOperationMode namespace EffectiveControlMode { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum * value); // ControlModeEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum * value); // ControlModeEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value, - MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value, MarkAttributeDirty markDirty); } // namespace EffectiveControlMode namespace Capacity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace Capacity namespace Speed { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace Speed namespace LifetimeRunningHours { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int24u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace LifetimeRunningHours namespace Power { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int24u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace Power namespace LifetimeEnergyConsumed { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace LifetimeEnergyConsumed namespace OperationMode { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum * value); // OperationModeEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum * value); // OperationModeEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value, - MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::OperationModeEnum value, MarkAttributeDirty markDirty); } // namespace OperationMode namespace ControlMode { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum * value); // ControlModeEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum * value); // ControlModeEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value, - MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::app::Clusters::PumpConfigurationAndControl::ControlModeEnum value, MarkAttributeDirty markDirty); } // namespace ControlMode namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -3585,479 +3543,466 @@ namespace Thermostat { namespace Attributes { namespace LocalTemperature { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace LocalTemperature namespace OutdoorTemperature { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace OutdoorTemperature namespace Occupancy { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value); // OccupancyBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value); -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace Occupancy namespace AbsMinHeatSetpointLimit { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace AbsMinHeatSetpointLimit namespace AbsMaxHeatSetpointLimit { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace AbsMaxHeatSetpointLimit namespace AbsMinCoolSetpointLimit { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace AbsMinCoolSetpointLimit namespace AbsMaxCoolSetpointLimit { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace AbsMaxCoolSetpointLimit namespace PICoolingDemand { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace PICoolingDemand namespace PIHeatingDemand { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace PIHeatingDemand namespace HVACSystemTypeConfiguration { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, - chip::BitMask * value); // HVACSystemTypeBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // HVACSystemTypeBitmap +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, - MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace HVACSystemTypeConfiguration namespace LocalTemperatureCalibration { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value); // int8s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value); // int8s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); } // namespace LocalTemperatureCalibration namespace OccupiedCoolingSetpoint { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace OccupiedCoolingSetpoint namespace OccupiedHeatingSetpoint { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace OccupiedHeatingSetpoint namespace UnoccupiedCoolingSetpoint { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace UnoccupiedCoolingSetpoint namespace UnoccupiedHeatingSetpoint { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace UnoccupiedHeatingSetpoint namespace MinHeatSetpointLimit { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MinHeatSetpointLimit namespace MaxHeatSetpointLimit { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MaxHeatSetpointLimit namespace MinCoolSetpointLimit { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MinCoolSetpointLimit namespace MaxCoolSetpointLimit { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MaxCoolSetpointLimit namespace MinSetpointDeadBand { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value); // int8s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value); // int8s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); } // namespace MinSetpointDeadBand namespace RemoteSensing { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::BitMask * value); // RemoteSensingBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // RemoteSensingBitmap +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, - MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace RemoteSensing namespace ControlSequenceOfOperation { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, - chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum * value); // ControlSequenceOfOperationEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value); -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value, MarkAttributeDirty markDirty); +Get(EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum * value); // ControlSequenceOfOperationEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ControlSequenceOfOperationEnum value, + MarkAttributeDirty markDirty); } // namespace ControlSequenceOfOperation namespace SystemMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum * value); // SystemModeEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::SystemModeEnum value, MarkAttributeDirty markDirty); } // namespace SystemMode namespace ThermostatRunningMode { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum * value); // ThermostatRunningModeEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value, +Get(EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum * value); // ThermostatRunningModeEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ThermostatRunningModeEnum value, MarkAttributeDirty markDirty); } // namespace ThermostatRunningMode namespace StartOfWeek { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum * value); // StartOfWeekEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::StartOfWeekEnum value, MarkAttributeDirty markDirty); } // namespace StartOfWeek namespace NumberOfWeeklyTransitions { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfWeeklyTransitions namespace NumberOfDailyTransitions { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfDailyTransitions namespace TemperatureSetpointHold { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum * value); // TemperatureSetpointHoldEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value); -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value, MarkAttributeDirty markDirty); +Get(EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum * value); // TemperatureSetpointHoldEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::TemperatureSetpointHoldEnum value, + MarkAttributeDirty markDirty); } // namespace TemperatureSetpointHold namespace TemperatureSetpointHoldDuration { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace TemperatureSetpointHoldDuration namespace ThermostatProgrammingOperationMode { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // ProgrammingOperationModeBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace ThermostatProgrammingOperationMode namespace ThermostatRunningState { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::BitMask * value); // RelayStateBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // RelayStateBitmap +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace ThermostatRunningState namespace SetpointChangeSource { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum * value); // SetpointChangeSourceEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value, +Get(EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum * value); // SetpointChangeSourceEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::SetpointChangeSourceEnum value, MarkAttributeDirty markDirty); } // namespace SetpointChangeSource namespace SetpointChangeAmount { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace SetpointChangeAmount namespace SetpointChangeSourceTimestamp { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // epoch_s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // epoch_s +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace SetpointChangeSourceTimestamp namespace OccupiedSetback { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace OccupiedSetback namespace OccupiedSetbackMin { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace OccupiedSetbackMin namespace OccupiedSetbackMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace OccupiedSetbackMax namespace UnoccupiedSetback { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace UnoccupiedSetback namespace UnoccupiedSetbackMin { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace UnoccupiedSetbackMin namespace UnoccupiedSetbackMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace UnoccupiedSetbackMax namespace EmergencyHeatDelta { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace EmergencyHeatDelta namespace ACType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - chip::app::Clusters::Thermostat::ACTypeEnum * value); // ACTypeEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum * value); // ACTypeEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ACTypeEnum value, MarkAttributeDirty markDirty); } // namespace ACType namespace ACCapacity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ACCapacity namespace ACRefrigerantType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum * value); // ACRefrigerantTypeEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ACRefrigerantTypeEnum value, MarkAttributeDirty markDirty); } // namespace ACRefrigerantType namespace ACCompressorType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum * value); // ACCompressorTypeEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ACCompressorTypeEnum value, MarkAttributeDirty markDirty); } // namespace ACCompressorType namespace ACErrorCode { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::BitMask * value); // ACErrorCodeBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // ACErrorCodeBitmap +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, - MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace ACErrorCode namespace ACLouverPosition { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum * value); // ACLouverPositionEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ACLouverPositionEnum value, MarkAttributeDirty markDirty); } // namespace ACLouverPosition namespace ACCoilTemperature { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace ACCoilTemperature namespace ACCapacityformat { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum * value); // ACCapacityFormatEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Thermostat::ACCapacityFormatEnum value, MarkAttributeDirty markDirty); } // namespace ACCapacityformat namespace NumberOfPresets { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfPresets namespace NumberOfSchedules { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfSchedules namespace NumberOfScheduleTransitions { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace NumberOfScheduleTransitions namespace NumberOfScheduleTransitionPerDay { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NumberOfScheduleTransitionPerDay namespace ActivePresetHandle { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - DataModel::Nullable & value); // octet_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // octet_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace ActivePresetHandle namespace ActiveScheduleHandle { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - DataModel::Nullable & value); // octet_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // octet_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace ActiveScheduleHandle namespace SetpointHoldExpiryTimestamp { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // epoch_s +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace SetpointHoldExpiryTimestamp namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4067,115 +4012,110 @@ namespace FanControl { namespace Attributes { namespace FanMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - chip::app::Clusters::FanControl::FanModeEnum * value); // FanModeEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeEnum value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::FanControl::FanModeEnum * value); // FanModeEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::FanControl::FanModeEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::FanControl::FanModeEnum value, MarkAttributeDirty markDirty); } // namespace FanMode namespace FanModeSequence { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceEnum * value); // FanModeSequenceEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::FanControl::FanModeSequenceEnum value, MarkAttributeDirty markDirty); } // namespace FanModeSequence namespace PercentSetting { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // percent -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // percent +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace PercentSetting namespace PercentCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::Percent * value); // percent -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::Percent * value); // percent +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::Percent value, MarkAttributeDirty markDirty); } // namespace PercentCurrent namespace SpeedMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace SpeedMax namespace SpeedSetting { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace SpeedSetting namespace SpeedCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace SpeedCurrent namespace RockSupport { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value); // RockBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace RockSupport namespace RockSetting { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value); // RockBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace RockSetting namespace WindSupport { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value); // WindBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace WindSupport namespace WindSetting { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value); // WindBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace WindSetting namespace AirflowDirection { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::FanControl::AirflowDirectionEnum * value); // AirflowDirectionEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::AirflowDirectionEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::FanControl::AirflowDirectionEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::FanControl::AirflowDirectionEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::FanControl::AirflowDirectionEnum value, MarkAttributeDirty markDirty); } // namespace AirflowDirection namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4186,48 +4126,47 @@ namespace Attributes { namespace TemperatureDisplayMode { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum * value); // TemperatureDisplayModeEnum Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::TemperatureDisplayModeEnum value, MarkAttributeDirty markDirty); } // namespace TemperatureDisplayMode namespace KeypadLockout { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, - chip::app::Clusters::ThermostatUserInterfaceConfiguration::KeypadLockoutEnum * value); // KeypadLockoutEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::KeypadLockoutEnum * value); // KeypadLockoutEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::KeypadLockoutEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::KeypadLockoutEnum value, MarkAttributeDirty markDirty); } // namespace KeypadLockout namespace ScheduleProgrammingVisibility { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum * value); // ScheduleProgrammingVisibilityEnum Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum value); +Set(EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum value); Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum value, +Set(EndpointId endpoint, chip::app::Clusters::ThermostatUserInterfaceConfiguration::ScheduleProgrammingVisibilityEnum value, MarkAttributeDirty markDirty); } // namespace ScheduleProgrammingVisibility namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4237,396 +4176,395 @@ namespace ColorControl { namespace Attributes { namespace CurrentHue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace CurrentHue namespace CurrentSaturation { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace CurrentSaturation namespace RemainingTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RemainingTime namespace CurrentX { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace CurrentX namespace CurrentY { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace CurrentY namespace DriftCompensation { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::ColorControl::DriftCompensationEnum * value); // DriftCompensationEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::DriftCompensationEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::DriftCompensationEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ColorControl::DriftCompensationEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ColorControl::DriftCompensationEnum value, MarkAttributeDirty markDirty); } // namespace DriftCompensation namespace CompensationText { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace CompensationText namespace ColorTemperatureMireds { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorTemperatureMireds namespace ColorMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::ColorControl::ColorModeEnum * value); // ColorModeEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::ColorModeEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::ColorModeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ColorControl::ColorModeEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ColorControl::ColorModeEnum value, MarkAttributeDirty markDirty); } // namespace ColorMode namespace Options { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value); // OptionsBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value); -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace Options namespace NumberOfPrimaries { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NumberOfPrimaries namespace Primary1X { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary1X namespace Primary1Y { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary1Y namespace Primary1Intensity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace Primary1Intensity namespace Primary2X { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary2X namespace Primary2Y { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary2Y namespace Primary2Intensity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace Primary2Intensity namespace Primary3X { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary3X namespace Primary3Y { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary3Y namespace Primary3Intensity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace Primary3Intensity namespace Primary4X { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary4X namespace Primary4Y { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary4Y namespace Primary4Intensity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace Primary4Intensity namespace Primary5X { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary5X namespace Primary5Y { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary5Y namespace Primary5Intensity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace Primary5Intensity namespace Primary6X { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary6X namespace Primary6Y { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Primary6Y namespace Primary6Intensity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace Primary6Intensity namespace WhitePointX { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace WhitePointX namespace WhitePointY { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace WhitePointY namespace ColorPointRX { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorPointRX namespace ColorPointRY { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorPointRY namespace ColorPointRIntensity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace ColorPointRIntensity namespace ColorPointGX { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorPointGX namespace ColorPointGY { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorPointGY namespace ColorPointGIntensity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace ColorPointGIntensity namespace ColorPointBX { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorPointBX namespace ColorPointBY { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorPointBY namespace ColorPointBIntensity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace ColorPointBIntensity namespace EnhancedCurrentHue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace EnhancedCurrentHue namespace EnhancedColorMode { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::ColorControl::EnhancedColorModeEnum * value); // EnhancedColorModeEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::EnhancedColorModeEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::ColorControl::EnhancedColorModeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ColorControl::EnhancedColorModeEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ColorControl::EnhancedColorModeEnum value, MarkAttributeDirty markDirty); } // namespace EnhancedColorMode namespace ColorLoopActive { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace ColorLoopActive namespace ColorLoopDirection { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace ColorLoopDirection namespace ColorLoopTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorLoopTime namespace ColorLoopStartEnhancedHue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorLoopStartEnhancedHue namespace ColorLoopStoredEnhancedHue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorLoopStoredEnhancedHue namespace ColorCapabilities { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // ColorCapabilitiesBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace ColorCapabilities namespace ColorTempPhysicalMinMireds { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorTempPhysicalMinMireds namespace ColorTempPhysicalMaxMireds { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ColorTempPhysicalMaxMireds namespace CoupleColorTempToLevelMinMireds { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace CoupleColorTempToLevelMinMireds namespace StartUpColorTemperatureMireds { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace StartUpColorTemperatureMireds namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4636,134 +4574,134 @@ namespace BallastConfiguration { namespace Attributes { namespace PhysicalMinLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace PhysicalMinLevel namespace PhysicalMaxLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace PhysicalMaxLevel namespace BallastStatus { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // BallastStatusBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace BallastStatus namespace MinLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MinLevel namespace MaxLevel { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MaxLevel namespace IntrinsicBallastFactor { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace IntrinsicBallastFactor namespace BallastFactorAdjustment { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace BallastFactorAdjustment namespace LampQuantity { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace LampQuantity namespace LampType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace LampType namespace LampManufacturer { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace LampManufacturer namespace LampRatedHours { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int24u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace LampRatedHours namespace LampBurnHours { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int24u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace LampBurnHours namespace LampAlarmMode { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // LampAlarmModeBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace LampAlarmMode namespace LampBurnHoursTripPoint { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int24u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace LampBurnHoursTripPoint namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4773,74 +4711,73 @@ namespace IlluminanceMeasurement { namespace Attributes { namespace MeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MeasuredValue namespace MinMeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MinMeasuredValue namespace MaxMeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MaxMeasuredValue namespace Tolerance { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Tolerance namespace LightSensorType { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, DataModel::Nullable & value); // LightSensorTypeEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::IlluminanceMeasurement::LightSensorTypeEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::IlluminanceMeasurement::LightSensorTypeEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::IlluminanceMeasurement::LightSensorTypeEnum value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace LightSensorType namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4850,54 +4787,54 @@ namespace TemperatureMeasurement { namespace Attributes { namespace MeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MeasuredValue namespace MinMeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MinMeasuredValue namespace MaxMeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // temperature -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // temperature +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MaxMeasuredValue namespace Tolerance { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Tolerance namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -4907,99 +4844,99 @@ namespace PressureMeasurement { namespace Attributes { namespace MeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MeasuredValue namespace MinMeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MinMeasuredValue namespace MaxMeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MaxMeasuredValue namespace Tolerance { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Tolerance namespace ScaledValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace ScaledValue namespace MinScaledValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MinScaledValue namespace MaxScaledValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MaxScaledValue namespace ScaledTolerance { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ScaledTolerance namespace Scale { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value); // int8s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value); // int8s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); } // namespace Scale namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5009,54 +4946,54 @@ namespace FlowMeasurement { namespace Attributes { namespace MeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MeasuredValue namespace MinMeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MinMeasuredValue namespace MaxMeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MaxMeasuredValue namespace Tolerance { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Tolerance namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5066,54 +5003,54 @@ namespace RelativeHumidityMeasurement { namespace Attributes { namespace MeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MeasuredValue namespace MinMeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MinMeasuredValue namespace MaxMeasuredValue { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace MaxMeasuredValue namespace Tolerance { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Tolerance namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5124,92 +5061,90 @@ namespace Attributes { namespace Occupancy { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::BitMask * value); // OccupancyBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // OccupancyBitmap +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, - MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status +Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace Occupancy namespace OccupancySensorType { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum * value); // OccupancySensorTypeEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum value); -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum value, MarkAttributeDirty markDirty); +Get(EndpointId endpoint, chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum * value); // OccupancySensorTypeEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::OccupancySensing::OccupancySensorTypeEnum value, + MarkAttributeDirty markDirty); } // namespace OccupancySensorType namespace OccupancySensorTypeBitmap { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // OccupancySensorTypeBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace OccupancySensorTypeBitmap namespace PIROccupiedToUnoccupiedDelay { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace PIROccupiedToUnoccupiedDelay namespace PIRUnoccupiedToOccupiedDelay { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace PIRUnoccupiedToOccupiedDelay namespace PIRUnoccupiedToOccupiedThreshold { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace PIRUnoccupiedToOccupiedThreshold namespace UltrasonicOccupiedToUnoccupiedDelay { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace UltrasonicOccupiedToUnoccupiedDelay namespace UltrasonicUnoccupiedToOccupiedDelay { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace UltrasonicUnoccupiedToOccupiedDelay namespace UltrasonicUnoccupiedToOccupiedThreshold { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace UltrasonicUnoccupiedToOccupiedThreshold namespace PhysicalContactOccupiedToUnoccupiedDelay { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace PhysicalContactOccupiedToUnoccupiedDelay namespace PhysicalContactUnoccupiedToOccupiedDelay { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace PhysicalContactUnoccupiedToOccupiedDelay namespace PhysicalContactUnoccupiedToOccupiedThreshold { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace PhysicalContactUnoccupiedToOccupiedThreshold namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5219,9 +5154,9 @@ namespace CarbonMonoxideConcentrationMeasurement { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5231,9 +5166,9 @@ namespace CarbonDioxideConcentrationMeasurement { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5243,9 +5178,9 @@ namespace NitrogenDioxideConcentrationMeasurement { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5255,9 +5190,9 @@ namespace OzoneConcentrationMeasurement { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5267,9 +5202,9 @@ namespace Pm25ConcentrationMeasurement { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5279,9 +5214,9 @@ namespace FormaldehydeConcentrationMeasurement { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5291,9 +5226,9 @@ namespace Pm1ConcentrationMeasurement { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5303,9 +5238,9 @@ namespace Pm10ConcentrationMeasurement { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5315,9 +5250,9 @@ namespace TotalVolatileOrganicCompoundsConcentrationMeasurement { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5327,9 +5262,9 @@ namespace RadonConcentrationMeasurement { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5339,15 +5274,15 @@ namespace WiFiNetworkManagement { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5357,9 +5292,9 @@ namespace ThreadBorderRouterManagement { namespace Attributes { namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5369,15 +5304,15 @@ namespace ThreadNetworkDirectory { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5387,27 +5322,27 @@ namespace WakeOnLan { namespace Attributes { namespace MACAddress { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace MACAddress namespace LinkLocalAddress { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableByteSpan & value); // octet_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableByteSpan & value); // octet_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); } // namespace LinkLocalAddress namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5417,15 +5352,15 @@ namespace Channel { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5435,21 +5370,21 @@ namespace TargetNavigator { namespace Attributes { namespace CurrentTarget { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace CurrentTarget namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5459,73 +5394,73 @@ namespace MediaPlayback { namespace Attributes { namespace CurrentState { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum * value); // PlaybackStateEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::MediaPlayback::PlaybackStateEnum value, MarkAttributeDirty markDirty); } // namespace CurrentState namespace StartTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_us -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // epoch_us +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace StartTime namespace Duration { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int64u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int64u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace Duration namespace PlaybackSpeed { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, float * value); // single -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, float * value); // single +Protocols::InteractionModel::Status Set(EndpointId endpoint, float value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, float value, MarkAttributeDirty markDirty); } // namespace PlaybackSpeed namespace SeekRangeEnd { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int64u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int64u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace SeekRangeEnd namespace SeekRangeStart { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int64u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int64u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace SeekRangeStart namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5535,21 +5470,21 @@ namespace MediaInput { namespace Attributes { namespace CurrentInput { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace CurrentInput namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5559,15 +5494,15 @@ namespace LowPower { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5577,15 +5512,15 @@ namespace KeypadInput { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5596,25 +5531,25 @@ namespace Attributes { namespace SupportedStreamingProtocols { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // SupportedProtocolsBitmap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace SupportedStreamingProtocols namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5624,21 +5559,21 @@ namespace AudioOutput { namespace Attributes { namespace CurrentOutput { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace CurrentOutput namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5648,15 +5583,15 @@ namespace ApplicationLauncher { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5666,54 +5601,53 @@ namespace ApplicationBasic { namespace Attributes { namespace VendorName { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace VendorName namespace VendorID { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::VendorId * value); // vendor_id -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::VendorId * value); // vendor_id +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::VendorId value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::VendorId value, MarkAttributeDirty markDirty); } // namespace VendorID namespace ApplicationName { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace ApplicationName namespace ProductID { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ProductID namespace Status { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum * value); // ApplicationStatusEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value); -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value, MarkAttributeDirty markDirty); +Get(EndpointId endpoint, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum * value); // ApplicationStatusEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::ApplicationBasic::ApplicationStatusEnum value, + MarkAttributeDirty markDirty); } // namespace Status namespace ApplicationVersion { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace ApplicationVersion namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5723,15 +5657,15 @@ namespace AccountLogin { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5741,51 +5675,51 @@ namespace ContentControl { namespace Attributes { namespace Enabled { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace Enabled namespace OnDemandRatingThreshold { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace OnDemandRatingThreshold namespace ScheduledContentRatingThreshold { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace ScheduledContentRatingThreshold namespace ScreenDailyTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // elapsed_s +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace ScreenDailyTime namespace RemainingScreenTime { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // elapsed_s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // elapsed_s +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace RemainingScreenTime namespace BlockUnrated { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace BlockUnrated namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5795,15 +5729,15 @@ namespace ContentAppObserver { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5812,27 +5746,16 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t valu namespace EcosystemInformation { namespace Attributes { -namespace RemovedOn { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // epoch_us -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, - MarkAttributeDirty markDirty); -} // namespace RemovedOn - namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5842,26 +5765,26 @@ namespace CommissionerControl { namespace Attributes { namespace SupportedDeviceCategories { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value); // SupportedDeviceCategoryBitmap Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value); +Set(EndpointId endpoint, chip::BitMask value); Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, +Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace SupportedDeviceCategories namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -5871,783 +5794,783 @@ namespace ElectricalMeasurement { namespace Attributes { namespace MeasurementType { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace MeasurementType namespace DcVoltage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace DcVoltage namespace DcVoltageMin { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace DcVoltageMin namespace DcVoltageMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace DcVoltageMax namespace DcCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace DcCurrent namespace DcCurrentMin { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace DcCurrentMin namespace DcCurrentMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace DcCurrentMax namespace DcPower { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace DcPower namespace DcPowerMin { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace DcPowerMin namespace DcPowerMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace DcPowerMax namespace DcVoltageMultiplier { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace DcVoltageMultiplier namespace DcVoltageDivisor { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace DcVoltageDivisor namespace DcCurrentMultiplier { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace DcCurrentMultiplier namespace DcCurrentDivisor { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace DcCurrentDivisor namespace DcPowerMultiplier { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace DcPowerMultiplier namespace DcPowerDivisor { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace DcPowerDivisor namespace AcFrequency { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcFrequency namespace AcFrequencyMin { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcFrequencyMin namespace AcFrequencyMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcFrequencyMax namespace NeutralCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace NeutralCurrent namespace TotalActivePower { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int32_t * value); // int32s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int32_t * value); // int32s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); } // namespace TotalActivePower namespace TotalReactivePower { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int32_t * value); // int32s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int32_t * value); // int32s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); } // namespace TotalReactivePower namespace TotalApparentPower { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace TotalApparentPower namespace Measured1stHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace Measured1stHarmonicCurrent namespace Measured3rdHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace Measured3rdHarmonicCurrent namespace Measured5thHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace Measured5thHarmonicCurrent namespace Measured7thHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace Measured7thHarmonicCurrent namespace Measured9thHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace Measured9thHarmonicCurrent namespace Measured11thHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace Measured11thHarmonicCurrent namespace MeasuredPhase1stHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MeasuredPhase1stHarmonicCurrent namespace MeasuredPhase3rdHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MeasuredPhase3rdHarmonicCurrent namespace MeasuredPhase5thHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MeasuredPhase5thHarmonicCurrent namespace MeasuredPhase7thHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MeasuredPhase7thHarmonicCurrent namespace MeasuredPhase9thHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MeasuredPhase9thHarmonicCurrent namespace MeasuredPhase11thHarmonicCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace MeasuredPhase11thHarmonicCurrent namespace AcFrequencyMultiplier { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcFrequencyMultiplier namespace AcFrequencyDivisor { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcFrequencyDivisor namespace PowerMultiplier { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace PowerMultiplier namespace PowerDivisor { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace PowerDivisor namespace HarmonicCurrentMultiplier { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value); // int8s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value); // int8s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); } // namespace HarmonicCurrentMultiplier namespace PhaseHarmonicCurrentMultiplier { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value); // int8s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value); // int8s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); } // namespace PhaseHarmonicCurrentMultiplier namespace InstantaneousVoltage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace InstantaneousVoltage namespace InstantaneousLineCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace InstantaneousLineCurrent namespace InstantaneousActiveCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace InstantaneousActiveCurrent namespace InstantaneousReactiveCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace InstantaneousReactiveCurrent namespace InstantaneousPower { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace InstantaneousPower namespace RmsVoltage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltage namespace RmsVoltageMin { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageMin namespace RmsVoltageMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageMax namespace RmsCurrent { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsCurrent namespace RmsCurrentMin { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsCurrentMin namespace RmsCurrentMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsCurrentMax namespace ActivePower { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActivePower namespace ActivePowerMin { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActivePowerMin namespace ActivePowerMax { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActivePowerMax namespace ReactivePower { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ReactivePower namespace ApparentPower { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ApparentPower namespace PowerFactor { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value); // int8s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value); // int8s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); } // namespace PowerFactor namespace AverageRmsVoltageMeasurementPeriod { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AverageRmsVoltageMeasurementPeriod namespace AverageRmsUnderVoltageCounter { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AverageRmsUnderVoltageCounter namespace RmsExtremeOverVoltagePeriod { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsExtremeOverVoltagePeriod namespace RmsExtremeUnderVoltagePeriod { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsExtremeUnderVoltagePeriod namespace RmsVoltageSagPeriod { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageSagPeriod namespace RmsVoltageSwellPeriod { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageSwellPeriod namespace AcVoltageMultiplier { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcVoltageMultiplier namespace AcVoltageDivisor { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcVoltageDivisor namespace AcCurrentMultiplier { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcCurrentMultiplier namespace AcCurrentDivisor { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcCurrentDivisor namespace AcPowerMultiplier { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcPowerMultiplier namespace AcPowerDivisor { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcPowerDivisor namespace OverloadAlarmsMask { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // bitmap8 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // bitmap8 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace OverloadAlarmsMask namespace VoltageOverload { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace VoltageOverload namespace CurrentOverload { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace CurrentOverload namespace AcOverloadAlarmsMask { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // bitmap16 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // bitmap16 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AcOverloadAlarmsMask namespace AcVoltageOverload { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace AcVoltageOverload namespace AcCurrentOverload { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace AcCurrentOverload namespace AcActivePowerOverload { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace AcActivePowerOverload namespace AcReactivePowerOverload { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace AcReactivePowerOverload namespace AverageRmsOverVoltage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace AverageRmsOverVoltage namespace AverageRmsUnderVoltage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace AverageRmsUnderVoltage namespace RmsExtremeOverVoltage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace RmsExtremeOverVoltage namespace RmsExtremeUnderVoltage { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace RmsExtremeUnderVoltage namespace RmsVoltageSag { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageSag namespace RmsVoltageSwell { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageSwell namespace LineCurrentPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace LineCurrentPhaseB namespace ActiveCurrentPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActiveCurrentPhaseB namespace ReactiveCurrentPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ReactiveCurrentPhaseB namespace RmsVoltagePhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltagePhaseB namespace RmsVoltageMinPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageMinPhaseB namespace RmsVoltageMaxPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageMaxPhaseB namespace RmsCurrentPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsCurrentPhaseB namespace RmsCurrentMinPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsCurrentMinPhaseB namespace RmsCurrentMaxPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsCurrentMaxPhaseB namespace ActivePowerPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActivePowerPhaseB namespace ActivePowerMinPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActivePowerMinPhaseB namespace ActivePowerMaxPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActivePowerMaxPhaseB namespace ReactivePowerPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ReactivePowerPhaseB namespace ApparentPowerPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ApparentPowerPhaseB namespace PowerFactorPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value); // int8s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value); // int8s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); } // namespace PowerFactorPhaseB namespace AverageRmsVoltageMeasurementPeriodPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AverageRmsVoltageMeasurementPeriodPhaseB namespace AverageRmsOverVoltageCounterPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AverageRmsOverVoltageCounterPhaseB namespace AverageRmsUnderVoltageCounterPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AverageRmsUnderVoltageCounterPhaseB namespace RmsExtremeOverVoltagePeriodPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsExtremeOverVoltagePeriodPhaseB namespace RmsExtremeUnderVoltagePeriodPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsExtremeUnderVoltagePeriodPhaseB namespace RmsVoltageSagPeriodPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageSagPeriodPhaseB namespace RmsVoltageSwellPeriodPhaseB { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageSwellPeriodPhaseB namespace LineCurrentPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace LineCurrentPhaseC namespace ActiveCurrentPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActiveCurrentPhaseC namespace ReactiveCurrentPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ReactiveCurrentPhaseC namespace RmsVoltagePhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltagePhaseC namespace RmsVoltageMinPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageMinPhaseC namespace RmsVoltageMaxPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageMaxPhaseC namespace RmsCurrentPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsCurrentPhaseC namespace RmsCurrentMinPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsCurrentMinPhaseC namespace RmsCurrentMaxPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsCurrentMaxPhaseC namespace ActivePowerPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActivePowerPhaseC namespace ActivePowerMinPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActivePowerMinPhaseC namespace ActivePowerMaxPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ActivePowerMaxPhaseC namespace ReactivePowerPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace ReactivePowerPhaseC namespace ApparentPowerPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ApparentPowerPhaseC namespace PowerFactorPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value); // int8s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value); // int8s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); } // namespace PowerFactorPhaseC namespace AverageRmsVoltageMeasurementPeriodPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AverageRmsVoltageMeasurementPeriodPhaseC namespace AverageRmsOverVoltageCounterPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AverageRmsOverVoltageCounterPhaseC namespace AverageRmsUnderVoltageCounterPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace AverageRmsUnderVoltageCounterPhaseC namespace RmsExtremeOverVoltagePeriodPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsExtremeOverVoltagePeriodPhaseC namespace RmsExtremeUnderVoltagePeriodPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsExtremeUnderVoltagePeriodPhaseC namespace RmsVoltageSagPeriodPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageSagPeriodPhaseC namespace RmsVoltageSwellPeriodPhaseC { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RmsVoltageSwellPeriodPhaseC namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -6657,694 +6580,695 @@ namespace UnitTesting { namespace Attributes { namespace Boolean { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace Boolean namespace Bitmap8 { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::BitMask * value); // Bitmap8MaskMap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value); -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty); } // namespace Bitmap8 namespace Bitmap16 { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::BitMask * value); // Bitmap16MaskMap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // Bitmap16MaskMap +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace Bitmap16 namespace Bitmap32 { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::BitMask * value); // Bitmap32MaskMap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // Bitmap32MaskMap +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace Bitmap32 namespace Bitmap64 { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, chip::BitMask * value); // Bitmap64MaskMap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Get(EndpointId endpoint, chip::BitMask * value); // Bitmap64MaskMap +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); } // namespace Bitmap64 namespace Int8u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace Int8u namespace Int16u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Int16u namespace Int24u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int24u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // int24u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace Int24u namespace Int32u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // int32u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace Int32u namespace Int40u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * value); // int40u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint64_t * value); // int40u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); } // namespace Int40u namespace Int48u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * value); // int48u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint64_t * value); // int48u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); } // namespace Int48u namespace Int56u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * value); // int56u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint64_t * value); // int56u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); } // namespace Int56u namespace Int64u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * value); // int64u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint64_t * value); // int64u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); } // namespace Int64u namespace Int8s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value); // int8s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value); // int8s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); } // namespace Int8s namespace Int16s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace Int16s namespace Int24s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int32_t * value); // int24s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int32_t * value); // int24s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); } // namespace Int24s namespace Int32s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int32_t * value); // int32s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int32_t * value); // int32s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); } // namespace Int32s namespace Int40s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int64_t * value); // int40s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int64_t * value); // int40s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); } // namespace Int40s namespace Int48s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int64_t * value); // int48s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int64_t * value); // int48s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); } // namespace Int48s namespace Int56s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int64_t * value); // int56s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int64_t * value); // int56s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); } // namespace Int56s namespace Int64s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int64_t * value); // int64s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int64_t * value); // int64s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); } // namespace Int64s namespace Enum8 { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // enum8 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // enum8 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace Enum8 namespace Enum16 { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // enum16 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // enum16 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace Enum16 namespace FloatSingle { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, float * value); // single -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, float * value); // single +Protocols::InteractionModel::Status Set(EndpointId endpoint, float value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, float value, MarkAttributeDirty markDirty); } // namespace FloatSingle namespace FloatDouble { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, double * value); // double -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, double * value); // double +Protocols::InteractionModel::Status Set(EndpointId endpoint, double value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, double value, MarkAttributeDirty markDirty); } // namespace FloatDouble namespace OctetString { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableByteSpan & value); // octet_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableByteSpan & value); // octet_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); } // namespace OctetString namespace LongOctetString { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableByteSpan & value); // long_octet_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableByteSpan & value); // long_octet_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); } // namespace LongOctetString namespace CharString { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace CharString namespace LongCharString { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::MutableCharSpan & value); // long_char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); } // namespace LongCharString namespace EpochUs { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint64_t * value); // epoch_us -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint64_t * value); // epoch_us +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); } // namespace EpochUs namespace EpochS { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // epoch_s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // epoch_s +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace EpochS namespace VendorId { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, chip::VendorId * value); // vendor_id -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::VendorId value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::VendorId * value); // vendor_id +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::VendorId value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::VendorId value, MarkAttributeDirty markDirty); } // namespace VendorId namespace EnumAttr { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - chip::app::Clusters::UnitTesting::SimpleEnum * value); // SimpleEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum * value); // SimpleEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value, MarkAttributeDirty markDirty); } // namespace EnumAttr namespace RangeRestrictedInt8u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace RangeRestrictedInt8u namespace RangeRestrictedInt8s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int8_t * value); // int8s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int8_t * value); // int8s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); } // namespace RangeRestrictedInt8s namespace RangeRestrictedInt16u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace RangeRestrictedInt16u namespace RangeRestrictedInt16s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, int16_t * value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, int16_t * value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); } // namespace RangeRestrictedInt16s namespace TimedWriteBoolean { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace TimedWriteBoolean namespace GlobalEnum { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, chip::app::Clusters::Globals::TestGlobalEnum * value); // TestGlobalEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Globals::TestGlobalEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Globals::TestGlobalEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Globals::TestGlobalEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Globals::TestGlobalEnum value, MarkAttributeDirty markDirty); } // namespace GlobalEnum namespace Unsupported { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace Unsupported +namespace ReadFailureCode { +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +} // namespace ReadFailureCode + +namespace FailureInt32U { +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +} // namespace FailureInt32U + namespace NullableBoolean { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableBoolean namespace NullableBitmap8 { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, DataModel::Nullable> & value); // Bitmap8MaskMap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value); -Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, + MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable> & value); Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable> & value, MarkAttributeDirty markDirty); } // namespace NullableBitmap8 namespace NullableBitmap16 { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, DataModel::Nullable> & value); // Bitmap16MaskMap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable> & value); Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable> & value, MarkAttributeDirty markDirty); } // namespace NullableBitmap16 namespace NullableBitmap32 { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, DataModel::Nullable> & value); // Bitmap32MaskMap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable> & value); Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable> & value, MarkAttributeDirty markDirty); } // namespace NullableBitmap32 namespace NullableBitmap64 { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, +Get(EndpointId endpoint, DataModel::Nullable> & value); // Bitmap64MaskMap -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, - chip::BitMask value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::BitMask value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable> & value); Protocols::InteractionModel::Status -Set(chip::EndpointId endpoint, +Set(EndpointId endpoint, const chip::app::DataModel::Nullable> & value, MarkAttributeDirty markDirty); } // namespace NullableBitmap64 namespace NullableInt8u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableInt8u namespace NullableInt16u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableInt16u namespace NullableInt24u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int24u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableInt24u namespace NullableInt32u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int32u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableInt32u namespace NullableInt40u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int40u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int40u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableInt40u namespace NullableInt48u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int48u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int48u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableInt48u namespace NullableInt56u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int56u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int56u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableInt56u namespace NullableInt64u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int64u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int64u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableInt64u namespace NullableInt8s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableInt8s namespace NullableInt16s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableInt16s namespace NullableInt24s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int24s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int24s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableInt24s namespace NullableInt32s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int32s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int32s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableInt32s namespace NullableInt40s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int40s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int40s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableInt40s namespace NullableInt48s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int48s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int48s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableInt48s namespace NullableInt56s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int56s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int56s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableInt56s namespace NullableInt64s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int64s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int64s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int64_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableInt64s namespace NullableEnum8 { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // enum8 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // enum8 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableEnum8 namespace NullableEnum16 { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // enum16 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // enum16 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableEnum16 namespace NullableFloatSingle { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // single -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, float value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // single +Protocols::InteractionModel::Status Set(EndpointId endpoint, float value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, float value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableFloatSingle namespace NullableFloatDouble { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // double -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, double value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // double +Protocols::InteractionModel::Status Set(EndpointId endpoint, double value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, double value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableFloatDouble namespace NullableOctetString { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - DataModel::Nullable & value); // octet_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // octet_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::ByteSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableOctetString namespace NullableCharString { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, - DataModel::Nullable & value); // char_string -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // char_string +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::CharSpan value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableCharString namespace NullableEnumAttr { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // SimpleEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value, +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::UnitTesting::SimpleEnum value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableEnumAttr namespace NullableRangeRestrictedInt8u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableRangeRestrictedInt8u namespace NullableRangeRestrictedInt8s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int8s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int8s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableRangeRestrictedInt8s namespace NullableRangeRestrictedInt16u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableRangeRestrictedInt16u namespace NullableRangeRestrictedInt16s { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // int16s -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, const chip::app::DataModel::Nullable & value, +Protocols::InteractionModel::Status Get(EndpointId endpoint, DataModel::Nullable & value); // int16s +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, int16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableRangeRestrictedInt16s namespace WriteOnlyInt8u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace WriteOnlyInt8u namespace NullableGlobalEnum { Protocols::InteractionModel::Status -Get(chip::EndpointId endpoint, DataModel::Nullable & value); // TestGlobalEnum -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Globals::TestGlobalEnum value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, chip::app::Clusters::Globals::TestGlobalEnum value, +Get(EndpointId endpoint, DataModel::Nullable & value); // TestGlobalEnum +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Globals::TestGlobalEnum value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, chip::app::Clusters::Globals::TestGlobalEnum value, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint); -Protocols::InteractionModel::Status SetNull(chip::EndpointId endpoint, MarkAttributeDirty markDirty); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status SetNull(EndpointId endpoint); +Protocols::InteractionModel::Status SetNull(EndpointId endpoint, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, +Protocols::InteractionModel::Status Set(EndpointId endpoint, const chip::app::DataModel::Nullable & value, MarkAttributeDirty markDirty); } // namespace NullableGlobalEnum namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision namespace MeiInt8u { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint8_t * value); // int8u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint8_t * value); // int8u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint8_t value, MarkAttributeDirty markDirty); } // namespace MeiInt8u } // namespace Attributes @@ -7354,15 +7278,15 @@ namespace FaultInjection { namespace Attributes { namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes @@ -7372,21 +7296,21 @@ namespace SampleMei { namespace Attributes { namespace FlipFlop { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, bool * value); // boolean -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, bool * value); // boolean +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace FlipFlop namespace FeatureMap { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint32_t * value); // bitmap32 -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint32_t * value); // bitmap32 +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint32_t value, MarkAttributeDirty markDirty); } // namespace FeatureMap namespace ClusterRevision { -Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, uint16_t * value); // int16u -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value); -Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); +Protocols::InteractionModel::Status Get(EndpointId endpoint, uint16_t * value); // int16u +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value); +Protocols::InteractionModel::Status Set(EndpointId endpoint, uint16_t value, MarkAttributeDirty markDirty); } // namespace ClusterRevision } // namespace Attributes 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 90d399b8e6fde7..2bde6623e6af84 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 @@ -169,20 +169,6 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(detail::DegradationDire return EnumType::kUnknownEnumValue; } } -static auto __attribute__((unused)) EnsureKnownEnumValue(detail::ErrorStateEnum val) -{ - using EnumType = detail::ErrorStateEnum; - switch (val) - { - case EnumType::kNoError: - case EnumType::kUnableToStartOrResume: - case EnumType::kUnableToCompleteOperation: - case EnumType::kCommandInvalidInState: - return val; - default: - return EnumType::kUnknownEnumValue; - } -} static auto __attribute__((unused)) EnsureKnownEnumValue(Globals::FloorSurfaceTag val) { using EnumType = Globals::FloorSurfaceTag; @@ -351,20 +337,6 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(detail::MeasurementUnit return EnumType::kUnknownEnumValue; } } -static auto __attribute__((unused)) EnsureKnownEnumValue(detail::OperationalStateEnum val) -{ - using EnumType = detail::OperationalStateEnum; - switch (val) - { - case EnumType::kStopped: - case EnumType::kRunning: - case EnumType::kPaused: - case EnumType::kError: - return val; - default: - return EnumType::kUnknownEnumValue; - } -} static auto __attribute__((unused)) EnsureKnownEnumValue(Globals::PositionTag val) { using EnumType = Globals::PositionTag; @@ -1651,11 +1623,50 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(Timer::TimerStatusEnum } } +static auto __attribute__((unused)) EnsureKnownEnumValue(OvenCavityOperationalState::ErrorStateEnum val) +{ + using EnumType = OvenCavityOperationalState::ErrorStateEnum; + switch (val) + { + case EnumType::kNoError: + case EnumType::kUnableToStartOrResume: + case EnumType::kUnableToCompleteOperation: + case EnumType::kCommandInvalidInState: + return val; + default: + return EnumType::kUnknownEnumValue; + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(OvenCavityOperationalState::OperationalStateEnum val) +{ + using EnumType = OvenCavityOperationalState::OperationalStateEnum; + switch (val) + { + case EnumType::kStopped: + case EnumType::kRunning: + case EnumType::kPaused: + case EnumType::kError: + return val; + default: + return EnumType::kUnknownEnumValue; + } +} + static auto __attribute__((unused)) EnsureKnownEnumValue(OvenMode::ModeTag val) { using EnumType = OvenMode::ModeTag; switch (val) { + case EnumType::kAuto: + case EnumType::kQuick: + case EnumType::kQuiet: + case EnumType::kLowNoise: + case EnumType::kLowEnergy: + case EnumType::kVacation: + case EnumType::kMin: + case EnumType::kMax: + case EnumType::kNight: + case EnumType::kDay: case EnumType::kBake: case EnumType::kConvection: case EnumType::kGrill: @@ -1808,6 +1819,16 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(MicrowaveOvenMode::Mode using EnumType = MicrowaveOvenMode::ModeTag; switch (val) { + case EnumType::kAuto: + case EnumType::kQuick: + case EnumType::kQuiet: + case EnumType::kLowNoise: + case EnumType::kLowEnergy: + case EnumType::kVacation: + case EnumType::kMin: + case EnumType::kMax: + case EnumType::kNight: + case EnumType::kDay: case EnumType::kNormal: case EnumType::kDefrost: return val; @@ -1816,6 +1837,35 @@ static auto __attribute__((unused)) EnsureKnownEnumValue(MicrowaveOvenMode::Mode } } +static auto __attribute__((unused)) EnsureKnownEnumValue(OperationalState::ErrorStateEnum val) +{ + using EnumType = OperationalState::ErrorStateEnum; + switch (val) + { + case EnumType::kNoError: + case EnumType::kUnableToStartOrResume: + case EnumType::kUnableToCompleteOperation: + case EnumType::kCommandInvalidInState: + return val; + default: + return EnumType::kUnknownEnumValue; + } +} +static auto __attribute__((unused)) EnsureKnownEnumValue(OperationalState::OperationalStateEnum val) +{ + using EnumType = OperationalState::OperationalStateEnum; + switch (val) + { + case EnumType::kStopped: + case EnumType::kRunning: + case EnumType::kPaused: + case EnumType::kError: + return val; + default: + return EnumType::kUnknownEnumValue; + } +} + static auto __attribute__((unused)) EnsureKnownEnumValue(ValveConfigurationAndControl::StatusCodeEnum val) { using EnumType = ValveConfigurationAndControl::StatusCodeEnum; 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 998a3c931b42b1..627b5808fa7931 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 @@ -53,20 +53,6 @@ enum class DegradationDirectionEnum : uint8_t kUnknownEnumValue = 2, }; -// Enum for ErrorStateEnum -enum class ErrorStateEnum : uint8_t -{ - kNoError = 0x00, - kUnableToStartOrResume = 0x01, - kUnableToCompleteOperation = 0x02, - kCommandInvalidInState = 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, -}; - // Enum for LevelValueEnum enum class LevelValueEnum : uint8_t { @@ -138,20 +124,6 @@ enum class MeasurementUnitEnum : uint8_t kUnknownEnumValue = 8, }; -// Enum for OperationalStateEnum -enum class OperationalStateEnum : uint8_t -{ - kStopped = 0x00, - kRunning = 0x01, - kPaused = 0x02, - kError = 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, -}; - // Enum for ProductIdentifierTypeEnum enum class ProductIdentifierTypeEnum : uint8_t { @@ -1992,9 +1964,33 @@ enum class Feature : uint32_t namespace OvenCavityOperationalState { -using ErrorStateEnum = Clusters::detail::ErrorStateEnum; +// Enum for ErrorStateEnum +enum class ErrorStateEnum : uint8_t +{ + kNoError = 0x00, + kUnableToStartOrResume = 0x01, + kUnableToCompleteOperation = 0x02, + kCommandInvalidInState = 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, +}; -using OperationalStateEnum = Clusters::detail::OperationalStateEnum; +// Enum for OperationalStateEnum +enum class OperationalStateEnum : uint8_t +{ + kStopped = 0x00, + kRunning = 0x01, + kPaused = 0x02, + kError = 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, +}; } // namespace OvenCavityOperationalState namespace OvenMode { @@ -2002,6 +1998,16 @@ namespace OvenMode { // Enum for ModeTag enum class ModeTag : uint16_t { + kAuto = 0x00, + kQuick = 0x01, + kQuiet = 0x02, + kLowNoise = 0x03, + kLowEnergy = 0x04, + kVacation = 0x05, + kMin = 0x06, + kMax = 0x07, + kNight = 0x08, + kDay = 0x09, kBake = 0x4000, kConvection = 0x4001, kGrill = 0x4002, @@ -2015,7 +2021,7 @@ enum class ModeTag : uint16_t // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown // enum value. This specific should never be transmitted. - kUnknownEnumValue = 0, + kUnknownEnumValue = 10, }; // Bitmap for Feature @@ -2056,10 +2062,20 @@ namespace LaundryWasherMode { // Enum for ModeTag enum class ModeTag : uint16_t { - kNormal = 0x4000, - kDelicate = 0x4001, - kHeavy = 0x4002, - kWhites = 0x4003, + kAuto = 0x00, + kQuick = 0x01, + kQuiet = 0x02, + kLowNoise = 0x03, + kLowEnergy = 0x04, + kVacation = 0x05, + kMin = 0x06, + kMax = 0x07, + kNight = 0x08, + kDay = 0x09, + kNormal = 0x4000, + kDelicate = 0x4001, + kHeavy = 0x4002, + kWhites = 0x4003, // kUnknownEnumValue intentionally not defined. This enum never goes // through DataModel::Decode, likely because it is a part of a derived // cluster. As a result having kUnknownEnumValue in this enum is error @@ -2079,6 +2095,16 @@ namespace RefrigeratorAndTemperatureControlledCabinetMode { // Enum for ModeTag enum class ModeTag : uint16_t { + kAuto = 0x00, + kQuick = 0x01, + kQuiet = 0x02, + kLowNoise = 0x03, + kLowEnergy = 0x04, + kVacation = 0x05, + kMin = 0x06, + kMax = 0x07, + kNight = 0x08, + kDay = 0x09, kRapidCool = 0x4000, kRapidFreeze = 0x4001, // kUnknownEnumValue intentionally not defined. This enum never goes @@ -2124,9 +2150,19 @@ namespace RvcRunMode { // Enum for ModeTag enum class ModeTag : uint16_t { - kIdle = 0x4000, - kCleaning = 0x4001, - kMapping = 0x4002, + kAuto = 0x00, + kQuick = 0x01, + kQuiet = 0x02, + kLowNoise = 0x03, + kLowEnergy = 0x04, + kVacation = 0x05, + kMin = 0x06, + kMax = 0x07, + kNight = 0x08, + kDay = 0x09, + kIdle = 0x4000, + kCleaning = 0x4001, + kMapping = 0x4002, // kUnknownEnumValue intentionally not defined. This enum never goes // through DataModel::Decode, likely because it is a part of a derived // cluster. As a result having kUnknownEnumValue in this enum is error @@ -2155,7 +2191,7 @@ enum class StatusCode : uint8_t // Bitmap for Feature enum class Feature : uint32_t { - kNoFeatures = 0x0, + kDirectModeChange = 0x10000, }; } // namespace RvcRunMode @@ -2164,6 +2200,16 @@ namespace RvcCleanMode { // Enum for ModeTag enum class ModeTag : uint16_t { + kAuto = 0x00, + kQuick = 0x01, + kQuiet = 0x02, + kLowNoise = 0x03, + kLowEnergy = 0x04, + kVacation = 0x05, + kMin = 0x06, + kMax = 0x07, + kNight = 0x08, + kDay = 0x09, kDeepClean = 0x4000, kVacuum = 0x4001, kMop = 0x4002, @@ -2188,7 +2234,7 @@ enum class StatusCode : uint8_t // Bitmap for Feature enum class Feature : uint32_t { - kNoFeatures = 0x0, + kDirectModeChange = 0x10000, }; } // namespace RvcCleanMode @@ -2217,9 +2263,19 @@ namespace DishwasherMode { // Enum for ModeTag enum class ModeTag : uint16_t { - kNormal = 0x4000, - kHeavy = 0x4001, - kLight = 0x4002, + kAuto = 0x00, + kQuick = 0x01, + kQuiet = 0x02, + kLowNoise = 0x03, + kLowEnergy = 0x04, + kVacation = 0x05, + kMin = 0x06, + kMax = 0x07, + kNight = 0x08, + kDay = 0x09, + kNormal = 0x4000, + kHeavy = 0x4001, + kLight = 0x4002, // kUnknownEnumValue intentionally not defined. This enum never goes // through DataModel::Decode, likely because it is a part of a derived // cluster. As a result having kUnknownEnumValue in this enum is error @@ -2381,13 +2437,23 @@ namespace MicrowaveOvenMode { // Enum for ModeTag enum class ModeTag : uint16_t { - kNormal = 0x4000, - kDefrost = 0x4001, + kAuto = 0x00, + kQuick = 0x01, + kQuiet = 0x02, + kLowNoise = 0x03, + kLowEnergy = 0x04, + kVacation = 0x05, + kMin = 0x06, + kMax = 0x07, + kNight = 0x08, + kDay = 0x09, + kNormal = 0x4000, + kDefrost = 0x4001, // All received enum values that are not listed above will be mapped // to kUnknownEnumValue. This is a helper enum value that should only // be used by code to process how it handles receiving and unknown // enum value. This specific should never be transmitted. - kUnknownEnumValue = 0, + kUnknownEnumValue = 10, }; // Bitmap for Feature @@ -2410,9 +2476,33 @@ enum class Feature : uint32_t namespace OperationalState { -using ErrorStateEnum = Clusters::detail::ErrorStateEnum; +// Enum for ErrorStateEnum +enum class ErrorStateEnum : uint8_t +{ + kNoError = 0x00, + kUnableToStartOrResume = 0x01, + kUnableToCompleteOperation = 0x02, + kCommandInvalidInState = 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, +}; -using OperationalStateEnum = Clusters::detail::OperationalStateEnum; +// Enum for OperationalStateEnum +enum class OperationalStateEnum : uint8_t +{ + kStopped = 0x00, + kRunning = 0x01, + kPaused = 0x02, + kError = 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, +}; } // namespace OperationalState namespace RvcOperationalState { @@ -2420,14 +2510,18 @@ namespace RvcOperationalState { // Enum for ErrorStateEnum enum class ErrorStateEnum : uint8_t { - kFailedToFindChargingDock = 0x40, - kStuck = 0x41, - kDustBinMissing = 0x42, - kDustBinFull = 0x43, - kWaterTankEmpty = 0x44, - kWaterTankMissing = 0x45, - kWaterTankLidOpen = 0x46, - kMopCleaningPadMissing = 0x47, + kNoError = 0x00, + kUnableToStartOrResume = 0x01, + kUnableToCompleteOperation = 0x02, + kCommandInvalidInState = 0x03, + kFailedToFindChargingDock = 0x40, + kStuck = 0x41, + kDustBinMissing = 0x42, + kDustBinFull = 0x43, + kWaterTankEmpty = 0x44, + kWaterTankMissing = 0x45, + kWaterTankLidOpen = 0x46, + kMopCleaningPadMissing = 0x47, // kUnknownEnumValue intentionally not defined. This enum never goes // through DataModel::Decode, likely because it is a part of a derived // cluster. As a result having kUnknownEnumValue in this enum is error @@ -2438,6 +2532,10 @@ enum class ErrorStateEnum : uint8_t // Enum for OperationalStateEnum enum class OperationalStateEnum : uint8_t { + kStopped = 0x00, + kRunning = 0x01, + kPaused = 0x02, + kError = 0x03, kSeekingCharger = 0x40, kCharging = 0x41, kDocked = 0x42, @@ -3092,6 +3190,16 @@ namespace EnergyEvseMode { // Enum for ModeTag enum class ModeTag : uint16_t { + kAuto = 0x00, + kQuick = 0x01, + kQuiet = 0x02, + kLowNoise = 0x03, + kLowEnergy = 0x04, + kVacation = 0x05, + kMin = 0x06, + kMax = 0x07, + kNight = 0x08, + kDay = 0x09, kManual = 0x4000, kTimeOfUse = 0x4001, kSolarCharging = 0x4002, @@ -3114,9 +3222,19 @@ namespace WaterHeaterMode { // Enum for ModeTag enum class ModeTag : uint16_t { - kOff = 0x4000, - kManual = 0x4001, - kTimed = 0x4002, + kAuto = 0x00, + kQuick = 0x01, + kQuiet = 0x02, + kLowNoise = 0x03, + kLowEnergy = 0x04, + kVacation = 0x05, + kMin = 0x06, + kMax = 0x07, + kNight = 0x08, + kDay = 0x09, + kOff = 0x4000, + kManual = 0x4001, + kTimed = 0x4002, // kUnknownEnumValue intentionally not defined. This enum never goes // through DataModel::Decode, likely because it is a part of a derived // cluster. As a result having kUnknownEnumValue in this enum is error @@ -3136,6 +3254,16 @@ namespace DeviceEnergyManagementMode { // Enum for ModeTag enum class ModeTag : uint16_t { + kAuto = 0x00, + kQuick = 0x01, + kQuiet = 0x02, + kLowNoise = 0x03, + kLowEnergy = 0x04, + kVacation = 0x05, + kMin = 0x06, + kMax = 0x07, + kNight = 0x08, + kDay = 0x09, kNoOptimization = 0x4000, kDeviceOptimization = 0x4001, kLocalOptimization = 0x4002, 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 c2a25ed9477c2e..78368f7293b1a4 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 @@ -2717,41 +2717,6 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) } } } // namespace AccessControlExtensionChanged. -namespace AccessRestrictionEntryChanged { -CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const -{ - TLV::TLVType outer; - ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); - return aWriter.EndContainer(outer); -} - -CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) -{ - detail::StructDecodeIterator __iterator(reader); - while (true) - { - auto __element = __iterator.Next(); - if (std::holds_alternative(__element)) - { - return std::get(__element); - } - - CHIP_ERROR err = CHIP_NO_ERROR; - const uint8_t __context_tag = std::get(__element); - - if (__context_tag == to_underlying(Fields::kFabricIndex)) - { - err = DataModel::Decode(reader, fabricIndex); - } - else - { - } - - ReturnErrorOnFailure(err); - } -} -} // namespace AccessRestrictionEntryChanged. namespace FabricRestrictionReviewUpdate { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { @@ -2759,7 +2724,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kToken), token)); ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kInstruction), instruction)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kRedirectURL), redirectURL)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kARLRequestFlowUrl), ARLRequestFlowUrl)); ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); return aWriter.EndContainer(outer); } @@ -2786,9 +2751,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, instruction); } - else if (__context_tag == to_underlying(Fields::kRedirectURL)) + else if (__context_tag == to_underlying(Fields::kARLRequestFlowUrl)) { - err = DataModel::Decode(reader, redirectURL); + err = DataModel::Decode(reader, ARLRequestFlowUrl); } else if (__context_tag == to_underlying(Fields::kFabricIndex)) { @@ -8227,6 +8192,7 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; encoder.Encode(to_underlying(Fields::kStayActiveDuration), stayActiveDuration); + encoder.Encode(to_underlying(Fields::kTimeoutMs), timeoutMs); return encoder.Finalize(); } @@ -8248,6 +8214,10 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) { err = DataModel::Decode(reader, stayActiveDuration); } + else if (__context_tag == to_underlying(Fields::kTimeoutMs)) + { + err = DataModel::Decode(reader, timeoutMs); + } else { } @@ -23759,7 +23729,43 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre } } // namespace Attributes -namespace Events {} // namespace Events +namespace Events { +namespace OccupancyChanged { +CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const +{ + TLV::TLVType outer; + ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kOccupancy), occupancy)); + return aWriter.EndContainer(outer); +} + +CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) +{ + detail::StructDecodeIterator __iterator(reader); + while (true) + { + auto __element = __iterator.Next(); + if (std::holds_alternative(__element)) + { + return std::get(__element); + } + + CHIP_ERROR err = CHIP_NO_ERROR; + const uint8_t __context_tag = std::get(__element); + + if (__context_tag == to_underlying(Fields::kOccupancy)) + { + err = DataModel::Decode(reader, occupancy); + } + else + { + } + + ReturnErrorOnFailure(err); + } +} +} // namespace OccupancyChanged. +} // namespace Events } // namespace OccupancySensing namespace CarbonMonoxideConcentrationMeasurement { @@ -28849,8 +28855,6 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre { switch (path.mAttributeId) { - case Attributes::RemovedOn::TypeInfo::GetAttributeId(): - return DataModel::Decode(reader, removedOn); case Attributes::DeviceDirectory::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, deviceDirectory); case Attributes::LocationDirectory::TypeInfo::GetAttributeId(): @@ -28883,9 +28887,9 @@ namespace RequestCommissioningApproval { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kRequestId), requestId); - encoder.Encode(to_underlying(Fields::kVendorId), vendorId); - encoder.Encode(to_underlying(Fields::kProductId), productId); + encoder.Encode(to_underlying(Fields::kRequestID), requestID); + encoder.Encode(to_underlying(Fields::kVendorID), vendorID); + encoder.Encode(to_underlying(Fields::kProductID), productID); encoder.Encode(to_underlying(Fields::kLabel), label); return encoder.Finalize(); } @@ -28904,17 +28908,17 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kRequestId)) + if (__context_tag == to_underlying(Fields::kRequestID)) { - err = DataModel::Decode(reader, requestId); + err = DataModel::Decode(reader, requestID); } - else if (__context_tag == to_underlying(Fields::kVendorId)) + else if (__context_tag == to_underlying(Fields::kVendorID)) { - err = DataModel::Decode(reader, vendorId); + err = DataModel::Decode(reader, vendorID); } - else if (__context_tag == to_underlying(Fields::kProductId)) + else if (__context_tag == to_underlying(Fields::kProductID)) { - err = DataModel::Decode(reader, productId); + err = DataModel::Decode(reader, productID); } else if (__context_tag == to_underlying(Fields::kLabel)) { @@ -28932,10 +28936,8 @@ namespace CommissionNode { CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { DataModel::WrappedStructEncoder encoder{ aWriter, aTag }; - encoder.Encode(to_underlying(Fields::kRequestId), requestId); + encoder.Encode(to_underlying(Fields::kRequestID), requestID); encoder.Encode(to_underlying(Fields::kResponseTimeoutSeconds), responseTimeoutSeconds); - encoder.Encode(to_underlying(Fields::kIpAddress), ipAddress); - encoder.Encode(to_underlying(Fields::kPort), port); return encoder.Finalize(); } @@ -28953,22 +28955,14 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kRequestId)) + if (__context_tag == to_underlying(Fields::kRequestID)) { - err = DataModel::Decode(reader, requestId); + err = DataModel::Decode(reader, requestID); } else if (__context_tag == to_underlying(Fields::kResponseTimeoutSeconds)) { err = DataModel::Decode(reader, responseTimeoutSeconds); } - else if (__context_tag == to_underlying(Fields::kIpAddress)) - { - err = DataModel::Decode(reader, ipAddress); - } - else if (__context_tag == to_underlying(Fields::kPort)) - { - err = DataModel::Decode(reader, port); - } else { } @@ -29064,8 +29058,8 @@ CHIP_ERROR Type::Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const { TLV::TLVType outer; ReturnErrorOnFailure(aWriter.StartContainer(aTag, TLV::kTLVType_Structure, outer)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kRequestId), requestId)); - ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kClientNodeId), clientNodeId)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kRequestID), requestID)); + ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kClientNodeID), clientNodeID)); ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kStatusCode), statusCode)); ReturnErrorOnFailure(DataModel::Encode(aWriter, TLV::ContextTag(Fields::kFabricIndex), fabricIndex)); return aWriter.EndContainer(outer); @@ -29085,13 +29079,13 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::kRequestId)) + if (__context_tag == to_underlying(Fields::kRequestID)) { - err = DataModel::Decode(reader, requestId); + err = DataModel::Decode(reader, requestID); } - else if (__context_tag == to_underlying(Fields::kClientNodeId)) + else if (__context_tag == to_underlying(Fields::kClientNodeID)) { - err = DataModel::Decode(reader, clientNodeId); + err = DataModel::Decode(reader, clientNodeID); } else if (__context_tag == to_underlying(Fields::kStatusCode)) { @@ -31860,6 +31854,10 @@ CHIP_ERROR TypeInfo::DecodableType::Decode(TLV::TLVReader & reader, const Concre return DataModel::Decode(reader, globalStruct); case Attributes::Unsupported::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, unsupported); + case Attributes::ReadFailureCode::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, readFailureCode); + case Attributes::FailureInt32U::TypeInfo::GetAttributeId(): + return DataModel::Decode(reader, failureInt32U); case Attributes::NullableBoolean::TypeInfo::GetAttributeId(): return DataModel::Decode(reader, nullableBoolean); case Attributes::NullableBitmap8::TypeInfo::GetAttributeId(): 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 fc62ada8bd3fcb..2aaf40bdbad6f9 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 @@ -2928,7 +2928,7 @@ struct Type CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; - using ResponseType = DataModel::NullObjectType; + using ResponseType = Clusters::AccessControl::Commands::ReviewFabricRestrictionsResponse::DecodableType; static constexpr bool MustUseTimedInvoke() { return false; } }; @@ -3228,50 +3228,15 @@ struct DecodableType CHIP_ERROR Decode(TLV::TLVReader & reader); }; } // namespace AccessControlExtensionChanged -namespace AccessRestrictionEntryChanged { -static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; - -enum class Fields : uint8_t -{ - kFabricIndex = 254, -}; - -struct Type -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::AccessRestrictionEntryChanged::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } - static constexpr bool kIsFabricScoped = true; - - chip::FabricIndex fabricIndex = static_cast(0); - - auto GetFabricIndex() const { return fabricIndex; } - - CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; -}; - -struct DecodableType -{ -public: - static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } - static constexpr EventId GetEventId() { return Events::AccessRestrictionEntryChanged::Id; } - static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } - - chip::FabricIndex fabricIndex = static_cast(0); - - CHIP_ERROR Decode(TLV::TLVReader & reader); -}; -} // namespace AccessRestrictionEntryChanged namespace FabricRestrictionReviewUpdate { static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { - kToken = 0, - kInstruction = 1, - kRedirectURL = 2, - kFabricIndex = 254, + kToken = 0, + kInstruction = 1, + kARLRequestFlowUrl = 2, + kFabricIndex = 254, }; struct Type @@ -3283,8 +3248,8 @@ struct Type static constexpr bool kIsFabricScoped = true; uint64_t token = static_cast(0); - DataModel::Nullable instruction; - DataModel::Nullable redirectURL; + Optional instruction; + Optional ARLRequestFlowUrl; chip::FabricIndex fabricIndex = static_cast(0); auto GetFabricIndex() const { return fabricIndex; } @@ -3300,8 +3265,8 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::AccessControl::Id; } uint64_t token = static_cast(0); - DataModel::Nullable instruction; - DataModel::Nullable redirectURL; + Optional instruction; + Optional ARLRequestFlowUrl; chip::FabricIndex fabricIndex = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); @@ -11089,6 +11054,7 @@ namespace KeepActive { enum class Fields : uint8_t { kStayActiveDuration = 0, + kTimeoutMs = 1, }; struct Type @@ -11099,6 +11065,7 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } uint32_t stayActiveDuration = static_cast(0); + uint32_t timeoutMs = static_cast(0); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -11114,6 +11081,7 @@ struct DecodableType static constexpr ClusterId GetClusterId() { return Clusters::BridgedDeviceBasicInformation::Id; } uint32_t stayActiveDuration = static_cast(0); + uint32_t timeoutMs = static_cast(0); CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace KeepActive @@ -34306,6 +34274,41 @@ struct TypeInfo }; }; } // namespace Attributes +namespace Events { +namespace OccupancyChanged { +static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; + +enum class Fields : uint8_t +{ + kOccupancy = 0, +}; + +struct Type +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::OccupancyChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } + static constexpr bool kIsFabricScoped = false; + + chip::BitMask occupancy = static_cast>(0); + + CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; +}; + +struct DecodableType +{ +public: + static constexpr PriorityLevel GetPriorityLevel() { return kPriorityLevel; } + static constexpr EventId GetEventId() { return Events::OccupancyChanged::Id; } + static constexpr ClusterId GetClusterId() { return Clusters::OccupancySensing::Id; } + + chip::BitMask occupancy = static_cast>(0); + + CHIP_ERROR Decode(TLV::TLVReader & reader); +}; +} // namespace OccupancyChanged +} // namespace Events } // namespace OccupancySensing namespace CarbonMonoxideConcentrationMeasurement { @@ -41823,18 +41826,6 @@ using DecodableType = Type; namespace Attributes { -namespace RemovedOn { -struct TypeInfo -{ - using Type = chip::app::DataModel::Nullable; - using DecodableType = chip::app::DataModel::Nullable; - using DecodableArgType = const chip::app::DataModel::Nullable &; - - static constexpr ClusterId GetClusterId() { return Clusters::EcosystemInformation::Id; } - static constexpr AttributeId GetAttributeId() { return Attributes::RemovedOn::Id; } - static constexpr bool MustUseTimedWrite() { return false; } -}; -} // namespace RemovedOn namespace DeviceDirectory { struct TypeInfo { @@ -41909,7 +41900,6 @@ struct TypeInfo CHIP_ERROR Decode(TLV::TLVReader & reader, const ConcreteAttributePath & path); - Attributes::RemovedOn::TypeInfo::DecodableType removedOn; Attributes::DeviceDirectory::TypeInfo::DecodableType deviceDirectory; Attributes::LocationDirectory::TypeInfo::DecodableType locationDirectory; Attributes::GeneratedCommandList::TypeInfo::DecodableType generatedCommandList; @@ -41948,9 +41938,9 @@ namespace Commands { namespace RequestCommissioningApproval { enum class Fields : uint8_t { - kRequestId = 0, - kVendorId = 1, - kProductId = 2, + kRequestID = 0, + kVendorID = 1, + kProductID = 2, kLabel = 3, }; @@ -41961,9 +41951,9 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::RequestCommissioningApproval::Id; } static constexpr ClusterId GetClusterId() { return Clusters::CommissionerControl::Id; } - uint64_t requestId = static_cast(0); - chip::VendorId vendorId = static_cast(0); - uint16_t productId = static_cast(0); + uint64_t requestID = static_cast(0); + chip::VendorId vendorID = static_cast(0); + uint16_t productID = static_cast(0); Optional label; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -41979,9 +41969,9 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::RequestCommissioningApproval::Id; } static constexpr ClusterId GetClusterId() { return Clusters::CommissionerControl::Id; } - uint64_t requestId = static_cast(0); - chip::VendorId vendorId = static_cast(0); - uint16_t productId = static_cast(0); + uint64_t requestID = static_cast(0); + chip::VendorId vendorID = static_cast(0); + uint16_t productID = static_cast(0); Optional label; CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -41989,10 +41979,8 @@ struct DecodableType namespace CommissionNode { enum class Fields : uint8_t { - kRequestId = 0, + kRequestID = 0, kResponseTimeoutSeconds = 1, - kIpAddress = 2, - kPort = 3, }; struct Type @@ -42002,10 +41990,8 @@ struct Type static constexpr CommandId GetCommandId() { return Commands::CommissionNode::Id; } static constexpr ClusterId GetClusterId() { return Clusters::CommissionerControl::Id; } - uint64_t requestId = static_cast(0); + uint64_t requestID = static_cast(0); uint16_t responseTimeoutSeconds = static_cast(0); - Optional ipAddress; - Optional port; CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -42020,10 +42006,8 @@ struct DecodableType static constexpr CommandId GetCommandId() { return Commands::CommissionNode::Id; } static constexpr ClusterId GetClusterId() { return Clusters::CommissionerControl::Id; } - uint64_t requestId = static_cast(0); + uint64_t requestID = static_cast(0); uint16_t responseTimeoutSeconds = static_cast(0); - Optional ipAddress; - Optional port; CHIP_ERROR Decode(TLV::TLVReader & reader); }; }; // namespace CommissionNode @@ -42149,8 +42133,8 @@ static constexpr PriorityLevel kPriorityLevel = PriorityLevel::Info; enum class Fields : uint8_t { - kRequestId = 0, - kClientNodeId = 1, + kRequestID = 0, + kClientNodeID = 1, kStatusCode = 2, kFabricIndex = 254, }; @@ -42163,8 +42147,8 @@ struct Type static constexpr ClusterId GetClusterId() { return Clusters::CommissionerControl::Id; } static constexpr bool kIsFabricScoped = true; - uint64_t requestId = static_cast(0); - chip::NodeId clientNodeId = static_cast(0); + uint64_t requestID = static_cast(0); + chip::NodeId clientNodeID = static_cast(0); uint8_t statusCode = static_cast(0); chip::FabricIndex fabricIndex = static_cast(0); @@ -42180,8 +42164,8 @@ struct DecodableType static constexpr EventId GetEventId() { return Events::CommissioningRequestResult::Id; } static constexpr ClusterId GetClusterId() { return Clusters::CommissionerControl::Id; } - uint64_t requestId = static_cast(0); - chip::NodeId clientNodeId = static_cast(0); + uint64_t requestID = static_cast(0); + chip::NodeId clientNodeID = static_cast(0); uint8_t statusCode = static_cast(0); chip::FabricIndex fabricIndex = static_cast(0); @@ -46775,6 +46759,30 @@ struct TypeInfo static constexpr bool MustUseTimedWrite() { return false; } }; } // namespace Unsupported +namespace ReadFailureCode { +struct TypeInfo +{ + using Type = uint8_t; + using DecodableType = uint8_t; + using DecodableArgType = uint8_t; + + static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::ReadFailureCode::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace ReadFailureCode +namespace FailureInt32U { +struct TypeInfo +{ + using Type = uint32_t; + using DecodableType = uint32_t; + using DecodableArgType = uint32_t; + + static constexpr ClusterId GetClusterId() { return Clusters::UnitTesting::Id; } + static constexpr AttributeId GetAttributeId() { return Attributes::FailureInt32U::Id; } + static constexpr bool MustUseTimedWrite() { return false; } +}; +} // namespace FailureInt32U namespace NullableBoolean { struct TypeInfo { @@ -47325,7 +47333,9 @@ struct TypeInfo Attributes::ClusterErrorBoolean::TypeInfo::DecodableType clusterErrorBoolean = static_cast(0); Attributes::GlobalEnum::TypeInfo::DecodableType globalEnum = static_cast(0); Attributes::GlobalStruct::TypeInfo::DecodableType globalStruct; - Attributes::Unsupported::TypeInfo::DecodableType unsupported = static_cast(0); + Attributes::Unsupported::TypeInfo::DecodableType unsupported = static_cast(0); + Attributes::ReadFailureCode::TypeInfo::DecodableType readFailureCode = static_cast(0); + Attributes::FailureInt32U::TypeInfo::DecodableType failureInt32U = static_cast(0); Attributes::NullableBoolean::TypeInfo::DecodableType nullableBoolean; Attributes::NullableBitmap8::TypeInfo::DecodableType nullableBitmap8; Attributes::NullableBitmap16::TypeInfo::DecodableType nullableBitmap16; 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 85d56a98880f99..6e19a4c970df77 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 @@ -7490,16 +7490,12 @@ static constexpr AttributeId Id = Globals::Attributes::ClusterRevision::Id; namespace EcosystemInformation { namespace Attributes { -namespace RemovedOn { -static constexpr AttributeId Id = 0x00000000; -} // namespace RemovedOn - namespace DeviceDirectory { -static constexpr AttributeId Id = 0x00000001; +static constexpr AttributeId Id = 0x00000000; } // namespace DeviceDirectory namespace LocationDirectory { -static constexpr AttributeId Id = 0x00000002; +static constexpr AttributeId Id = 0x00000001; } // namespace LocationDirectory namespace GeneratedCommandList { @@ -8308,6 +8304,14 @@ namespace Unsupported { static constexpr AttributeId Id = 0x000000FF; } // namespace Unsupported +namespace ReadFailureCode { +static constexpr AttributeId Id = 0x00003000; +} // namespace ReadFailureCode + +namespace FailureInt32U { +static constexpr AttributeId Id = 0x00003001; +} // namespace FailureInt32U + namespace NullableBoolean { static constexpr AttributeId Id = 0x00004000; } // namespace NullableBoolean 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 4227a6ab527ba2..0756af5268e9ed 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 @@ -36,12 +36,8 @@ namespace AccessControlExtensionChanged { static constexpr EventId Id = 0x00000001; } // namespace AccessControlExtensionChanged -namespace AccessRestrictionEntryChanged { -static constexpr EventId Id = 0x00000002; -} // namespace AccessRestrictionEntryChanged - namespace FabricRestrictionReviewUpdate { -static constexpr EventId Id = 0x00000003; +static constexpr EventId Id = 0x00000002; } // namespace FabricRestrictionReviewUpdate } // namespace Events @@ -637,6 +633,16 @@ static constexpr EventId Id = 0x00000010; } // namespace Events } // namespace PumpConfigurationAndControl +namespace OccupancySensing { +namespace Events { + +namespace OccupancyChanged { +static constexpr EventId Id = 0x00000000; +} // namespace OccupancyChanged + +} // namespace Events +} // namespace OccupancySensing + namespace TargetNavigator { namespace Events { diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index add8258f1e9db3..c01a3135dc46bd 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -1273,8 +1273,7 @@ class LevelControlMoveToClosestFrequency : public ClusterCommand | Events: | | | * AccessControlEntryChanged | 0x0000 | | * AccessControlExtensionChanged | 0x0001 | -| * AccessRestrictionEntryChanged | 0x0002 | -| * FabricRestrictionReviewUpdate | 0x0003 | +| * FabricRestrictionReviewUpdate | 0x0002 | \*----------------------------------------------------------------------------*/ /* @@ -3528,6 +3527,7 @@ class BridgedDeviceBasicInformationKeepActive : public ClusterCommand ClusterCommand("keep-active", credsIssuerConfig) { AddArgument("StayActiveDuration", 0, UINT32_MAX, &mRequest.stayActiveDuration); + AddArgument("TimeoutMs", 0, UINT32_MAX, &mRequest.timeoutMs); ClusterCommand::AddArguments(); } @@ -10994,6 +10994,7 @@ class ColorControlStepColorTemperature : public ClusterCommand | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * OccupancyChanged | 0x0000 | \*----------------------------------------------------------------------------*/ /*----------------------------------------------------------------------------*\ @@ -13800,9 +13801,8 @@ class ContentAppObserverContentAppMessage : public ClusterCommand | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * RemovedOn | 0x0000 | -| * DeviceDirectory | 0x0001 | -| * LocationDirectory | 0x0002 | +| * DeviceDirectory | 0x0000 | +| * LocationDirectory | 0x0001 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -13842,9 +13842,9 @@ class CommissionerControlRequestCommissioningApproval : public ClusterCommand CommissionerControlRequestCommissioningApproval(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("request-commissioning-approval", credsIssuerConfig) { - AddArgument("RequestId", 0, UINT64_MAX, &mRequest.requestId); - AddArgument("VendorId", 0, UINT16_MAX, &mRequest.vendorId); - AddArgument("ProductId", 0, UINT16_MAX, &mRequest.productId); + AddArgument("RequestID", 0, UINT64_MAX, &mRequest.requestID); + AddArgument("VendorID", 0, UINT16_MAX, &mRequest.vendorID); + AddArgument("ProductID", 0, UINT16_MAX, &mRequest.productID); AddArgument("Label", &mRequest.label); ClusterCommand::AddArguments(); } @@ -13883,10 +13883,8 @@ class CommissionerControlCommissionNode : public ClusterCommand CommissionerControlCommissionNode(CredentialIssuerCommands * credsIssuerConfig) : ClusterCommand("commission-node", credsIssuerConfig) { - AddArgument("RequestId", 0, UINT64_MAX, &mRequest.requestId); + AddArgument("RequestID", 0, UINT64_MAX, &mRequest.requestID); AddArgument("ResponseTimeoutSeconds", 0, UINT16_MAX, &mRequest.responseTimeoutSeconds); - AddArgument("IpAddress", &mRequest.ipAddress); - AddArgument("Port", 0, UINT16_MAX, &mRequest.port); ClusterCommand::AddArguments(); } @@ -14223,6 +14221,8 @@ class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand | * GlobalEnum | 0x0033 | | * GlobalStruct | 0x0034 | | * Unsupported | 0x00FF | +| * ReadFailureCode | 0x3000 | +| * FailureInt32U | 0x3001 | | * NullableBoolean | 0x4000 | | * NullableBitmap8 | 0x4001 | | * NullableBitmap16 | 0x4002 | @@ -16284,8 +16284,6 @@ void registerClusterAccessControl(Commands & commands, CredentialIssuerCommands make_unique(Id, "access-control-entry-changed", Events::AccessControlEntryChanged::Id, credsIssuerConfig), // make_unique(Id, "access-control-extension-changed", Events::AccessControlExtensionChanged::Id, credsIssuerConfig), // - make_unique(Id, "access-restriction-entry-changed", Events::AccessRestrictionEntryChanged::Id, - credsIssuerConfig), // make_unique(Id, "fabric-restriction-review-update", Events::FabricRestrictionReviewUpdate::Id, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // @@ -16293,8 +16291,6 @@ void registerClusterAccessControl(Commands & commands, CredentialIssuerCommands credsIssuerConfig), // make_unique(Id, "access-control-extension-changed", Events::AccessControlExtensionChanged::Id, credsIssuerConfig), // - make_unique(Id, "access-restriction-entry-changed", Events::AccessRestrictionEntryChanged::Id, - credsIssuerConfig), // make_unique(Id, "fabric-restriction-review-update", Events::FabricRestrictionReviewUpdate::Id, credsIssuerConfig), // }; @@ -24520,8 +24516,10 @@ void registerClusterOccupancySensing(Commands & commands, CredentialIssuerComman // // Events // - make_unique(Id, credsIssuerConfig), // - make_unique(Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "occupancy-changed", Events::OccupancyChanged::Id, credsIssuerConfig), // + make_unique(Id, credsIssuerConfig), // + make_unique(Id, "occupancy-changed", Events::OccupancyChanged::Id, credsIssuerConfig), // }; commands.RegisterCluster(clusterName, clusterCommands); @@ -26803,7 +26801,6 @@ void registerClusterEcosystemInformation(Commands & commands, CredentialIssuerCo // Attributes // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "removed-on", Attributes::RemovedOn::Id, credsIssuerConfig), // make_unique(Id, "device-directory", Attributes::DeviceDirectory::Id, credsIssuerConfig), // make_unique(Id, "location-directory", Attributes::LocationDirectory::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // @@ -26813,8 +26810,6 @@ void registerClusterEcosystemInformation(Commands & commands, CredentialIssuerCo 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, "removed-on", 0, UINT64_MAX, Attributes::RemovedOn::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique>>( Id, "device-directory", Attributes::DeviceDirectory::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // @@ -26835,7 +26830,6 @@ void registerClusterEcosystemInformation(Commands & commands, CredentialIssuerCo make_unique>(Id, "cluster-revision", 0, UINT16_MAX, Attributes::ClusterRevision::Id, WriteCommandType::kForceWrite, credsIssuerConfig), // make_unique(Id, credsIssuerConfig), // - make_unique(Id, "removed-on", Attributes::RemovedOn::Id, credsIssuerConfig), // make_unique(Id, "device-directory", Attributes::DeviceDirectory::Id, credsIssuerConfig), // make_unique(Id, "location-directory", Attributes::LocationDirectory::Id, credsIssuerConfig), // make_unique(Id, "generated-command-list", Attributes::GeneratedCommandList::Id, credsIssuerConfig), // @@ -27705,6 +27699,8 @@ void registerClusterUnitTesting(Commands & commands, CredentialIssuerCommands * make_unique(Id, "global-enum", Attributes::GlobalEnum::Id, credsIssuerConfig), // make_unique(Id, "global-struct", Attributes::GlobalStruct::Id, credsIssuerConfig), // make_unique(Id, "unsupported", Attributes::Unsupported::Id, credsIssuerConfig), // + make_unique(Id, "read-failure-code", Attributes::ReadFailureCode::Id, credsIssuerConfig), // + make_unique(Id, "failure-int32u", Attributes::FailureInt32U::Id, credsIssuerConfig), // make_unique(Id, "nullable-boolean", Attributes::NullableBoolean::Id, credsIssuerConfig), // make_unique(Id, "nullable-bitmap8", Attributes::NullableBitmap8::Id, credsIssuerConfig), // make_unique(Id, "nullable-bitmap16", Attributes::NullableBitmap16::Id, credsIssuerConfig), // @@ -27859,6 +27855,10 @@ void registerClusterUnitTesting(Commands & commands, CredentialIssuerCommands * Id, "global-struct", Attributes::GlobalStruct::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique>(Id, "unsupported", 0, 1, Attributes::Unsupported::Id, WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>(Id, "read-failure-code", 0, UINT8_MAX, Attributes::ReadFailureCode::Id, + WriteCommandType::kWrite, credsIssuerConfig), // + make_unique>(Id, "failure-int32u", 0, UINT32_MAX, Attributes::FailureInt32U::Id, + WriteCommandType::kWrite, credsIssuerConfig), // make_unique>>( Id, "nullable-boolean", 0, 1, Attributes::NullableBoolean::Id, WriteCommandType::kWrite, credsIssuerConfig), // make_unique< @@ -28024,6 +28024,8 @@ void registerClusterUnitTesting(Commands & commands, CredentialIssuerCommands * make_unique(Id, "global-enum", Attributes::GlobalEnum::Id, credsIssuerConfig), // make_unique(Id, "global-struct", Attributes::GlobalStruct::Id, credsIssuerConfig), // make_unique(Id, "unsupported", Attributes::Unsupported::Id, credsIssuerConfig), // + make_unique(Id, "read-failure-code", Attributes::ReadFailureCode::Id, credsIssuerConfig), // + make_unique(Id, "failure-int32u", Attributes::FailureInt32U::Id, credsIssuerConfig), // make_unique(Id, "nullable-boolean", Attributes::NullableBoolean::Id, credsIssuerConfig), // make_unique(Id, "nullable-bitmap8", Attributes::NullableBitmap8::Id, credsIssuerConfig), // make_unique(Id, "nullable-bitmap16", Attributes::NullableBitmap16::Id, 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 16248a7ca4e157..2d788bd2613215 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -5613,22 +5613,6 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } -CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, - const AccessControl::Events::AccessRestrictionEntryChanged::DecodableType & value) -{ - DataModelLogger::LogString(label, indent, "{"); - { - CHIP_ERROR err = DataModelLogger::LogValue("FabricIndex", indent + 1, value.fabricIndex); - if (err != CHIP_NO_ERROR) - { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'FabricIndex'"); - return err; - } - } - DataModelLogger::LogString(indent, "}"); - - return CHIP_NO_ERROR; -} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const AccessControl::Events::FabricRestrictionReviewUpdate::DecodableType & value) { @@ -5650,10 +5634,10 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, } } { - CHIP_ERROR err = DataModelLogger::LogValue("RedirectURL", indent + 1, value.redirectURL); + CHIP_ERROR err = DataModelLogger::LogValue("ARLRequestFlowUrl", indent + 1, value.ARLRequestFlowUrl); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'RedirectURL'"); + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ARLRequestFlowUrl'"); return err; } } @@ -7755,6 +7739,22 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, return CHIP_NO_ERROR; } +CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, + const OccupancySensing::Events::OccupancyChanged::DecodableType & value) +{ + DataModelLogger::LogString(label, indent, "{"); + { + CHIP_ERROR err = DataModelLogger::LogValue("Occupancy", indent + 1, value.occupancy); + if (err != CHIP_NO_ERROR) + { + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'Occupancy'"); + return err; + } + } + DataModelLogger::LogString(indent, "}"); + + return CHIP_NO_ERROR; +} CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, const TargetNavigator::Events::TargetUpdated::DecodableType & value) { @@ -7896,18 +7896,18 @@ CHIP_ERROR DataModelLogger::LogValue(const char * label, size_t indent, { DataModelLogger::LogString(label, indent, "{"); { - CHIP_ERROR err = DataModelLogger::LogValue("RequestId", indent + 1, value.requestId); + CHIP_ERROR err = DataModelLogger::LogValue("RequestID", indent + 1, value.requestID); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'RequestId'"); + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'RequestID'"); return err; } } { - CHIP_ERROR err = DataModelLogger::LogValue("ClientNodeId", indent + 1, value.clientNodeId); + CHIP_ERROR err = DataModelLogger::LogValue("ClientNodeID", indent + 1, value.clientNodeID); if (err != CHIP_NO_ERROR) { - DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ClientNodeId'"); + DataModelLogger::LogString(indent + 1, "Event truncated due to invalid value for 'ClientNodeID'"); return err; } } @@ -18153,11 +18153,6 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP case EcosystemInformation::Id: { switch (path.mAttributeId) { - case EcosystemInformation::Attributes::RemovedOn::Id: { - chip::app::DataModel::Nullable value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("RemovedOn", 1, value); - } case EcosystemInformation::Attributes::DeviceDirectory::Id: { chip::app::DataModel::DecodableList< chip::app::Clusters::EcosystemInformation::Structs::EcosystemDeviceStruct::DecodableType> @@ -19178,6 +19173,16 @@ CHIP_ERROR DataModelLogger::LogAttribute(const chip::app::ConcreteDataAttributeP ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("unsupported", 1, value); } + case UnitTesting::Attributes::ReadFailureCode::Id: { + uint8_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("readFailureCode", 1, value); + } + case UnitTesting::Attributes::FailureInt32U::Id: { + uint32_t value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("failureInt32U", 1, value); + } case UnitTesting::Attributes::NullableBoolean::Id: { chip::app::DataModel::Nullable value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); @@ -20249,11 +20254,6 @@ CHIP_ERROR DataModelLogger::LogEvent(const chip::app::EventHeader & header, chip ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); return DataModelLogger::LogValue("AccessControlExtensionChanged", 1, value); } - case AccessControl::Events::AccessRestrictionEntryChanged::Id: { - chip::app::Clusters::AccessControl::Events::AccessRestrictionEntryChanged::DecodableType value; - ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); - return DataModelLogger::LogValue("AccessRestrictionEntryChanged", 1, value); - } case AccessControl::Events::FabricRestrictionReviewUpdate::Id: { chip::app::Clusters::AccessControl::Events::FabricRestrictionReviewUpdate::DecodableType value; ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); @@ -20956,6 +20956,17 @@ CHIP_ERROR DataModelLogger::LogEvent(const chip::app::EventHeader & header, chip } break; } + case OccupancySensing::Id: { + switch (header.mPath.mEventId) + { + case OccupancySensing::Events::OccupancyChanged::Id: { + chip::app::Clusters::OccupancySensing::Events::OccupancyChanged::DecodableType value; + ReturnErrorOnFailure(chip::app::DataModel::Decode(*data, value)); + return DataModelLogger::LogValue("OccupancyChanged", 1, value); + } + } + break; + } case TargetNavigator::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 5646abd25a011a..ce1aa0b46f01da 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.h @@ -436,8 +436,6 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::AccessControl::Events::AccessControlEntryChanged::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::AccessControl::Events::AccessControlExtensionChanged::DecodableType & value); -static CHIP_ERROR LogValue(const char * label, size_t indent, - const chip::app::Clusters::AccessControl::Events::AccessRestrictionEntryChanged::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::AccessControl::Events::FabricRestrictionReviewUpdate::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, @@ -664,6 +662,8 @@ static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::PumpConfigurationAndControl::Events::AirDetection::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::PumpConfigurationAndControl::Events::TurbineOperation::DecodableType & value); +static CHIP_ERROR LogValue(const char * label, size_t indent, + const chip::app::Clusters::OccupancySensing::Events::OccupancyChanged::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, const chip::app::Clusters::TargetNavigator::Events::TargetUpdated::DecodableType & value); static CHIP_ERROR LogValue(const char * label, size_t indent, diff --git a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp index c97ff2590fa60b..07bac4319c7c61 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp @@ -4485,8 +4485,6 @@ char const * AttributeIdToText(chip::ClusterId cluster, chip::AttributeId id) case chip::app::Clusters::EcosystemInformation::Id: { switch (id) { - case chip::app::Clusters::EcosystemInformation::Attributes::RemovedOn::Id: - return "RemovedOn"; case chip::app::Clusters::EcosystemInformation::Attributes::DeviceDirectory::Id: return "DeviceDirectory"; case chip::app::Clusters::EcosystemInformation::Attributes::LocationDirectory::Id: @@ -4906,6 +4904,10 @@ char const * AttributeIdToText(chip::ClusterId cluster, chip::AttributeId id) return "GlobalStruct"; case chip::app::Clusters::UnitTesting::Attributes::Unsupported::Id: return "Unsupported"; + case chip::app::Clusters::UnitTesting::Attributes::ReadFailureCode::Id: + return "ReadFailureCode"; + case chip::app::Clusters::UnitTesting::Attributes::FailureInt32U::Id: + return "FailureInt32U"; case chip::app::Clusters::UnitTesting::Attributes::NullableBoolean::Id: return "NullableBoolean"; case chip::app::Clusters::UnitTesting::Attributes::NullableBitmap8::Id: 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 dc438df840c885..0f3dc4f7991331 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -10090,8 +10090,7 @@ class SubscribeAttributeBindingClusterRevision : public SubscribeAttribute { | Events: | | | * AccessControlEntryChanged | 0x0000 | | * AccessControlExtensionChanged | 0x0001 | -| * AccessRestrictionEntryChanged | 0x0002 | -| * FabricRestrictionReviewUpdate | 0x0003 | +| * FabricRestrictionReviewUpdate | 0x0002 | \*----------------------------------------------------------------------------*/ #if MTR_ENABLE_PROVISIONAL @@ -10153,12 +10152,18 @@ class AccessControlReviewFabricRestrictions : public ClusterCommand { uint16_t __block responsesNeeded = repeatCount; while (repeatCount--) { [cluster reviewFabricRestrictionsWithParams:params completion: - ^(NSError * _Nullable error) { + ^(MTRAccessControlClusterReviewFabricRestrictionsResponseParams * _Nullable values, NSError * _Nullable error) { + NSLog(@"Values: %@", values); + if (error == nil) { + constexpr chip::CommandId responseId = chip::app::Clusters::AccessControl::Commands::ReviewFabricRestrictionsResponse::Id; + RemoteDataModelLogger::LogCommandAsJSON(@(endpointId), @(clusterId), @(responseId), values); + } responsesNeeded--; if (error != nil) { mError = error; LogNSError("Error", error); - RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(commandId), error); + constexpr chip::CommandId responseId = chip::app::Clusters::AccessControl::Commands::ReviewFabricRestrictionsResponse::Id; + RemoteDataModelLogger::LogCommandErrorAsJSON(@(endpointId), @(clusterId), @(responseId), error); } if (responsesNeeded == 0) { SetCommandExitStatus(mError); @@ -40189,6 +40194,9 @@ class BridgedDeviceBasicInformationKeepActive : public ClusterCommand { { #if MTR_ENABLE_PROVISIONAL AddArgument("StayActiveDuration", 0, UINT32_MAX, &mRequest.stayActiveDuration); +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + AddArgument("TimeoutMs", 0, UINT32_MAX, &mRequest.timeoutMs); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -40206,6 +40214,9 @@ class BridgedDeviceBasicInformationKeepActive : public ClusterCommand { params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL params.stayActiveDuration = [NSNumber numberWithUnsignedInt:mRequest.stayActiveDuration]; +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + params.timeoutMs = [NSNumber numberWithUnsignedInt:mRequest.timeoutMs]; #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; @@ -130841,6 +130852,7 @@ class SubscribeAttributeRelativeHumidityMeasurementClusterRevision : public Subs | * ClusterRevision | 0xFFFD | |------------------------------------------------------------------------------| | Events: | | +| * OccupancyChanged | 0x0000 | \*----------------------------------------------------------------------------*/ /* @@ -163934,9 +163946,8 @@ class SubscribeAttributeContentAppObserverClusterRevision : public SubscribeAttr | Commands: | | |------------------------------------------------------------------------------| | Attributes: | | -| * RemovedOn | 0x0000 | -| * DeviceDirectory | 0x0001 | -| * LocationDirectory | 0x0002 | +| * DeviceDirectory | 0x0000 | +| * LocationDirectory | 0x0001 | | * GeneratedCommandList | 0xFFF8 | | * AcceptedCommandList | 0xFFF9 | | * EventList | 0xFFFA | @@ -163949,91 +163960,6 @@ class SubscribeAttributeContentAppObserverClusterRevision : public SubscribeAttr #if MTR_ENABLE_PROVISIONAL -/* - * Attribute RemovedOn - */ -class ReadEcosystemInformationRemovedOn : public ReadAttribute { -public: - ReadEcosystemInformationRemovedOn() - : ReadAttribute("removed-on") - { - } - - ~ReadEcosystemInformationRemovedOn() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; - constexpr chip::AttributeId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::RemovedOn::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); - - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - [cluster readAttributeRemovedOnWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EcosystemInformation.RemovedOn response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - LogNSError("EcosystemInformation RemovedOn read Error", error); - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - return CHIP_NO_ERROR; - } -}; - -class SubscribeAttributeEcosystemInformationRemovedOn : public SubscribeAttribute { -public: - SubscribeAttributeEcosystemInformationRemovedOn() - : SubscribeAttribute("removed-on") - { - } - - ~SubscribeAttributeEcosystemInformationRemovedOn() - { - } - - CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override - { - constexpr chip::ClusterId clusterId = chip::app::Clusters::EcosystemInformation::Id; - constexpr chip::CommandId attributeId = chip::app::Clusters::EcosystemInformation::Attributes::RemovedOn::Id; - - ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); - dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); - __auto_type * cluster = [[MTRBaseClusterEcosystemInformation alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; - __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; - if (mKeepSubscriptions.HasValue()) { - params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); - } - if (mFabricFiltered.HasValue()) { - params.filterByFabric = mFabricFiltered.Value(); - } - if (mAutoResubscribe.HasValue()) { - params.resubscribeAutomatically = mAutoResubscribe.Value(); - } - [cluster subscribeAttributeRemovedOnWithParams:params - subscriptionEstablished:^() { mSubscriptionEstablished = YES; } - reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { - NSLog(@"EcosystemInformation.RemovedOn response %@", [value description]); - if (error == nil) { - RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); - } else { - RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); - } - SetCommandExitStatus(error); - }]; - - return CHIP_NO_ERROR; - } -}; - -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - /* * Attribute DeviceDirectory */ @@ -164752,13 +164678,13 @@ class CommissionerControlRequestCommissioningApproval : public ClusterCommand { : ClusterCommand("request-commissioning-approval") { #if MTR_ENABLE_PROVISIONAL - AddArgument("RequestId", 0, UINT64_MAX, &mRequest.requestId); + AddArgument("RequestID", 0, UINT64_MAX, &mRequest.requestID); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - AddArgument("VendorId", 0, UINT16_MAX, &mRequest.vendorId); + AddArgument("VendorID", 0, UINT16_MAX, &mRequest.vendorID); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - AddArgument("ProductId", 0, UINT16_MAX, &mRequest.productId); + AddArgument("ProductID", 0, UINT16_MAX, &mRequest.productID); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL AddArgument("Label", &mRequest.label); @@ -164778,13 +164704,13 @@ class CommissionerControlRequestCommissioningApproval : public ClusterCommand { __auto_type * params = [[MTRCommissionerControlClusterRequestCommissioningApprovalParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.requestId = [NSNumber numberWithUnsignedLongLong:mRequest.requestId]; + params.requestID = [NSNumber numberWithUnsignedLongLong:mRequest.requestID]; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - params.vendorId = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.vendorId)]; + params.vendorID = [NSNumber numberWithUnsignedShort:chip::to_underlying(mRequest.vendorID)]; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL - params.productId = [NSNumber numberWithUnsignedShort:mRequest.productId]; + params.productID = [NSNumber numberWithUnsignedShort:mRequest.productID]; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL if (mRequest.label.HasValue()) { @@ -164827,16 +164753,10 @@ class CommissionerControlCommissionNode : public ClusterCommand { : ClusterCommand("commission-node") { #if MTR_ENABLE_PROVISIONAL - AddArgument("RequestId", 0, UINT64_MAX, &mRequest.requestId); + AddArgument("RequestID", 0, UINT64_MAX, &mRequest.requestID); #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL AddArgument("ResponseTimeoutSeconds", 0, UINT16_MAX, &mRequest.responseTimeoutSeconds); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("IpAddress", &mRequest.ipAddress); -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - AddArgument("Port", 0, UINT16_MAX, &mRequest.port); #endif // MTR_ENABLE_PROVISIONAL ClusterCommand::AddArguments(); } @@ -164853,24 +164773,10 @@ class CommissionerControlCommissionNode : public ClusterCommand { __auto_type * params = [[MTRCommissionerControlClusterCommissionNodeParams alloc] init]; params.timedInvokeTimeoutMs = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; #if MTR_ENABLE_PROVISIONAL - params.requestId = [NSNumber numberWithUnsignedLongLong:mRequest.requestId]; + params.requestID = [NSNumber numberWithUnsignedLongLong:mRequest.requestID]; #endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL params.responseTimeoutSeconds = [NSNumber numberWithUnsignedShort:mRequest.responseTimeoutSeconds]; -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.ipAddress.HasValue()) { - params.ipAddress = [NSData dataWithBytes:mRequest.ipAddress.Value().data() length:mRequest.ipAddress.Value().size()]; - } else { - params.ipAddress = nil; - } -#endif // MTR_ENABLE_PROVISIONAL -#if MTR_ENABLE_PROVISIONAL - if (mRequest.port.HasValue()) { - params.port = [NSNumber numberWithUnsignedShort:mRequest.port.Value()]; - } else { - params.port = nil; - } #endif // MTR_ENABLE_PROVISIONAL uint16_t repeatCount = mRepeatCount.ValueOr(1); uint16_t __block responsesNeeded = repeatCount; @@ -177143,6 +177049,8 @@ class SubscribeAttributeElectricalMeasurementClusterRevision : public SubscribeA | * GlobalEnum | 0x0033 | | * GlobalStruct | 0x0034 | | * Unsupported | 0x00FF | +| * ReadFailureCode | 0x3000 | +| * FailureInt32U | 0x3001 | | * NullableBoolean | 0x4000 | | * NullableBitmap8 | 0x4001 | | * NullableBitmap16 | 0x4002 | @@ -185666,6 +185574,259 @@ class SubscribeAttributeUnitTestingUnsupported : public SubscribeAttribute { } }; +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute ReadFailureCode + */ +class ReadUnitTestingReadFailureCode : public ReadAttribute { +public: + ReadUnitTestingReadFailureCode() + : ReadAttribute("read-failure-code") + { + } + + ~ReadUnitTestingReadFailureCode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::ReadFailureCode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeReadFailureCodeWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitTesting.ReadFailureCode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("UnitTesting ReadFailureCode read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteUnitTestingReadFailureCode : public WriteAttribute { +public: + WriteUnitTestingReadFailureCode() + : WriteAttribute("read-failure-code") + { + AddArgument("attr-name", "read-failure-code"); + AddArgument("attr-value", 0, UINT8_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteUnitTestingReadFailureCode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::ReadFailureCode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedChar:mValue]; + + [cluster writeAttributeReadFailureCodeWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("UnitTesting ReadFailureCode write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint8_t mValue; +}; + +class SubscribeAttributeUnitTestingReadFailureCode : public SubscribeAttribute { +public: + SubscribeAttributeUnitTestingReadFailureCode() + : SubscribeAttribute("read-failure-code") + { + } + + ~SubscribeAttributeUnitTestingReadFailureCode() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::ReadFailureCode::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeReadFailureCodeWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitTesting.ReadFailureCode response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + +/* + * Attribute FailureInt32U + */ +class ReadUnitTestingFailureInt32U : public ReadAttribute { +public: + ReadUnitTestingFailureInt32U() + : ReadAttribute("failure-int32u") + { + } + + ~ReadUnitTestingFailureInt32U() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::FailureInt32U::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReadAttribute (0x%08" PRIX32 ") on endpoint %u", endpointId, clusterId, attributeId); + + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + [cluster readAttributeFailureInt32UWithCompletion:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitTesting.FailureInt32U response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + LogNSError("UnitTesting FailureInt32U read Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } +}; + +class WriteUnitTestingFailureInt32U : public WriteAttribute { +public: + WriteUnitTestingFailureInt32U() + : WriteAttribute("failure-int32u") + { + AddArgument("attr-name", "failure-int32u"); + AddArgument("attr-value", 0, UINT32_MAX, &mValue); + WriteAttribute::AddArguments(); + } + + ~WriteUnitTestingFailureInt32U() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::AttributeId attributeId = chip::app::Clusters::UnitTesting::Attributes::FailureInt32U::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") WriteAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRWriteParams alloc] init]; + params.timedWriteTimeout = mTimedInteractionTimeoutMs.HasValue() ? [NSNumber numberWithUnsignedShort:mTimedInteractionTimeoutMs.Value()] : nil; + params.dataVersion = mDataVersion.HasValue() ? [NSNumber numberWithUnsignedInt:mDataVersion.Value()] : nil; + NSNumber * _Nonnull value = [NSNumber numberWithUnsignedInt:mValue]; + + [cluster writeAttributeFailureInt32UWithValue:value params:params completion:^(NSError * _Nullable error) { + if (error != nil) { + LogNSError("UnitTesting FailureInt32U write Error", error); + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + return CHIP_NO_ERROR; + } + +private: + uint32_t mValue; +}; + +class SubscribeAttributeUnitTestingFailureInt32U : public SubscribeAttribute { +public: + SubscribeAttributeUnitTestingFailureInt32U() + : SubscribeAttribute("failure-int32u") + { + } + + ~SubscribeAttributeUnitTestingFailureInt32U() + { + } + + CHIP_ERROR SendCommand(MTRBaseDevice * device, chip::EndpointId endpointId) override + { + constexpr chip::ClusterId clusterId = chip::app::Clusters::UnitTesting::Id; + constexpr chip::CommandId attributeId = chip::app::Clusters::UnitTesting::Attributes::FailureInt32U::Id; + + ChipLogProgress(chipTool, "Sending cluster (0x%08" PRIX32 ") ReportAttribute (0x%08" PRIX32 ") on endpoint %u", clusterId, attributeId, endpointId); + dispatch_queue_t callbackQueue = dispatch_queue_create("com.chip.command", DISPATCH_QUEUE_SERIAL); + __auto_type * cluster = [[MTRBaseClusterUnitTesting alloc] initWithDevice:device endpointID:@(endpointId) queue:callbackQueue]; + __auto_type * params = [[MTRSubscribeParams alloc] initWithMinInterval:@(mMinInterval) maxInterval:@(mMaxInterval)]; + if (mKeepSubscriptions.HasValue()) { + params.replaceExistingSubscriptions = !mKeepSubscriptions.Value(); + } + if (mFabricFiltered.HasValue()) { + params.filterByFabric = mFabricFiltered.Value(); + } + if (mAutoResubscribe.HasValue()) { + params.resubscribeAutomatically = mAutoResubscribe.Value(); + } + [cluster subscribeAttributeFailureInt32UWithParams:params + subscriptionEstablished:^() { mSubscriptionEstablished = YES; } + reportHandler:^(NSNumber * _Nullable value, NSError * _Nullable error) { + NSLog(@"UnitTesting.FailureInt32U response %@", [value description]); + if (error == nil) { + RemoteDataModelLogger::LogAttributeAsJSON(@(endpointId), @(clusterId), @(attributeId), value); + } else { + RemoteDataModelLogger::LogAttributeErrorAsJSON(@(endpointId), @(clusterId), @(attributeId), error); + } + SetCommandExitStatus(error); + }]; + + return CHIP_NO_ERROR; + } +}; + +#endif // MTR_ENABLE_PROVISIONAL + /* * Attribute NullableBoolean */ @@ -197133,6 +197294,8 @@ void registerClusterOccupancySensing(Commands & commands) make_unique(), // make_unique(), // make_unique(), // + make_unique(Id), // + make_unique(Id), // }; commands.RegisterCluster(clusterName, clusterCommands); @@ -198481,10 +198644,6 @@ void registerClusterEcosystemInformation(Commands & commands) make_unique(Id), // make_unique(Id), // make_unique(Id), // -#if MTR_ENABLE_PROVISIONAL - make_unique(), // - make_unique(), // -#endif // MTR_ENABLE_PROVISIONAL #if MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // @@ -199072,6 +199231,16 @@ void registerClusterUnitTesting(Commands & commands) make_unique(), // make_unique(), // make_unique(), // +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL +#if MTR_ENABLE_PROVISIONAL + make_unique(), // + make_unique(), // + make_unique(), // +#endif // MTR_ENABLE_PROVISIONAL make_unique(), // make_unique(), // make_unique(), //