From 1e1fe1e62c499e348c9eda90107c9bd6e61b24f9 Mon Sep 17 00:00:00 2001 From: Amine Alami <43780877+Alami-Amine@users.noreply.github.com> Date: Wed, 4 Sep 2024 10:10:19 +0200 Subject: [PATCH 01/35] Integration of pw_fuzzer using FuzzTest (#34274) * latest trial to build pw_fuzz * migrating FuzzPayloadDecoder FuzzTest * fix error related to latomic * adding template for pw_fuzz_tests * fix for linux_sysroot issue * adding FuzzTests * fixing warning issue * adding support to build pw-fuzztests with build_examples.py * Restyled by whitespace * Restyled by clang-format * adding pw_fuzz_tests to default target * fixing build_examples test golden standard * Adding Fuzzing Targets * Adding Documentation * cleaning-up tests * spelling mistakes * integrating comments --------- Co-authored-by: Restyled.io --- .github/.wordlist.txt | 3 + .gitmodules | 16 ++ BUILD.gn | 16 ++ build/chip/fuzz_test.gni | 59 +++++++ build/toolchain/pw_fuzzer/BUILD.gn | 70 ++++++++ docs/guides/BUILDING.md | 20 +++ docs/testing/fuzz_testing.md | 157 ++++++++++++++++++ scripts/build/build/targets.py | 4 + scripts/build/builders/host.py | 6 + .../build/testdata/all_targets_linux_x64.txt | 4 +- src/credentials/tests/BUILD.gn | 10 ++ src/credentials/tests/FuzzChipCertPW.cpp | 95 +++++++++++ src/lib/core/tests/BUILD.gn | 10 ++ src/lib/core/tests/FuzzTlvReaderPW.cpp | 35 ++++ src/lib/dnssd/minimal_mdns/tests/BUILD.gn | 10 ++ .../tests/FuzzPacketParsingPW.cpp | 132 +++++++++++++++ src/lib/format/tests/BUILD.gn | 15 ++ src/lib/format/tests/FuzzPayloadDecoderPW.cpp | 73 ++++++++ src/setup_payload/tests/BUILD.gn | 10 ++ src/setup_payload/tests/FuzzBase38PW.cpp | 77 +++++++++ third_party/abseil-cpp/src | 1 + third_party/fuzztest | 1 + third_party/googletest | 1 + third_party/re2/src | 1 + 24 files changed, 824 insertions(+), 2 deletions(-) create mode 100644 build/toolchain/pw_fuzzer/BUILD.gn create mode 100644 docs/testing/fuzz_testing.md create mode 100644 src/credentials/tests/FuzzChipCertPW.cpp create mode 100644 src/lib/core/tests/FuzzTlvReaderPW.cpp create mode 100644 src/lib/dnssd/minimal_mdns/tests/FuzzPacketParsingPW.cpp create mode 100644 src/lib/format/tests/FuzzPayloadDecoderPW.cpp create mode 100644 src/setup_payload/tests/FuzzBase38PW.cpp create mode 160000 third_party/abseil-cpp/src create mode 160000 third_party/fuzztest create mode 160000 third_party/googletest create mode 160000 third_party/re2/src diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 153345827ee086..4444d8299d26cb 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -37,6 +37,7 @@ AdvSendAdvert AE aef AES +AFL AIDL algs alloc @@ -570,6 +571,7 @@ fsync ftd fullclean fuzzer +fuzztest FW gbl gcloud @@ -1008,6 +1010,7 @@ optionOverride optionsMask optionsOverride orgs +OSS OTA OTADownloader otaDownloadPath 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/BUILD.gn b/BUILD.gn index c8e41976599173..4efa25007aa523 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -62,6 +62,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 +152,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/fuzz_test.gni b/build/chip/fuzz_test.gni index 784ed60273b02a..98def1dab0463d 100644 --- a/build/chip/fuzz_test.gni +++ b/build/chip/fuzz_test.gni @@ -14,12 +14,17 @@ 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") + + pw_enable_fuzz_test_targets = false } # Define a fuzz target for chip. @@ -66,3 +71,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/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/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/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/scripts/build/build/targets.py b/scripts/build/build/targets.py index efb66120ebd97b..378a286f5bf5a4 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -77,6 +77,8 @@ def BuildHostFakeTarget(): "-clang").ExceptIfRe('-ossfuzz') target.AppendModifier("ossfuzz", fuzzing_type=HostFuzzingType.OSS_FUZZ).OnlyIfRe( "-clang").ExceptIfRe('-libfuzzer') + target.AppendModifier("pw-fuzztest", fuzzing_type=HostFuzzingType.PW_FUZZTEST).OnlyIfRe( + "-clang").ExceptIfRe('-(libfuzzer|ossfuzz|asan)') target.AppendModifier('coverage', use_coverage=True).OnlyIfRe( '-(chip-tool|all-clusters)') target.AppendModifier('dmalloc', use_dmalloc=True) @@ -178,6 +180,8 @@ def BuildHostTarget(): "-clang").ExceptIfRe('-ossfuzz') target.AppendModifier("ossfuzz", fuzzing_type=HostFuzzingType.OSS_FUZZ).OnlyIfRe( "-clang").ExceptIfRe('-libfuzzer') + target.AppendModifier("pw-fuzztest", fuzzing_type=HostFuzzingType.PW_FUZZTEST).OnlyIfRe( + "-clang").ExceptIfRe('-(libfuzzer|ossfuzz|asan)') target.AppendModifier('coverage', use_coverage=True).OnlyIfRe( '-(chip-tool|all-clusters|tests)') target.AppendModifier('dmalloc', use_dmalloc=True) diff --git a/scripts/build/builders/host.py b/scripts/build/builders/host.py index c51a8ee88cb0ee..b69421a782e948 100644 --- a/scripts/build/builders/host.py +++ b/scripts/build/builders/host.py @@ -42,6 +42,7 @@ class HostFuzzingType(Enum): NONE = auto() LIB_FUZZER = auto() OSS_FUZZ = auto() + PW_FUZZTEST = auto() class HostApp(Enum): @@ -379,6 +380,8 @@ def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE, self.extra_gn_options.append('is_libfuzzer=true') elif fuzzing_type == HostFuzzingType.OSS_FUZZ: self.extra_gn_options.append('oss_fuzz=true') + elif fuzzing_type == HostFuzzingType.PW_FUZZTEST: + self.extra_gn_options.append('pw_enable_fuzz_test_targets=true') if imgui_ui: self.extra_gn_options.append('chip_examples_enable_imgui_ui=true') @@ -468,6 +471,9 @@ def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE, if self.app == HostApp.TESTS and fuzzing_type != HostFuzzingType.NONE: self.build_command = 'fuzz_tests' + if self.app == HostApp.TESTS and fuzzing_type == HostFuzzingType.PW_FUZZTEST: + self.build_command = 'pw_fuzz_tests' + def GnBuildArgs(self): if self.board == HostBoard.NATIVE: return self.extra_gn_options diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index 3c5b29050621fe..07b409c75b3b53 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -8,8 +8,8 @@ cyw30739-{cyw30739b2_p5_evk_01,cyw30739b2_p5_evk_02,cyw30739b2_p5_evk_03,cyw9307 efr32-{brd2704b,brd4316a,brd4317a,brd4318a,brd4319a,brd4186a,brd4187a,brd2601b,brd4187c,brd4186c,brd2703a,brd4338a}-{window-covering,switch,unit-test,light,lock,thermostat,pump}[-rpc][-with-ota-requestor][-icd][-low-power][-shell][-no-logging][-openthread-mtd][-heap-monitoring][-no-openthread-cli][-show-qr-code][-wifi][-rs9116][-wf200][-siwx917][-ipv4][-additional-data-advertising][-use-ot-lib][-use-ot-coap-lib][-no-version][-skip-rps-generation] esp32-{m5stack,c3devkit,devkitc,qemu}-{all-clusters,all-clusters-minimal,energy-management,ota-provider,ota-requestor,shell,light,lock,bridge,temperature-measurement,ota-requestor,tests}[-rpc][-ipv6only][-tracing] genio-lighting-app -linux-fake-tests[-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang] -linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,kotlin-matter-controller,minmdns,light,light-data-model-no-unique-id,lock,shell,ota-provider,ota-requestor,simulated-app1,simulated-app2,python-bindings,tv-app,tv-casting-app,bridge,fabric-admin,fabric-bridge,tests,chip-cert,address-resolve-tool,contact-sensor,dishwasher,microwave-oven,refrigerator,rvc,air-purifier,lit-icd,air-quality-sensor,network-manager,energy-management}[-nodeps][-nlfaultinject][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui][-evse-test-event][-enable-dnssd-tests][-disable-dnssd-tests][-chip-casting-simplified][-data-model-check][-data-model-disabled][-data-model-enabled] +linux-fake-tests[-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-pw-fuzztest][-coverage][-dmalloc][-clang] +linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,kotlin-matter-controller,minmdns,light,light-data-model-no-unique-id,lock,shell,ota-provider,ota-requestor,simulated-app1,simulated-app2,python-bindings,tv-app,tv-casting-app,bridge,fabric-admin,fabric-bridge,tests,chip-cert,address-resolve-tool,contact-sensor,dishwasher,microwave-oven,refrigerator,rvc,air-purifier,lit-icd,air-quality-sensor,network-manager,energy-management}[-nodeps][-nlfaultinject][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-pw-fuzztest][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui][-evse-test-event][-enable-dnssd-tests][-disable-dnssd-tests][-chip-casting-simplified][-data-model-check][-data-model-disabled][-data-model-enabled] linux-x64-efr32-test-runner[-clang] imx-{chip-tool,lighting-app,thermostat,all-clusters-app,all-clusters-minimal-app,ota-provider-app}[-release] infineon-psoc6-{lock,light,all-clusters,all-clusters-minimal}[-ota][-updateimage][-trustm] diff --git a/src/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/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/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/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/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/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 From 5d9b14522afc1e91f0bba78d6addd989f55f9ce6 Mon Sep 17 00:00:00 2001 From: Amine Alami <43780877+Alami-Amine@users.noreply.github.com> Date: Wed, 4 Sep 2024 12:37:51 +0200 Subject: [PATCH 02/35] Stop VSCode from Formatting .gitmodules file on save (#35373) * Stop VSCode from running Formatter on .gitmodules * associating .gitmodules with ini instead of plaintext --- .vscode/settings.json | 4 ++++ 1 file changed, 4 insertions(+) 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, From 910ef8cc78b9203004d61fe213249d943eddff29 Mon Sep 17 00:00:00 2001 From: Amine Alami <43780877+Alami-Amine@users.noreply.github.com> Date: Wed, 4 Sep 2024 14:24:02 +0200 Subject: [PATCH 03/35] [Docker Image] remove workaround for bloaty build (#35395) * remove workaround for bloaty * update version file --- integrations/docker/images/base/chip-build/Dockerfile | 8 -------- integrations/docker/images/base/chip-build/version | 2 +- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/integrations/docker/images/base/chip-build/Dockerfile b/integrations/docker/images/base/chip-build/Dockerfile index 37edf89730ecd9..db209a82f20b87 100644 --- a/integrations/docker/images/base/chip-build/Dockerfile +++ b/integrations/docker/images/base/chip-build/Dockerfile @@ -123,14 +123,6 @@ RUN set -x \ ruff \ && : # last line -#TODO Issue #35280: this is only added as a workaround to bloaty build failures, remove it once bloaty fixes issue -# Clone and install abseil-cpp -RUN git clone https://github.com/abseil/abseil-cpp.git /tmp/abseil-cpp \ - && cd /tmp/abseil-cpp \ - && cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr/local \ - && cmake --build build --target install \ - && rm -rf /tmp/abseil-cpp - # Install bloat comparison tools RUN set -x \ && git clone https://github.com/google/bloaty.git \ diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index 0ca6f37e4e236e..cad8a84802febb 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -74 : Update Silabs docker SiSDK 2024.06.1 WiseConnect 3.3.1 Wiseconnect Wifi bt sdk 2.10.0 +75: remove workaround for bloaty build, workaround involved cloning and installing abseil From 6729452294f90c3ece4af66434d73b8d9c100ff3 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 4 Sep 2024 08:27:57 -0400 Subject: [PATCH 04/35] Update spacing error for docker versioning (#35401) --- integrations/docker/images/base/chip-build/version | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/docker/images/base/chip-build/version b/integrations/docker/images/base/chip-build/version index cad8a84802febb..6ee6f069675a0c 100644 --- a/integrations/docker/images/base/chip-build/version +++ b/integrations/docker/images/base/chip-build/version @@ -1 +1 @@ -75: remove workaround for bloaty build, workaround involved cloning and installing abseil +75 : remove workaround for bloaty build, workaround involved cloning and installing abseil From f66727d82a37197e891926219b2f87fd3a1a5fd3 Mon Sep 17 00:00:00 2001 From: pankore <86098180+pankore@users.noreply.github.com> Date: Wed, 4 Sep 2024 20:30:36 +0800 Subject: [PATCH 05/35] [Ameba] refactor platform (#35396) * refactor platform codes for all-clusters-app, integrated it to platform sdk. --- .../ameba/main/chipinterface.cpp | 36 ++----------------- 1 file changed, 3 insertions(+), 33 deletions(-) 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()); -} From 23a81aece368c24559be1cc4e5869a97322684a5 Mon Sep 17 00:00:00 2001 From: joonhaengHeo <85541460+joonhaengHeo@users.noreply.github.com> Date: Wed, 4 Sep 2024 21:31:27 +0900 Subject: [PATCH 06/35] [Android] Fix DNSSD interupped system call issue (#35388) * Fix Android DNSSD signal 3 issue * Restyled by google-java-format --------- Co-authored-by: Restyled.io --- .../platform/NsdManagerServiceResolver.java | 46 ++++++++++--------- 1 file changed, 25 insertions(+), 21 deletions(-) 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 From 7bc96399c74a5e96742e29c0ee11dfd669a54d9e Mon Sep 17 00:00:00 2001 From: jamesharrow <93921463+jamesharrow@users.noreply.github.com> Date: Wed, 4 Sep 2024 13:34:58 +0100 Subject: [PATCH 07/35] TC_EEVSE_2.2 through 2.5 python script has to be updated as per the test plan changes (#35399) * Updated 2.2 test steps - autogen'd from test plan. No functional changes. * Update TC EEVSE 2.3 with autogen'd test steps. No functional code change. * Updated TC_EEVSE_2.4 test steps - no functional code changes. * TC_EEVSE_2.5 - updated test steps - no functional changes. * TC_EEVSE_2.5 added new step 8 (try to send Enable Charge Command when in diagnostics mode which should return failure). --- src/python_testing/TC_EEVSE_2_2.py | 174 +++++++++++++++-------------- src/python_testing/TC_EEVSE_2_3.py | 158 +++++++++++++------------- src/python_testing/TC_EEVSE_2_4.py | 93 +++++++-------- src/python_testing/TC_EEVSE_2_5.py | 81 ++++++++------ 4 files changed, 263 insertions(+), 243 deletions(-) diff --git a/src/python_testing/TC_EEVSE_2_2.py b/src/python_testing/TC_EEVSE_2_2.py index a0e226b9d15cbb..b2591fa4a5d206 100644 --- a/src/python_testing/TC_EEVSE_2_2.py +++ b/src/python_testing/TC_EEVSE_2_2.py @@ -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 27507a4899fb69..8de0ebef13e8a2 100644 --- a/src/python_testing/TC_EEVSE_2_3.py +++ b/src/python_testing/TC_EEVSE_2_3.py @@ -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 33eb143b8db5a4..ee8dbae5fa43a2 100644 --- a/src/python_testing/TC_EEVSE_2_4.py +++ b/src/python_testing/TC_EEVSE_2_4.py @@ -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 ecd88b4514288b..3096f013dde8af 100644 --- a/src/python_testing/TC_EEVSE_2_5.py +++ b/src/python_testing/TC_EEVSE_2_5.py @@ -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() From 83ae2376ec56324bcce725aaed1c44ae263bcb32 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Wed, 4 Sep 2024 08:36:05 -0400 Subject: [PATCH 08/35] Bump third_party/openthread/repo from `f0b6fce` to `aed9cd1` (#35374) Bumps [third_party/openthread/repo](https://github.com/openthread/openthread) from `f0b6fce` to `aed9cd1`. - [Release notes](https://github.com/openthread/openthread/releases) - [Commits](https://github.com/openthread/openthread/compare/f0b6fcea6ef77c9a54ab11767593f9a8798e3662...aed9cd1a307c05fe2f5b6b4b5677baaabce3d38e) --- updated-dependencies: - dependency-name: third_party/openthread/repo dependency-type: direct:production ... Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> --- third_party/openthread/repo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 From ed3403d8e081fc453c749d1d5dc08a3f5a033c13 Mon Sep 17 00:00:00 2001 From: Stefan Agner Date: Wed, 4 Sep 2024 14:49:53 +0200 Subject: [PATCH 09/35] [Python] Avoid InvalidStateError on cancel (#35380) When the co-routine GetConnectedDevice() gets cancelled, the wait_for call will cancel the future we are waiting for. However, the SDK still calls the _DeviceAvailableCallback with an error (CHIP Error 0x00000074: The operation has been cancelled). However, we can't set the future result at this point as the co-routine is already cancelled. Simply check the future state before setting the result. --- src/controller/python/chip/ChipDeviceCtrl.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/controller/python/chip/ChipDeviceCtrl.py b/src/controller/python/chip/ChipDeviceCtrl.py index 011174185fd440..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: From 44f883733280ff798ec112318f75e2f088b9f378 Mon Sep 17 00:00:00 2001 From: jamesharrow <93921463+jamesharrow@users.noreply.github.com> Date: Wed, 4 Sep 2024 14:06:59 +0100 Subject: [PATCH 10/35] EVSE - Update FakeReadings when a MaxChargeCurrent change occurs (#35346) * Updated FakeReadings when a MaxChargeCurrent change is made so that the readings are more representative of a real EV. * Restyled by whitespace * Removed using namespace from header file and added chip:: back into the type defintion since build fails. * Apply suggestions from code review Co-authored-by: Andrei Litvin * Apply suggestions from code review * Restyled by clang-format --------- Co-authored-by: Restyled.io Co-authored-by: Andrei Litvin --- .../include/EVSEManufacturerImpl.h | 7 ++++++ .../energy-evse/src/EVSEManufacturerImpl.cpp | 9 +++++++ .../energy-reporting/include/FakeReadings.h | 10 ++++++++ .../energy-reporting/src/FakeReadings.cpp | 25 +++++++++++++++++++ 4 files changed, 51 insertions(+) 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/src/EVSEManufacturerImpl.cpp b/examples/energy-management-app/energy-management-common/energy-evse/src/EVSEManufacturerImpl.cpp index 359e7c8066551d..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 @@ -551,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 * @@ -573,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-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; +} From 6144736cdc09a9691a594a5f43926e6458541bed Mon Sep 17 00:00:00 2001 From: feasel <120589145+feasel0@users.noreply.github.com> Date: Wed, 4 Sep 2024 09:59:27 -0400 Subject: [PATCH 11/35] Generating separate binaries for each unit test for EFR32 (#35028) * silabs full changes, flashable just if * silabs full changes, flashable just if (corrected) * silabs changes, flashable changes * yes executables.gni, cts.gni, args.gni, test_driver build.gn * yes executables.gni, args.gni, test_driver build.gn * Modified chip_test_suite to handle logic for both efr32 test_driver and chip_link_test * Doc update * Added final newline * Comment updates * Remove deprecated `tests` variable for per-test custom mains. * switched to shutil.copy instead of subprocess copy * Added chip_link_tests to test_driver/efr32/args.gni and removed special logic from chip_test_suite * Restyled by gn * Restyled by autopep8 * Punctuation change * Added special exception for darwin to always include test_sources in common lib. * Added comment re darwin exception * Restyled by gn * Revisions to builder scripts - removing map() usage and propagating OSError to make_wrapper. * Restyled by autopep8 --------- Co-authored-by: Restyled.io --- .github/.wordlist.txt | 2 - build/chip/chip_test.gni | 71 --------- build/chip/chip_test_suite.gni | 101 ++++++------- build/toolchain/flashable_executable.gni | 18 ++- scripts/build/builders/efr32.py | 55 ++++++- scripts/build/builders/host.py | 2 +- scripts/flashing/firmware_utils.py | 11 +- scripts/flashing/silabs_firmware_utils.py | 38 +++++ src/test_driver/efr32/BUILD.gn | 26 +--- src/test_driver/efr32/README.md | 16 +- src/test_driver/efr32/args.gni | 19 ++- src/test_driver/efr32/py/BUILD.gn | 26 ---- .../efr32/py/nl_test_runner/nl_test_runner.py | 141 ------------------ .../__init__.py | 0 .../efr32/py/pw_test_runner/pw_test_runner.py | 42 ++++-- src/test_driver/efr32/py/setup.cfg | 2 +- third_party/silabs/silabs_executable.gni | 73 ++++++--- 17 files changed, 265 insertions(+), 378 deletions(-) delete mode 100644 build/chip/chip_test.gni delete mode 100644 src/test_driver/efr32/py/nl_test_runner/nl_test_runner.py rename src/test_driver/efr32/py/{nl_test_runner => pw_test_runner}/__init__.py (100%) diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 4444d8299d26cb..5637540f7f9b25 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -950,8 +950,6 @@ NitricOxideConcentrationMeasurement NitrogenDioxideConcentrationMeasurement nl nltest -NLUnitTest -NLUnitTests nmcli nmtui noc 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/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/scripts/build/builders/efr32.py b/scripts/build/builders/efr32.py index 3972dc7bb48eff..6545f75b55da6b 100644 --- a/scripts/build/builders/efr32.py +++ b/scripts/build/builders/efr32.py @@ -12,6 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. +import glob +import logging import os import shlex import subprocess @@ -78,7 +80,7 @@ def FlashBundleName(self): elif self == Efr32App.PUMP: return 'pump_app.flashbundle.txt' elif self == Efr32App.UNIT_TEST: - return 'efr32_device_tests.flashbundle.txt' + return os.path.join('tests', 'efr32_device_tests.flashbundle.txt') else: raise Exception('Unknown app type: %r' % self) @@ -259,27 +261,64 @@ def __init__(self, def GnBuildArgs(self): return self.extra_gn_options + def _bundle(self): + # Only unit-test needs to generate the flashbundle here. All other examples will generate a flashbundle via the silabs_executable template. + if self.app == Efr32App.UNIT_TEST: + flash_bundle_path = os.path.join(self.output_dir, self.app.FlashBundleName()) + logging.info(f'Generating flashbundle {flash_bundle_path}') + + patterns = [ + os.path.join(self.output_dir, "tests", "*.flash.py"), + os.path.join(self.output_dir, "tests", "*.s37"), + os.path.join(self.output_dir, "tests", "silabs_firmware_utils.py"), + os.path.join(self.output_dir, "tests", "firmware_utils.py"), + ] + + # Generate the list of files by globbing each pattern. + files = [] + for pattern in patterns: + files.extend([os.path.basename(x) for x in glob.glob(pattern)]) + + # Create the bundle file. + with open(flash_bundle_path, 'w') as bundle_file: + bundle_file.write("\n".join(files)) + def build_outputs(self): extensions = ["out", "hex"] if self.options.enable_link_map_file: extensions.append("out.map") - for ext in extensions: - name = f"{self.app.AppNamePrefix()}.{ext}" - yield BuilderOutput(os.path.join(self.output_dir, name), name) + + if self.app == Efr32App.UNIT_TEST: + # Efr32 unit-test generates the "tests" subdir with a set of files for each individual unit test source. + for ext in extensions: + pattern = os.path.join(self.output_dir, "tests", f"*.{ext}") + for name in [os.path.basename(x) for x in glob.glob(pattern)]: + yield BuilderOutput(os.path.join(self.output_dir, "tests", name), name) + else: + # All other examples have just one set of files. + for ext in extensions: + name = f"{self.app.AppNamePrefix()}.{ext}" + yield BuilderOutput(os.path.join(self.output_dir, name), name) if self.app == Efr32App.UNIT_TEST: # Include test runner python wheels - for root, dirs, files in os.walk(os.path.join(self.output_dir, 'chip_nl_test_runner_wheels')): + for root, dirs, files in os.walk(os.path.join(self.output_dir, 'chip_pw_test_runner_wheels')): for file in files: yield BuilderOutput( os.path.join(root, file), - os.path.join("chip_nl_test_runner_wheels", file)) + os.path.join("chip_pw_test_runner_wheels", file)) - # Figure out flash bundle files and build accordingly + def bundle_outputs(self): + # If flashbundle creation is enabled, the outputs will include the s37 and flash.py files, plus the two firmware utils scripts that support flash.py. + # For the unit-test example, there will be a s37 and flash.py file for each unit test source. with open(os.path.join(self.output_dir, self.app.FlashBundleName())) as f: for name in filter(None, [x.strip() for x in f.readlines()]): + if self.app == Efr32App.UNIT_TEST: + sourcepath = os.path.join(self.output_dir, "tests", name) # Unit tests are in the "tests" subdir. + else: + sourcepath = os.path.join(self.output_dir, name) yield BuilderOutput( - os.path.join(self.output_dir, name), + sourcepath, os.path.join("flashbundle", name)) def generate(self): diff --git a/scripts/build/builders/host.py b/scripts/build/builders/host.py index b69421a782e948..01b35c7a01185f 100644 --- a/scripts/build/builders/host.py +++ b/scripts/build/builders/host.py @@ -220,7 +220,7 @@ def OutputNames(self): elif self == HostApp.PYTHON_BINDINGS: yield 'controller/python' # Directory containing WHL files elif self == HostApp.EFR32_TEST_RUNNER: - yield 'chip_nl_test_runner_wheels' + yield 'chip_pw_test_runner_wheels' elif self == HostApp.TV_CASTING: yield 'chip-tv-casting-app' yield 'chip-tv-casting-app.map' diff --git a/scripts/flashing/firmware_utils.py b/scripts/flashing/firmware_utils.py index 6087360c0614ac..2b844e8e3eb550 100644 --- a/scripts/flashing/firmware_utils.py +++ b/scripts/flashing/firmware_utils.py @@ -23,6 +23,7 @@ import subprocess import sys import textwrap +import traceback # Here are the options that can be use to configure a `Flasher` # object (as dictionary keys) and/or passed as command line options. @@ -409,7 +410,11 @@ def make_wrapper(self, argv): # Give platform-specific code a chance to manipulate the arguments # for the wrapper script. - self._platform_wrapper_args(args) + try: + self._platform_wrapper_args(args) + except OSError: + traceback.print_last() + return 1 # Find any option values that differ from the class defaults. # These will be inserted into the wrapper script. @@ -445,7 +450,7 @@ def make_wrapper(self, argv): os.chmod(args.output, (stat.S_IXUSR | stat.S_IRUSR | stat.S_IWUSR | stat.S_IXGRP | stat.S_IRGRP | stat.S_IXOTH | stat.S_IROTH)) - except OSError as exception: - print(exception, sys.stderr) + except OSError: + traceback.print_last() return 1 return 0 diff --git a/scripts/flashing/silabs_firmware_utils.py b/scripts/flashing/silabs_firmware_utils.py index 5e0a689f5a62f4..bd7b64cf021bcd 100755 --- a/scripts/flashing/silabs_firmware_utils.py +++ b/scripts/flashing/silabs_firmware_utils.py @@ -49,6 +49,8 @@ Do not reset device after flashing """ +import os +import shutil import sys import firmware_utils @@ -169,6 +171,42 @@ def actions(self): return self + def _platform_wrapper_args(self, args): + """Called from make_wrapper() to optionally manipulate arguments.""" + # Generate the flashbundle.txt file and copy the firmware utils. + if args.flashbundle_file is not None: + # Generate the flashbundle contents. + # Copy the platform-specific and general firmware utils to the same directory as the wrapper. + flashbundle_contents = os.path.basename(args.output) + if args.application is not None: + flashbundle_contents += "\n" + os.path.basename(args.application) + output_dir = os.path.dirname(args.output) or "." + if args.platform_firmware_utils is not None: + flashbundle_contents += "\n" + os.path.basename(args.platform_firmware_utils) + shutil.copy(args.platform_firmware_utils, output_dir) + if args.firmware_utils is not None: + flashbundle_contents += "\n" + os.path.basename(args.firmware_utils) + shutil.copy(args.firmware_utils, output_dir) + + # Create the flashbundle file. + with open(args.flashbundle_file, 'w') as flashbundle_file: + flashbundle_file.write(flashbundle_contents.strip()) + + def make_wrapper(self, argv): + self.parser.add_argument( + '--flashbundle-file', + metavar='FILENAME', + help='path and name of the flashbundle text file to create') + self.parser.add_argument( + '--platform-firmware-utils', + metavar='FILENAME', + help='path and file of the platform-specific firmware utils script') + self.parser.add_argument( + '--firmware-utils', + metavar='FILENAME', + help='path and file of the general firmware utils script') + super().make_wrapper(argv) + if __name__ == '__main__': sys.exit(Flasher().flash_command(sys.argv)) 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/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", From 19e7aa39bb6452d8777d9d13d4d4adb83b929fca Mon Sep 17 00:00:00 2001 From: William Date: Wed, 4 Sep 2024 18:37:36 +0100 Subject: [PATCH 12/35] Added a CopyCharSpanToMutableCharSpanTruncate function. (#35360) * Added a CopyCharSpanToMutableCharSpanTruncate function. * Applied minor renaming suggestion. * Apply suggestions from code review Co-authored-by: Boris Zbarsky * Update src/lib/support/Span.h Co-authored-by: Arkadiusz Bokowy --------- Co-authored-by: Boris Zbarsky Co-authored-by: Arkadiusz Bokowy --- src/lib/support/Span.h | 14 ++++++++++++++ 1 file changed, 14 insertions(+) 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 From a5d5f856d171468581d716f17efa7c604066f062 Mon Sep 17 00:00:00 2001 From: yunhanw-google Date: Wed, 4 Sep 2024 10:47:09 -0700 Subject: [PATCH 13/35] use imEngine to get case session in RefreshKeySender (#35236) --- src/app/icd/client/RefreshKeySender.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/icd/client/RefreshKeySender.cpp b/src/app/icd/client/RefreshKeySender.cpp index c49bf79f30a17c..9e4547538e679e 100644 --- a/src/app/icd/client/RefreshKeySender.cpp +++ b/src/app/icd/client/RefreshKeySender.cpp @@ -87,7 +87,7 @@ CHIP_ERROR RefreshKeySender::RegisterClientWithNewKey(Messaging::ExchangeManager CHIP_ERROR RefreshKeySender::EstablishSessionToPeer() { ChipLogProgress(ICD, "Trying to establish a CASE session for re-registering an ICD client"); - auto * caseSessionManager = InteractionModelEngine::GetInstance()->GetCASESessionManager(); + auto * caseSessionManager = mpImEngine->GetCASESessionManager(); VerifyOrReturnError(caseSessionManager != nullptr, CHIP_ERROR_INVALID_CASE_PARAMETER); caseSessionManager->FindOrEstablishSession(mICDClientInfo.peer_node, &mOnConnectedCallback, &mOnConnectionFailureCallback); return CHIP_NO_ERROR; From 95339255e05669ce452bbc7061e548dfd357c348 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Wed, 4 Sep 2024 15:04:33 -0400 Subject: [PATCH 14/35] IDM-10.2: Handle MACL feature (#35404) * Reapply "TC-IDM-10.2: Add check for MACL (#35086)" (#35111) This reverts commit 796394ffadb6d0322a16eb5eabfb28950c8e6116. * Change function name to more generic --- .github/workflows/tests.yaml | 1 + src/python_testing/TC_DeviceConformance.py | 25 ++++++ src/python_testing/TestConformanceTest.py | 96 ++++++++++++++++++++++ src/python_testing/execute_python_tests.py | 1 + 4 files changed, 123 insertions(+) diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index a99cc0a24d1f98..8d8b0064202c9d 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -522,6 +522,7 @@ jobs: 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' diff --git a/src/python_testing/TC_DeviceConformance.py b/src/python_testing/TC_DeviceConformance.py index 060228a5170f17..a6d6f19bfb53e7 100644 --- a/src/python_testing/TC_DeviceConformance.py +++ b/src/python_testing/TC_DeviceConformance.py @@ -50,6 +50,24 @@ async def setup_class_helper(self): self.xml_device_types, problems = build_xml_device_types() self.problems.extend(problems) + 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 @@ -120,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 diff --git a/src/python_testing/TestConformanceTest.py b/src/python_testing/TestConformanceTest.py index 23b06fb67c7e2a..5af8d1f639ef0c 100644 --- a/src/python_testing/TestConformanceTest.py +++ b/src/python_testing/TestConformanceTest.py @@ -18,6 +18,8 @@ from typing import Any import chip.clusters as Clusters +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 @@ -109,6 +111,10 @@ def create_onoff_endpoint(endpoint: int) -> dict[int, dict[int, dict[int, Any]]] 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() @@ -135,6 +141,96 @@ async def test_provisional_cluster(self): 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]]): + 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) + + @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? + if __name__ == "__main__": default_matter_test_main() diff --git a/src/python_testing/execute_python_tests.py b/src/python_testing/execute_python_tests.py index a1965ec6360392..956e252de6c8c2 100644 --- a/src/python_testing/execute_python_tests.py +++ b/src/python_testing/execute_python_tests.py @@ -85,6 +85,7 @@ def main(search_directory, env_file): "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", From 6b93a30e9d65e02a6db809fb4bd44a38bc5c21e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Josefsen?= <69624991+ReneJosefsen@users.noreply.github.com> Date: Wed, 4 Sep 2024 21:37:28 +0200 Subject: [PATCH 15/35] Update TC-CC-2_2 to match latest test plan (#35361) * Update TC-CC-2_2 to match latest test plan * Remove unused import --- src/python_testing/TC_CC_2_2.py | 259 +++++++++++++++++++------------- 1 file changed, 151 insertions(+), 108 deletions(-) diff --git a/src/python_testing/TC_CC_2_2.py b/src/python_testing/TC_CC_2_2.py index 2cd9aef8a09f35..c575ae81f5c2d3 100644 --- a/src/python_testing/TC_CC_2_2.py +++ b/src/python_testing/TC_CC_2_2.py @@ -35,7 +35,7 @@ from matter_testing_support import (ClusterAttributeChangeAccumulator, MatterBaseTest, TestStep, default_matter_test_main, 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,47 +63,65 @@ 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") ] @@ -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") From edd241c215302488c5d506fd60f1721a8e0a32cb Mon Sep 17 00:00:00 2001 From: C Freeman Date: Wed, 4 Sep 2024 15:46:30 -0400 Subject: [PATCH 16/35] Updated data model XML updates from Sept 3 (#35385) * check * New DM XML drop from Sept 3 * add to word list --- .github/.wordlist.txt | 1 + .../in_progress/clusters/ACL-Cluster.xml | 20 +++------- data_model/in_progress/clusters/Channel.xml | 4 -- .../in_progress/clusters/ColorControl.xml | 16 ++++---- .../clusters/CommissionerControlCluster.xml | 20 ++++------ .../clusters/ConcentrationMeasurement.xml | 1 - .../clusters/Descriptor-Cluster.xml | 9 +---- .../clusters/DeviceEnergyManagement.xml | 35 +++++++++-------- .../in_progress/clusters/EnergyCalendar.xml | 2 +- .../in_progress/clusters/FanControl.xml | 6 +-- .../in_progress/clusters/FlowMeasurement.xml | 4 +- .../clusters/GeneralCommissioningCluster.xml | 26 ++++++------- data_model/in_progress/clusters/Identify.xml | 3 +- .../clusters/IlluminanceMeasurement.xml | 4 +- .../clusters/JointFabricDatastoreCluster.xml | 8 +++- .../clusters/JointFabricPKICluster.xml | 38 +++++++++++++++++-- .../in_progress/clusters/LevelControl.xml | 3 +- .../clusters/Mode_DeviceEnergyManagement.xml | 4 +- .../in_progress/clusters/Mode_Dishwasher.xml | 10 ++--- data_model/in_progress/clusters/Mode_EVSE.xml | 2 +- .../clusters/Mode_LaundryWasher.xml | 10 ++--- .../clusters/Mode_MicrowaveOven.xml | 2 +- data_model/in_progress/clusters/Mode_Oven.xml | 10 ++--- .../in_progress/clusters/Mode_RVCClean.xml | 12 +++--- .../in_progress/clusters/Mode_RVCRun.xml | 12 +++--- .../clusters/Mode_Refrigerator.xml | 10 ++--- .../in_progress/clusters/Mode_WaterHeater.xml | 2 +- .../in_progress/clusters/OccupancySensing.xml | 16 +++++++- .../clusters/OperationalState_RVC.xml | 4 +- .../clusters/PressureMeasurement.xml | 14 +++---- .../clusters/PumpConfigurationControl.xml | 33 +++++++++------- .../in_progress/clusters/ServiceArea.xml | 4 +- data_model/in_progress/clusters/Switch.xml | 2 +- .../clusters/TemperatureControl.xml | 2 +- .../clusters/TemperatureMeasurement.xml | 6 +-- .../in_progress/clusters/Thermostat.xml | 9 ++--- .../clusters/ValveConfigurationControl.xml | 5 +-- .../clusters/WaterContentMeasurement.xml | 6 +-- .../in_progress/clusters/WindowCovering.xml | 31 ++++++--------- ...s-BridgedDeviceBasicInformationCluster.xml | 6 ++- ...e-clusters-EcosystemInformationCluster.xml | 21 +++------- .../in_progress/clusters/cluster_ids.json | 4 +- .../device_types/JointFabricAdmin.xml | 6 +-- .../MountedDimmableLoadControl.xml | 2 +- .../device_types/MountedOnOffControl.xml | 2 +- .../device_types/ThreadBorderRouter.xml | 3 ++ .../device_types/WindowCovering.xml | 30 --------------- data_model/in_progress/spec_sha | 2 +- data_model/master/clusters/ACL-Cluster.xml | 20 +++------- data_model/master/clusters/Channel.xml | 4 -- data_model/master/clusters/ColorControl.xml | 16 ++++---- .../clusters/CommissionerControlCluster.xml | 20 ++++------ .../clusters/ConcentrationMeasurement.xml | 1 - .../clusters/DeviceEnergyManagement.xml | 35 +++++++++-------- data_model/master/clusters/EnergyCalendar.xml | 2 +- data_model/master/clusters/FanControl.xml | 6 +-- .../master/clusters/FlowMeasurement.xml | 4 +- .../clusters/GeneralCommissioningCluster.xml | 15 +++++++- data_model/master/clusters/Identify.xml | 3 +- .../clusters/IlluminanceMeasurement.xml | 4 +- .../clusters/JointFabricDatastoreCluster.xml | 8 +++- .../master/clusters/JointFabricPKICluster.xml | 38 +++++++++++++++++-- data_model/master/clusters/LevelControl.xml | 3 +- .../clusters/Mode_DeviceEnergyManagement.xml | 4 +- .../master/clusters/Mode_Dishwasher.xml | 10 ++--- data_model/master/clusters/Mode_EVSE.xml | 2 +- .../master/clusters/Mode_LaundryWasher.xml | 10 ++--- .../master/clusters/Mode_MicrowaveOven.xml | 2 +- data_model/master/clusters/Mode_Oven.xml | 10 ++--- data_model/master/clusters/Mode_RVCClean.xml | 15 +++++--- data_model/master/clusters/Mode_RVCRun.xml | 15 +++++--- .../master/clusters/Mode_Refrigerator.xml | 10 ++--- .../master/clusters/Mode_WaterHeater.xml | 2 +- .../master/clusters/OccupancySensing.xml | 16 +++++++- .../master/clusters/OperationalState_RVC.xml | 4 +- .../master/clusters/PressureMeasurement.xml | 14 +++---- .../clusters/PumpConfigurationControl.xml | 33 +++++++++------- data_model/master/clusters/ServiceArea.xml | 4 +- data_model/master/clusters/Switch.xml | 2 +- .../master/clusters/TemperatureControl.xml | 2 +- .../clusters/TemperatureMeasurement.xml | 6 +-- data_model/master/clusters/Thermostat.xml | 9 ++--- .../clusters/ValveConfigurationControl.xml | 5 +-- .../clusters/WaterContentMeasurement.xml | 6 +-- data_model/master/clusters/WindowCovering.xml | 31 ++++++--------- ...s-BridgedDeviceBasicInformationCluster.xml | 6 ++- ...e-clusters-EcosystemInformationCluster.xml | 21 +++------- data_model/master/clusters/cluster_ids.json | 2 + .../master/device_types/JointFabricAdmin.xml | 6 +-- .../MountedDimmableLoadControl.xml | 2 +- .../device_types/MountedOnOffControl.xml | 2 +- .../device_types/ThreadBorderRouter.xml | 3 ++ .../master/device_types/WindowCovering.xml | 30 --------------- data_model/master/spec_sha | 2 +- docs/spec_clusters.md | 3 ++ src/python_testing/spec_parsing_support.py | 2 + 96 files changed, 476 insertions(+), 476 deletions(-) diff --git a/.github/.wordlist.txt b/.github/.wordlist.txt index 5637540f7f9b25..9cb24bcf4d8b0b 100644 --- a/.github/.wordlist.txt +++ b/.github/.wordlist.txt @@ -341,6 +341,7 @@ datamodel DataModelRevision dataset datasets +datastore DataVersion dbf DBG diff --git a/data_model/in_progress/clusters/ACL-Cluster.xml b/data_model/in_progress/clusters/ACL-Cluster.xml index 2f9de14e0adfad..15eebb425286a4 100644 --- a/data_model/in_progress/clusters/ACL-Cluster.xml +++ b/data_model/in_progress/clusters/ACL-Cluster.xml @@ -68,9 +68,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/in_progress/clusters/Channel.xml b/data_model/in_progress/clusters/Channel.xml index a2edf151cb6001..02bfcf3b25c854 100644 --- a/data_model/in_progress/clusters/Channel.xml +++ b/data_model/in_progress/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/in_progress/clusters/ColorControl.xml b/data_model/in_progress/clusters/ColorControl.xml index 6901b6ee4130c6..fa14aca0f8b5f4 100644 --- a/data_model/in_progress/clusters/ColorControl.xml +++ b/data_model/in_progress/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/in_progress/clusters/CommissionerControlCluster.xml b/data_model/in_progress/clusters/CommissionerControlCluster.xml index 9b01df6a9aec0c..d3b8380aaba929 100644 --- a/data_model/in_progress/clusters/CommissionerControlCluster.xml +++ b/data_model/in_progress/clusters/CommissionerControlCluster.xml @@ -80,13 +80,13 @@ Davis, CA 95616, USA - + - + - + @@ -97,19 +97,13 @@ Davis, CA 95616, USA - + - + - - - - - - @@ -138,10 +132,10 @@ Davis, CA 95616, USA - + - + diff --git a/data_model/in_progress/clusters/ConcentrationMeasurement.xml b/data_model/in_progress/clusters/ConcentrationMeasurement.xml index b622a3560b4ff0..68d4b7937bf717 100644 --- a/data_model/in_progress/clusters/ConcentrationMeasurement.xml +++ b/data_model/in_progress/clusters/ConcentrationMeasurement.xml @@ -193,7 +193,6 @@ Davis, CA 95616, USA - diff --git a/data_model/in_progress/clusters/Descriptor-Cluster.xml b/data_model/in_progress/clusters/Descriptor-Cluster.xml index fabc3a2a16c658..e30b12ea713d6b 100644 --- a/data_model/in_progress/clusters/Descriptor-Cluster.xml +++ b/data_model/in_progress/clusters/Descriptor-Cluster.xml @@ -57,11 +57,10 @@ Davis, CA 95616, USA :xrefstyle: basic --> - + - @@ -115,11 +114,5 @@ Davis, CA 95616, USA - - - - - - \ No newline at end of file diff --git a/data_model/in_progress/clusters/DeviceEnergyManagement.xml b/data_model/in_progress/clusters/DeviceEnergyManagement.xml index cb7f46c008f5e1..776a06f20b3fd4 100644 --- a/data_model/in_progress/clusters/DeviceEnergyManagement.xml +++ b/data_model/in_progress/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/in_progress/clusters/EnergyCalendar.xml b/data_model/in_progress/clusters/EnergyCalendar.xml index 5be0f8ff520aea..2ba93203618609 100644 --- a/data_model/in_progress/clusters/EnergyCalendar.xml +++ b/data_model/in_progress/clusters/EnergyCalendar.xml @@ -158,7 +158,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/in_progress/clusters/FanControl.xml b/data_model/in_progress/clusters/FanControl.xml index 9eba1df549981c..ec05b6f74e069d 100644 --- a/data_model/in_progress/clusters/FanControl.xml +++ b/data_model/in_progress/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/in_progress/clusters/FlowMeasurement.xml b/data_model/in_progress/clusters/FlowMeasurement.xml index 85879977faa509..7ee97f586e708a 100644 --- a/data_model/in_progress/clusters/FlowMeasurement.xml +++ b/data_model/in_progress/clusters/FlowMeasurement.xml @@ -78,13 +78,13 @@ Davis, CA 95616, USA - + - + diff --git a/data_model/in_progress/clusters/GeneralCommissioningCluster.xml b/data_model/in_progress/clusters/GeneralCommissioningCluster.xml index 7dae043cd4df98..a569fef5d44118 100644 --- a/data_model/in_progress/clusters/GeneralCommissioningCluster.xml +++ b/data_model/in_progress/clusters/GeneralCommissioningCluster.xml @@ -81,21 +81,6 @@ Davis, CA 95616, USA - - - - - - - - - - - - - - - @@ -145,24 +130,35 @@ Davis, CA 95616, USA + + + + + + + + + + + diff --git a/data_model/in_progress/clusters/Identify.xml b/data_model/in_progress/clusters/Identify.xml index a6682b7233d30a..ddc3e33e9d28d3 100644 --- a/data_model/in_progress/clusters/Identify.xml +++ b/data_model/in_progress/clusters/Identify.xml @@ -63,7 +63,7 @@ Davis, CA 95616, USA - + @@ -122,7 +122,6 @@ Davis, CA 95616, USA - diff --git a/data_model/in_progress/clusters/IlluminanceMeasurement.xml b/data_model/in_progress/clusters/IlluminanceMeasurement.xml index f24df314ca2ead..d7cb9a993d0e4e 100644 --- a/data_model/in_progress/clusters/IlluminanceMeasurement.xml +++ b/data_model/in_progress/clusters/IlluminanceMeasurement.xml @@ -92,13 +92,13 @@ Davis, CA 95616, USA - + - + diff --git a/data_model/in_progress/clusters/JointFabricDatastoreCluster.xml b/data_model/in_progress/clusters/JointFabricDatastoreCluster.xml index 79143f34d03f55..137edd2857f74d 100644 --- a/data_model/in_progress/clusters/JointFabricDatastoreCluster.xml +++ b/data_model/in_progress/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/in_progress/clusters/JointFabricPKICluster.xml b/data_model/in_progress/clusters/JointFabricPKICluster.xml index 7fba1e17376ecd..847d2548e3b1f1 100644 --- a/data_model/in_progress/clusters/JointFabricPKICluster.xml +++ b/data_model/in_progress/clusters/JointFabricPKICluster.xml @@ -55,12 +55,12 @@ Connectivity Standards Alliance 508 Second Street, Suite 206 Davis, CA 95616, USA --> - + - + @@ -80,7 +80,24 @@ Davis, CA 95616, USA - + + + + + + + + + + + + + + + + + + @@ -104,5 +121,20 @@ Davis, CA 95616, USA + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/data_model/in_progress/clusters/LevelControl.xml b/data_model/in_progress/clusters/LevelControl.xml index 28f88b96832c32..de342812287b0f 100644 --- a/data_model/in_progress/clusters/LevelControl.xml +++ b/data_model/in_progress/clusters/LevelControl.xml @@ -136,7 +136,7 @@ Davis, CA 95616, USA - + @@ -145,7 +145,6 @@ Davis, CA 95616, USA - diff --git a/data_model/in_progress/clusters/Mode_DeviceEnergyManagement.xml b/data_model/in_progress/clusters/Mode_DeviceEnergyManagement.xml index b991a36577bdd2..48cf6df4955a15 100644 --- a/data_model/in_progress/clusters/Mode_DeviceEnergyManagement.xml +++ b/data_model/in_progress/clusters/Mode_DeviceEnergyManagement.xml @@ -60,7 +60,7 @@ Davis, CA 95616, USA - + @@ -69,7 +69,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/in_progress/clusters/Mode_Dishwasher.xml b/data_model/in_progress/clusters/Mode_Dishwasher.xml index 8069fdddcf0cc3..1c3a99b9e3d245 100644 --- a/data_model/in_progress/clusters/Mode_Dishwasher.xml +++ b/data_model/in_progress/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/in_progress/clusters/Mode_EVSE.xml b/data_model/in_progress/clusters/Mode_EVSE.xml index fddd0e078c6df1..025e9de9884c89 100644 --- a/data_model/in_progress/clusters/Mode_EVSE.xml +++ b/data_model/in_progress/clusters/Mode_EVSE.xml @@ -67,7 +67,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/in_progress/clusters/Mode_LaundryWasher.xml b/data_model/in_progress/clusters/Mode_LaundryWasher.xml index 444d536fd178fd..b5f557a4b46a4b 100644 --- a/data_model/in_progress/clusters/Mode_LaundryWasher.xml +++ b/data_model/in_progress/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/in_progress/clusters/Mode_MicrowaveOven.xml b/data_model/in_progress/clusters/Mode_MicrowaveOven.xml index b5076d8c270099..24d682fecac68b 100644 --- a/data_model/in_progress/clusters/Mode_MicrowaveOven.xml +++ b/data_model/in_progress/clusters/Mode_MicrowaveOven.xml @@ -66,7 +66,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/in_progress/clusters/Mode_Oven.xml b/data_model/in_progress/clusters/Mode_Oven.xml index f7e8c8a4268cf2..a3e3323fe98777 100644 --- a/data_model/in_progress/clusters/Mode_Oven.xml +++ b/data_model/in_progress/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/in_progress/clusters/Mode_RVCClean.xml b/data_model/in_progress/clusters/Mode_RVCClean.xml index 26b5d15c185fe3..b73a4a5361d81f 100644 --- a/data_model/in_progress/clusters/Mode_RVCClean.xml +++ b/data_model/in_progress/clusters/Mode_RVCClean.xml @@ -67,6 +67,11 @@ Davis, CA 95616, USA + + + + + @@ -81,11 +86,6 @@ Davis, CA 95616, USA - - - - - @@ -97,7 +97,7 @@ Davis, CA 95616, USA - + \ 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 index ad0d7601a45c22..c65bc3850473bd 100644 --- a/data_model/in_progress/clusters/Mode_RVCRun.xml +++ b/data_model/in_progress/clusters/Mode_RVCRun.xml @@ -67,6 +67,11 @@ Davis, CA 95616, USA + + + + + @@ -81,11 +86,6 @@ Davis, CA 95616, USA - - - - - @@ -97,7 +97,7 @@ Davis, CA 95616, USA - + \ 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 index 84410d1ddfc465..2728ac0f42b8fb 100644 --- a/data_model/in_progress/clusters/Mode_Refrigerator.xml +++ b/data_model/in_progress/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/in_progress/clusters/Mode_WaterHeater.xml b/data_model/in_progress/clusters/Mode_WaterHeater.xml index 5aaf1d244f1898..cc9c96e484bce2 100644 --- a/data_model/in_progress/clusters/Mode_WaterHeater.xml +++ b/data_model/in_progress/clusters/Mode_WaterHeater.xml @@ -66,7 +66,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/in_progress/clusters/OccupancySensing.xml b/data_model/in_progress/clusters/OccupancySensing.xml index 4cd027deb07279..7ca0d3631dbe05 100644 --- a/data_model/in_progress/clusters/OccupancySensing.xml +++ b/data_model/in_progress/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/in_progress/clusters/OperationalState_RVC.xml b/data_model/in_progress/clusters/OperationalState_RVC.xml index 5d2d28db2c2cad..9b83bc4dfde257 100644 --- a/data_model/in_progress/clusters/OperationalState_RVC.xml +++ b/data_model/in_progress/clusters/OperationalState_RVC.xml @@ -108,10 +108,10 @@ Davis, CA 95616, USA - + - + diff --git a/data_model/in_progress/clusters/PressureMeasurement.xml b/data_model/in_progress/clusters/PressureMeasurement.xml index bf9b6a9286e381..09b9577cc84585 100644 --- a/data_model/in_progress/clusters/PressureMeasurement.xml +++ b/data_model/in_progress/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/in_progress/clusters/PumpConfigurationControl.xml b/data_model/in_progress/clusters/PumpConfigurationControl.xml index 95ede00d0eb72e..9b7e4ab56dc5c2 100644 --- a/data_model/in_progress/clusters/PumpConfigurationControl.xml +++ b/data_model/in_progress/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/in_progress/clusters/ServiceArea.xml b/data_model/in_progress/clusters/ServiceArea.xml index 6a54264a94928b..2533d4b549d2f0 100644 --- a/data_model/in_progress/clusters/ServiceArea.xml +++ b/data_model/in_progress/clusters/ServiceArea.xml @@ -113,7 +113,7 @@ Davis, CA 95616, USA - + @@ -121,7 +121,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/in_progress/clusters/Switch.xml b/data_model/in_progress/clusters/Switch.xml index 92489c1e9228a3..8662d262f0b50e 100644 --- a/data_model/in_progress/clusters/Switch.xml +++ b/data_model/in_progress/clusters/Switch.xml @@ -60,7 +60,7 @@ Davis, CA 95616, USA + Introduction of ActionSwitch feature flag."/> diff --git a/data_model/in_progress/clusters/TemperatureControl.xml b/data_model/in_progress/clusters/TemperatureControl.xml index 79519716ea1cf8..511761b24b9e89 100644 --- a/data_model/in_progress/clusters/TemperatureControl.xml +++ b/data_model/in_progress/clusters/TemperatureControl.xml @@ -113,7 +113,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/in_progress/clusters/TemperatureMeasurement.xml b/data_model/in_progress/clusters/TemperatureMeasurement.xml index 0935b18edab675..5c1df46ccbf115 100644 --- a/data_model/in_progress/clusters/TemperatureMeasurement.xml +++ b/data_model/in_progress/clusters/TemperatureMeasurement.xml @@ -79,18 +79,18 @@ Davis, CA 95616, USA - + - + - + \ No newline at end of file diff --git a/data_model/in_progress/clusters/Thermostat.xml b/data_model/in_progress/clusters/Thermostat.xml index faf147839facb4..6c5584e087d47c 100644 --- a/data_model/in_progress/clusters/Thermostat.xml +++ b/data_model/in_progress/clusters/Thermostat.xml @@ -63,8 +63,7 @@ Davis, CA 95616, USA - @@ -653,12 +652,12 @@ Davis, CA 95616, USA - + - + @@ -996,7 +995,7 @@ Davis, CA 95616, USA - + diff --git a/data_model/in_progress/clusters/ValveConfigurationControl.xml b/data_model/in_progress/clusters/ValveConfigurationControl.xml index 03d40acd480ff4..6f38375a1a31c6 100644 --- a/data_model/in_progress/clusters/ValveConfigurationControl.xml +++ b/data_model/in_progress/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/in_progress/clusters/WaterContentMeasurement.xml b/data_model/in_progress/clusters/WaterContentMeasurement.xml index af11c9cf8d514c..b613bf4e1522fb 100644 --- a/data_model/in_progress/clusters/WaterContentMeasurement.xml +++ b/data_model/in_progress/clusters/WaterContentMeasurement.xml @@ -78,18 +78,18 @@ Davis, CA 95616, USA - + - + - + \ No newline at end of file diff --git a/data_model/in_progress/clusters/WindowCovering.xml b/data_model/in_progress/clusters/WindowCovering.xml index f8c60b46901dc9..09133513af736a 100644 --- a/data_model/in_progress/clusters/WindowCovering.xml +++ b/data_model/in_progress/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/in_progress/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml b/data_model/in_progress/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml index 4368d991c832f4..62633f55cf08cc 100644 --- a/data_model/in_progress/clusters/bridge-clusters-BridgedDeviceBasicInformationCluster.xml +++ b/data_model/in_progress/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/in_progress/clusters/bridge-clusters-EcosystemInformationCluster.xml b/data_model/in_progress/clusters/bridge-clusters-EcosystemInformationCluster.xml index 22cc88097acf75..ddebe95679370e 100644 --- a/data_model/in_progress/clusters/bridge-clusters-EcosystemInformationCluster.xml +++ b/data_model/in_progress/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/in_progress/clusters/cluster_ids.json b/data_model/in_progress/clusters/cluster_ids.json index c65c08ab4a5879..9de2f243b377d6 100644 --- a/data_model/in_progress/clusters/cluster_ids.json +++ b/data_model/in_progress/clusters/cluster_ids.json @@ -118,5 +118,7 @@ "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" } diff --git a/data_model/in_progress/device_types/JointFabricAdmin.xml b/data_model/in_progress/device_types/JointFabricAdmin.xml index 7d29cbba1305d5..6c63dc9bdd96a1 100644 --- a/data_model/in_progress/device_types/JointFabricAdmin.xml +++ b/data_model/in_progress/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/in_progress/device_types/MountedDimmableLoadControl.xml b/data_model/in_progress/device_types/MountedDimmableLoadControl.xml index 2527eb6aaefcd2..d0cee6e5ef37cd 100644 --- a/data_model/in_progress/device_types/MountedDimmableLoadControl.xml +++ b/data_model/in_progress/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/in_progress/device_types/MountedOnOffControl.xml b/data_model/in_progress/device_types/MountedOnOffControl.xml index 1be3cf746418aa..09628bb4e0e9f0 100644 --- a/data_model/in_progress/device_types/MountedOnOffControl.xml +++ b/data_model/in_progress/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/in_progress/device_types/ThreadBorderRouter.xml b/data_model/in_progress/device_types/ThreadBorderRouter.xml index abe38a81396cd6..792f002801b9a0 100644 --- a/data_model/in_progress/device_types/ThreadBorderRouter.xml +++ b/data_model/in_progress/device_types/ThreadBorderRouter.xml @@ -68,5 +68,8 @@ Davis, CA 95616, USA + + + \ 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 index 0e907045e3e1b6..da8780b3c94be4 100644 --- a/data_model/in_progress/device_types/WindowCovering.xml +++ b/data_model/in_progress/device_types/WindowCovering.xml @@ -84,36 +84,6 @@ Davis, CA 95616, USA - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/data_model/in_progress/spec_sha b/data_model/in_progress/spec_sha index 8f9072976d9c15..a399f222280c76 100644 --- a/data_model/in_progress/spec_sha +++ b/data_model/in_progress/spec_sha @@ -1 +1 @@ -3432866fff8e0c21e1189a10d4ee66b9eb004844 +ec20ddf482db8deffe8b2eb745e34d2f9cea72b2 diff --git a/data_model/master/clusters/ACL-Cluster.xml b/data_model/master/clusters/ACL-Cluster.xml index 2f9de14e0adfad..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 - - - + @@ -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 9b01df6a9aec0c..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,19 +97,13 @@ Davis, CA 95616, USA - + - + - - - - - - @@ -138,10 +132,10 @@ 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 8d6c428259f427..2342e6704c25c8 100644 --- a/data_model/master/clusters/GeneralCommissioningCluster.xml +++ b/data_model/master/clusters/GeneralCommissioningCluster.xml @@ -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 7fba1e17376ecd..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 --> - + - + @@ -80,7 +80,24 @@ Davis, CA 95616, USA - + + + + + + + + + + + + + + + + + + @@ -104,5 +121,20 @@ 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/Mode_DeviceEnergyManagement.xml b/data_model/master/clusters/Mode_DeviceEnergyManagement.xml index b991a36577bdd2..48cf6df4955a15 100644 --- a/data_model/master/clusters/Mode_DeviceEnergyManagement.xml +++ b/data_model/master/clusters/Mode_DeviceEnergyManagement.xml @@ -60,7 +60,7 @@ Davis, CA 95616, USA - + @@ -69,7 +69,7 @@ Davis, CA 95616, USA - + 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 fddd0e078c6df1..025e9de9884c89 100644 --- a/data_model/master/clusters/Mode_EVSE.xml +++ b/data_model/master/clusters/Mode_EVSE.xml @@ -67,7 +67,7 @@ Davis, CA 95616, USA - + 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 5aaf1d244f1898..cc9c96e484bce2 100644 --- a/data_model/master/clusters/Mode_WaterHeater.xml +++ b/data_model/master/clusters/Mode_WaterHeater.xml @@ -66,7 +66,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/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 faf147839facb4..6c5584e087d47c 100644 --- a/data_model/master/clusters/Thermostat.xml +++ b/data_model/master/clusters/Thermostat.xml @@ -63,8 +63,7 @@ Davis, CA 95616, USA - @@ -653,12 +652,12 @@ Davis, CA 95616, USA - + - + @@ -996,7 +995,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/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 5896dc1a366f73..ee34f4df93d55f 100644 --- a/data_model/master/clusters/cluster_ids.json +++ b/data_model/master/clusters/cluster_ids.json @@ -121,5 +121,7 @@ "1296": "Content App Observer", "1872": "Ecosystem Information", "1873": "Commissioner Control", + "1874": "Joint Fabric Datastore Cluster", + "1875": "Joint Fabric PKI", "2822": "Meter Identification" } 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 0e907045e3e1b6..da8780b3c94be4 100644 --- a/data_model/master/device_types/WindowCovering.xml +++ b/data_model/master/device_types/WindowCovering.xml @@ -84,36 +84,6 @@ 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 8f9072976d9c15..a399f222280c76 100644 --- a/data_model/master/spec_sha +++ b/data_model/master/spec_sha @@ -1 +1 @@ -3432866fff8e0c21e1189a10d4ee66b9eb004844 +ec20ddf482db8deffe8b2eb745e34d2f9cea72b2 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/src/python_testing/spec_parsing_support.py b/src/python_testing/spec_parsing_support.py index b279c759641249..1444966fe5ea1a 100644 --- a/src/python_testing/spec_parsing_support.py +++ b/src/python_testing/spec_parsing_support.py @@ -403,6 +403,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 From 1685777f079a7796bbc6bbbafaab41490c98c357 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Wed, 4 Sep 2024 16:01:59 -0400 Subject: [PATCH 17/35] IDM-10.2: Fix provisional check (#35407) --- src/python_testing/spec_parsing_support.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/python_testing/spec_parsing_support.py b/src/python_testing/spec_parsing_support.py index 1444966fe5ea1a..445e168ecb4f5a 100644 --- a/src/python_testing/spec_parsing_support.py +++ b/src/python_testing/spec_parsing_support.py @@ -216,8 +216,9 @@ def __init__(self, cluster, cluster_id, name): except (KeyError, StopIteration): self._derived = None - if list(cluster.iter('provisionalConform')): - self._is_provisional = True + for id in cluster.iter('clusterIds'): + if list(id.iter('provisionalConform')): + self._is_provisional = True try: classification = next(cluster.iter('classification')) From e2edc0c27d050ba8db29591c053970a8ca887b10 Mon Sep 17 00:00:00 2001 From: Manjunath Date: Wed, 4 Sep 2024 16:42:06 -0400 Subject: [PATCH 18/35] [YAML] Fixed script issues (#35309) * Modified test Test_TC_CC_4_2 Test_TC_CC_7_2 Test_TC_PWRTL_1_1 Test_TC_SWTCH_3_2 Test_TC_OO_2_6 * Fix TC-OO-2.6 and SWTCH_3_2 tests * Restyled by whitespace * Restyled by prettier-json --------- Co-authored-by: Restyled.io --- .../suites/certification/Test_TC_CC_4_2.yaml | 16 + .../suites/certification/Test_TC_CC_7_2.yaml | 2 +- .../suites/certification/Test_TC_OO_2_6.yaml | 58 ++ .../certification/Test_TC_PWRTL_1_1.yaml | 5 +- .../certification/Test_TC_SWTCH_3_2.yaml | 960 +++++++++++++----- src/app/tests/suites/ciTests.json | 2 +- 6 files changed, 767 insertions(+), 276 deletions(-) create mode 100644 src/app/tests/suites/certification/Test_TC_OO_2_6.yaml 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_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_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/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"], From e18f910034b56e62c49c06af8e71aeddc860a423 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 4 Sep 2024 16:44:26 -0400 Subject: [PATCH 19/35] Stop hardcoding the list of signed integer attribute types. (#35412) ZAP has this information. We should just use that instead of duplicating it. Fixes https://github.com/project-chip/connectedhomeip/issues/35147 --- src/app/util/attribute-metadata.h | 6 +-- .../templates/app/attribute-type.zapt | 20 +++++++++ .../app-common/zap-generated/attribute-type.h | 41 +++++++++++++++++++ 3 files changed, 62 insertions(+), 5 deletions(-) diff --git a/src/app/util/attribute-metadata.h b/src/app/util/attribute-metadata.h index 1a2b2fd04ed447..5be6916438d48a 100644 --- a/src/app/util/attribute-metadata.h +++ b/src/app/util/attribute-metadata.h @@ -166,11 +166,7 @@ struct EmberAfAttributeMetadata /** * Check wether this attribute is signed based on its type according to the spec. */ - bool IsSignedIntegerAttribute() const - { - return (attributeType >= ZCL_INT8S_ATTRIBUTE_TYPE && attributeType <= ZCL_INT64S_ATTRIBUTE_TYPE) || - attributeType == ZCL_TEMPERATURE_ATTRIBUTE_TYPE; - } + bool IsSignedIntegerAttribute() const { return chip::app::IsSignedAttributeType(attributeType); } /** * Check whether this attribute has a define min and max. 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/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 From 48df767bcbad2789fe7cd413904f9ce66e751a20 Mon Sep 17 00:00:00 2001 From: Saravana Perumal K <104007654+Saravana-kr22@users.noreply.github.com> Date: Thu, 5 Sep 2024 02:16:17 +0530 Subject: [PATCH 20/35] Updated yaml script as per the Issues raised by SQA (#35193) * Updated yaml script as per the Issues raised by SQA * Restyled by whitespace * Updated the default value of unsupportedNumberOfRinsesValue * Update src/app/tests/suites/certification/Test_TC_DD_2_1.yaml Co-authored-by: Leo Rozendaal * Update src/app/tests/suites/certification/Test_TC_DD_2_1.yaml Co-authored-by: Leo Rozendaal * Update src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml Co-authored-by: Leo Rozendaal * Update src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml Co-authored-by: Leo Rozendaal * Update src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml Co-authored-by: Leo Rozendaal * Update src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml Co-authored-by: Leo Rozendaal * Update src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml Co-authored-by: Leo Rozendaal * Update src/app/tests/suites/certification/Test_TC_DESC_2_1.yaml Co-authored-by: Leo Rozendaal * Update src/app/tests/suites/certification/Test_TC_DD_2_1.yaml Co-authored-by: Leo Rozendaal * Update src/app/tests/suites/certification/Test_TC_DD_2_1.yaml Co-authored-by: Leo Rozendaal * Restyled by prettier-yaml --------- Co-authored-by: Restyled.io Co-authored-by: cjandhyala <68604034+cjandhyala@users.noreply.github.com> Co-authored-by: Justin Wood Co-authored-by: Leo Rozendaal --- .../suites/certification/Test_TC_DD_2_1.yaml | 120 +++++-- .../certification/Test_TC_DESC_2_1.yaml | 326 ++++++++++++------ .../certification/Test_TC_DISHM_1_2.yaml | 83 +++-- .../certification/Test_TC_EEVSEM_1_2.yaml | 106 +++--- .../certification/Test_TC_EEVSEM_2_1.yaml | 2 +- .../suites/certification/Test_TC_I_2_2.yaml | 94 ++--- .../suites/certification/Test_TC_I_3_2.yaml | 12 +- .../suites/certification/Test_TC_LWM_1_2.yaml | 1 - .../suites/certification/Test_TC_MOD_1_3.yaml | 30 ++ .../certification/Test_TC_WASHERCTRL_2_2.yaml | 19 +- 10 files changed, 469 insertions(+), 324 deletions(-) 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_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_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_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_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_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: From 6fa2914b1f9e1ff020835ece10ec724c6b075e6f Mon Sep 17 00:00:00 2001 From: lpbeliveau-silabs <112982107+lpbeliveau-silabs@users.noreply.github.com> Date: Wed, 4 Sep 2024 17:07:00 -0400 Subject: [PATCH 21/35] [Bugfix] Waterleakdetector ScenesManagement build issue (#35406) * Fixed default SceneTableSize value in waterleakdetector and improved the ifdef detection of the define * Removed Scenes Management from waterleak detector and template --- ...otnode_waterleakdetector_0b067acfa3.matter | 182 ------------ .../rootnode_waterleakdetector_0b067acfa3.zap | 275 +----------------- examples/chef/devices/template.zap | 273 +---------------- .../clusters/scenes-server/SceneTableImpl.h | 2 +- 4 files changed, 14 insertions(+), 718 deletions(-) diff --git a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter index a75da3800cd9de..e41e0b8b65d521 100644 --- a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter +++ b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter @@ -1357,162 +1357,6 @@ cluster BooleanState = 69 { readonly attribute int16u clusterRevision = 65533; } -/** Attributes and commands for scene configuration and manipulation. */ -provisional cluster ScenesManagement = 98 { - revision 1; - - bitmap CopyModeBitmap : bitmap8 { - kCopyAllScenes = 0x1; - } - - bitmap Feature : bitmap32 { - kSceneNames = 0x1; - } - - struct AttributeValuePairStruct { - attrib_id attributeID = 0; - optional int8u valueUnsigned8 = 1; - optional int8s valueSigned8 = 2; - optional int16u valueUnsigned16 = 3; - optional int16s valueSigned16 = 4; - optional int32u valueUnsigned32 = 5; - optional int32s valueSigned32 = 6; - optional int64u valueUnsigned64 = 7; - optional int64s valueSigned64 = 8; - } - - struct ExtensionFieldSet { - cluster_id clusterID = 0; - AttributeValuePairStruct attributeValueList[] = 1; - } - - fabric_scoped struct SceneInfoStruct { - int8u sceneCount = 0; - fabric_sensitive int8u currentScene = 1; - fabric_sensitive group_id currentGroup = 2; - fabric_sensitive boolean sceneValid = 3; - int8u remainingCapacity = 4; - fabric_idx fabricIndex = 254; - } - - readonly attribute optional nullable node_id lastConfiguredBy = 0; - readonly attribute int16u sceneTableSize = 1; - readonly attribute SceneInfoStruct fabricSceneInfo[] = 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 AddSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - int32u transitionTime = 2; - char_string sceneName = 3; - ExtensionFieldSet extensionFieldSets[] = 4; - } - - response struct AddSceneResponse = 0 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct ViewSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct ViewSceneResponse = 1 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - optional int32u transitionTime = 3; - optional char_string sceneName = 4; - optional ExtensionFieldSet extensionFieldSets[] = 5; - } - - request struct RemoveSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct RemoveSceneResponse = 2 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RemoveAllScenesRequest { - group_id groupID = 0; - } - - response struct RemoveAllScenesResponse = 3 { - status status = 0; - group_id groupID = 1; - } - - request struct StoreSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - } - - response struct StoreSceneResponse = 4 { - status status = 0; - group_id groupID = 1; - int8u sceneID = 2; - } - - request struct RecallSceneRequest { - group_id groupID = 0; - int8u sceneID = 1; - optional nullable int32u transitionTime = 2; - } - - request struct GetSceneMembershipRequest { - group_id groupID = 0; - } - - response struct GetSceneMembershipResponse = 6 { - status status = 0; - nullable int8u capacity = 1; - group_id groupID = 2; - optional int8u sceneList[] = 3; - } - - request struct CopySceneRequest { - CopyModeBitmap mode = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - group_id groupIdentifierTo = 3; - int8u sceneIdentifierTo = 4; - } - - response struct CopySceneResponse = 64 { - status status = 0; - group_id groupIdentifierFrom = 1; - int8u sceneIdentifierFrom = 2; - } - - /** Add a scene to the scene table. Extension field sets are supported, and are inputed as '{"ClusterID": VALUE, "AttributeValueList":[{"AttributeID": VALUE, "Value*": VALUE}]}' */ - fabric command access(invoke: manage) AddScene(AddSceneRequest): AddSceneResponse = 0; - /** Retrieves the requested scene entry from its Scene table. */ - fabric command ViewScene(ViewSceneRequest): ViewSceneResponse = 1; - /** Removes the requested scene entry, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveScene(RemoveSceneRequest): RemoveSceneResponse = 2; - /** Remove all scenes, corresponding to the value of the GroupID field, from its Scene Table */ - fabric command access(invoke: manage) RemoveAllScenes(RemoveAllScenesRequest): RemoveAllScenesResponse = 3; - /** Adds the scene entry into its Scene Table along with all extension field sets corresponding to the current state of other clusters on the same endpoint */ - fabric command access(invoke: manage) StoreScene(StoreSceneRequest): StoreSceneResponse = 4; - /** Set the attributes and corresponding state for each other cluster implemented on the endpoint accordingly to the resquested scene entry in the Scene Table */ - fabric command RecallScene(RecallSceneRequest): DefaultSuccess = 5; - /** Get an unused scene identifier when no commissioning tool is in the network, or for a commissioning tool to get the used scene identifiers within a certain group */ - fabric command GetSceneMembership(GetSceneMembershipRequest): GetSceneMembershipResponse = 6; - /** Allows a client to efficiently copy scenes from one group/scene identifier pair to another group/scene identifier pair. */ - fabric command CopyScene(CopySceneRequest): CopySceneResponse = 64; -} - /** This cluster is used to configure a boolean sensor. */ cluster BooleanStateConfiguration = 128 { revision 1; @@ -1818,32 +1662,6 @@ endpoint 1 { ram attribute clusterRevision default = 1; } - server cluster ScenesManagement { - ram attribute lastConfiguredBy; - ram attribute sceneTableSize; - callback attribute fabricSceneInfo; - callback attribute generatedCommandList; - callback attribute acceptedCommandList; - callback attribute eventList; - callback attribute attributeList; - ram attribute featureMap default = 1; - ram attribute clusterRevision default = 6; - - handle command AddScene; - handle command AddSceneResponse; - handle command ViewScene; - handle command ViewSceneResponse; - handle command RemoveScene; - handle command RemoveSceneResponse; - handle command RemoveAllScenes; - handle command RemoveAllScenesResponse; - handle command StoreScene; - handle command StoreSceneResponse; - handle command RecallScene; - handle command GetSceneMembership; - handle command GetSceneMembershipResponse; - } - server cluster BooleanStateConfiguration { callback attribute generatedCommandList; callback attribute acceptedCommandList; diff --git a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.zap b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.zap index dad5608b6c6384..d2f3e341907a7d 100644 --- a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.zap +++ b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.zap @@ -643,7 +643,7 @@ "storageOption": "External", "singleton": 1, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -659,7 +659,7 @@ "storageOption": "External", "singleton": 1, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -756,7 +756,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -772,7 +772,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -788,7 +788,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -804,7 +804,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -820,7 +820,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2746,267 +2746,6 @@ } ] }, - { - "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 - } - ] - }, { "name": "Boolean State Configuration", "code": 128, diff --git a/examples/chef/devices/template.zap b/examples/chef/devices/template.zap index c0bc9ae53991a6..82c175c74fc289 100644 --- a/examples/chef/devices/template.zap +++ b/examples/chef/devices/template.zap @@ -756,7 +756,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -772,7 +772,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -788,7 +788,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -804,7 +804,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -820,7 +820,7 @@ "storageOption": "External", "singleton": 0, "bounded": 0, - "defaultValue": "", + "defaultValue": null, "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2623,267 +2623,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 - } - ] } ] } @@ -2906,4 +2645,4 @@ "parentEndpointIdentifier": null } ] -} +} \ No newline at end of file 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; From 0661d7aa75f87cb2ef8e6173d5d3c039abd45661 Mon Sep 17 00:00:00 2001 From: Andrei Litvin Date: Wed, 4 Sep 2024 17:22:00 -0400 Subject: [PATCH 22/35] Make DM provider and ember encode errors the same (#35338) * The flag of CONFIG_BUILD_FOR_HOST_UNIT_TEST is not actually tied to unit testing. Implement a separate flag to control if we crash on errors for IM/DM checks or not. * Update src/app/common_flags.gni Co-authored-by: Boris Zbarsky * make the flag name singular * Add unit test cluster members * Modified zap and made these attributes optional * Zap regen * Attributes MUST be up to 0x4FFF so needed to switch codes * Update ids enabling * Move around things and add unit test * Update to run unit tests with enforced DM checking * Comment describing the updated options * Fix unit test * Restyle * Kotlin format since it seems different eforcement is going on here * Update src/app/zap-templates/zcl/data-model/chip/test-cluster.xml Co-authored-by: Boris Zbarsky * Update examples/all-clusters-app/linux/main-common.cpp Co-authored-by: Boris Zbarsky * Remove redundant using * Simplify/shorten code * Move base to 0x3000 for the new attributes for test cluster testing * Restyle * Fix python unit test * Fix all clusters app * Fix unused import in python * Zap regen * Fix cirque * Fix hardcoded paths in TestTimeSyncTrustedtimeSourceRunner.py * Typo fix * Remove extra spacing * Update text * Fix app path --------- Co-authored-by: Andrei Litvin Co-authored-by: Boris Zbarsky --- .github/workflows/tests.yaml | 12 +- .../all-clusters-app.matter | 4 + .../all-clusters-common/all-clusters-app.zap | 32 +++ .../all-clusters-app/linux/main-common.cpp | 30 +- .../all-clusters-minimal-app.matter | 2 + .../rootnode_contactsensor_27f76aeaf5.matter | 2 + scripts/build/build/targets.py | 1 + scripts/build/builders/host.py | 6 + .../build/testdata/all_targets_linux_x64.txt | 2 +- .../TestTimeSyncTrustedTimeSourceRunner.py | 49 ++-- .../util/ember-compatibility-functions.cpp | 28 +- .../zcl/data-model/chip/test-cluster.xml | 8 + .../data_model/controller-clusters.matter | 2 + .../chip/devicecontroller/ChipClusters.java | 72 +++++ .../devicecontroller/ClusterIDMapping.java | 2 + .../devicecontroller/ClusterReadMapping.java | 22 ++ .../devicecontroller/ClusterWriteMapping.java | 44 +++ .../cluster/clusters/UnitTestingCluster.kt | 264 +++++++++++++++++ .../src/matter/controller/ICDClientInfo.kt | 3 +- .../CHIPAttributeTLVValueDecoder.cpp | 32 +++ .../python/chip/clusters/CHIPClusters.py | 14 + .../python/chip/clusters/Objects.py | 36 +++ .../test/test_scripts/cluster_objects.py | 2 + .../MTRAttributeSpecifiedCheck.mm | 6 + .../MTRAttributeTLVValueDecoder.mm | 22 ++ .../CHIP/zap-generated/MTRBaseClusters.h | 16 ++ .../CHIP/zap-generated/MTRBaseClusters.mm | 128 +++++++++ .../CHIP/zap-generated/MTRClusterConstants.h | 2 + .../CHIP/zap-generated/MTRClusterNames.mm | 8 + .../CHIP/zap-generated/MTRClusters.h | 8 + .../CHIP/zap-generated/MTRClusters.mm | 32 +++ .../TestUnitTestingErrorPath.py | 102 +++++++ .../zap-generated/attributes/Accessors.cpp | 92 ++++++ .../zap-generated/attributes/Accessors.h | 12 + .../zap-generated/cluster-objects.cpp | 4 + .../zap-generated/cluster-objects.h | 28 +- .../app-common/zap-generated/ids/Attributes.h | 8 + .../zap-generated/cluster/Commands.h | 10 + .../cluster/logging/DataModelLogger.cpp | 10 + .../cluster/logging/EntryToText.cpp | 4 + .../zap-generated/cluster/Commands.h | 265 ++++++++++++++++++ 41 files changed, 1388 insertions(+), 38 deletions(-) create mode 100644 src/python_testing/TestUnitTestingErrorPath.py diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml index 8d8b0064202c9d..3a9bca19317216 100644 --- a/.github/workflows/tests.yaml +++ b/.github/workflows/tests.yaml @@ -475,11 +475,17 @@ 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 \ @@ -496,7 +502,7 @@ 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 @@ -515,7 +521,7 @@ 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/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' 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 1f8bc5463d8a9d..9769afdc262ba0 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 @@ -7307,6 +7307,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; @@ -9546,6 +9548,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 00f525cf1710ae..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 @@ -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/linux/main-common.cpp b/examples/all-clusters-app/linux/main-common.cpp index 42df91b845a610..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_"; @@ -336,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-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 49be7047972beb..9424fab0a17c1c 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 @@ -5898,6 +5898,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.matter b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter index d10dce747c4695..830abb4079edae 100644 --- a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter +++ b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter @@ -1908,6 +1908,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/scripts/build/build/targets.py b/scripts/build/build/targets.py index 378a286f5bf5a4..7cd7c157a54403 100755 --- a/scripts/build/build/targets.py +++ b/scripts/build/build/targets.py @@ -196,6 +196,7 @@ def BuildHostTarget(): target.AppendModifier('data-model-check', data_model_interface="check").ExceptIfRe('-data-model-(enabled|disabled)') target.AppendModifier('data-model-disabled', data_model_interface="disabled").ExceptIfRe('-data-model-(check|enabled)') target.AppendModifier('data-model-enabled', data_model_interface="enabled").ExceptIfRe('-data-model-(check|disabled)') + target.AppendModifier('check-failure-die', data_model_interface="enabled").OnlyIfRe('-data-model-check') return target diff --git a/scripts/build/builders/host.py b/scripts/build/builders/host.py index 01b35c7a01185f..12d21fbe8ba62e 100644 --- a/scripts/build/builders/host.py +++ b/scripts/build/builders/host.py @@ -323,6 +323,7 @@ def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE, enable_dnssd_tests: Optional[bool] = None, chip_casting_simplified: Optional[bool] = None, data_model_interface: Optional[bool] = None, + chip_data_model_check_die_on_failure: Optional[bool] = None, ): super(HostBuilder, self).__init__( root=os.path.join(root, 'examples', app.ExamplePath()), @@ -421,6 +422,11 @@ def __init__(self, root, runner, app: HostApp, board=HostBoard.NATIVE, self.extra_gn_options.append('chip_build_tests=true') self.extra_gn_options.append('chip_data_model_check_die_on_failure=true') self.build_command = 'check' + elif chip_data_model_check_die_on_failure is not None: + if chip_data_model_check_die_on_failure: + self.extra_gn_options.append('chip_data_model_check_die_on_failure=true') + else: + self.extra_gn_options.append('chip_data_model_check_die_on_failure=false') if app == HostApp.EFR32_TEST_RUNNER: self.build_command = 'runner' diff --git a/scripts/build/testdata/all_targets_linux_x64.txt b/scripts/build/testdata/all_targets_linux_x64.txt index 07b409c75b3b53..6639429b31bb75 100644 --- a/scripts/build/testdata/all_targets_linux_x64.txt +++ b/scripts/build/testdata/all_targets_linux_x64.txt @@ -9,7 +9,7 @@ efr32-{brd2704b,brd4316a,brd4317a,brd4318a,brd4319a,brd4186a,brd4187a,brd2601b,b esp32-{m5stack,c3devkit,devkitc,qemu}-{all-clusters,all-clusters-minimal,energy-management,ota-provider,ota-requestor,shell,light,lock,bridge,temperature-measurement,ota-requestor,tests}[-rpc][-ipv6only][-tracing] genio-lighting-app linux-fake-tests[-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-pw-fuzztest][-coverage][-dmalloc][-clang] -linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,kotlin-matter-controller,minmdns,light,light-data-model-no-unique-id,lock,shell,ota-provider,ota-requestor,simulated-app1,simulated-app2,python-bindings,tv-app,tv-casting-app,bridge,fabric-admin,fabric-bridge,tests,chip-cert,address-resolve-tool,contact-sensor,dishwasher,microwave-oven,refrigerator,rvc,air-purifier,lit-icd,air-quality-sensor,network-manager,energy-management}[-nodeps][-nlfaultinject][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-pw-fuzztest][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui][-evse-test-event][-enable-dnssd-tests][-disable-dnssd-tests][-chip-casting-simplified][-data-model-check][-data-model-disabled][-data-model-enabled] +linux-{x64,arm64}-{rpc-console,all-clusters,all-clusters-minimal,chip-tool,thermostat,java-matter-controller,kotlin-matter-controller,minmdns,light,light-data-model-no-unique-id,lock,shell,ota-provider,ota-requestor,simulated-app1,simulated-app2,python-bindings,tv-app,tv-casting-app,bridge,fabric-admin,fabric-bridge,tests,chip-cert,address-resolve-tool,contact-sensor,dishwasher,microwave-oven,refrigerator,rvc,air-purifier,lit-icd,air-quality-sensor,network-manager,energy-management}[-nodeps][-nlfaultinject][-platform-mdns][-minmdns-verbose][-libnl][-same-event-loop][-no-interactive][-ipv6only][-no-ble][-no-wifi][-no-thread][-mbedtls][-boringssl][-asan][-tsan][-ubsan][-libfuzzer][-ossfuzz][-pw-fuzztest][-coverage][-dmalloc][-clang][-test][-rpc][-with-ui][-evse-test-event][-enable-dnssd-tests][-disable-dnssd-tests][-chip-casting-simplified][-data-model-check][-data-model-disabled][-data-model-enabled][-check-failure-die] linux-x64-efr32-test-runner[-clang] imx-{chip-tool,lighting-app,thermostat,all-clusters-app,all-clusters-minimal-app,ota-provider-app}[-release] infineon-psoc6-{lock,light,all-clusters,all-clusters-minimal}[-ota][-updateimage][-trustm] diff --git a/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/src/app/util/ember-compatibility-functions.cpp b/src/app/util/ember-compatibility-functions.cpp index 7dadac8695fd63..00f06dd32a858d 100644 --- a/src/app/util/ember-compatibility-functions.cpp +++ b/src/app/util/ember-compatibility-functions.cpp @@ -329,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()); @@ -349,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); 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/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index 42086a2caa93c5..cbe81c4d2e6a04 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -9809,6 +9809,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/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index fd792a14bb2e4f..9001413960dff3 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -65170,6 +65170,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; @@ -68330,6 +68332,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/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index b48f4029b62237..e0099ccf4c87dc 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -17775,6 +17775,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/ClusterReadMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java index 6baa71c6886c6e..b09c89302d33b6 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterReadMapping.java @@ -20857,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/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/src/matter/controller/ICDClientInfo.kt b/src/controller/java/src/matter/controller/ICDClientInfo.kt index a1c543a044bacc..9ad3757ad32d28 100644 --- a/src/controller/java/src/matter/controller/ICDClientInfo.kt +++ b/src/controller/java/src/matter/controller/ICDClientInfo.kt @@ -28,5 +28,6 @@ data class ICDClientInfo( val icdAesKey: ByteArray, val icdHmacKey: ByteArray ) { - override fun toString(): String = "$peerNodeId/$checkInNodeId/$startCounter/$offset/$monitoredSubject" + override fun toString(): String = + "$peerNodeId/$checkInNodeId/$startCounter/$offset/$monitoredSubject" } diff --git a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp index b6f8a6364105c0..771d026771d39d 100644 --- a/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPAttributeTLVValueDecoder.cpp @@ -47560,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/python/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index 356d3b43569ea2..a26555e58dd517 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -14837,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 a5988bbf54e71a..482fe33f61c2c1 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -50211,6 +50211,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 +50308,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 +52155,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/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/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm index 3f8df9ea33d334..b2da0cf9db04ad 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeSpecifiedCheck.mm @@ -6684,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 f26c5e29e39bf8..de61e4dd22cf7d 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRAttributeTLVValueDecoder.mm @@ -19717,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 bedf8161036583..9360e68c590fcd 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h @@ -16729,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)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 453ec72508abce..696d1f8058b3ed 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm @@ -120041,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 3ceca84ced8163..1ffa3ecc58db7a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -5766,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, diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm index 894f8399c7e3c7..69ec92c0e5217a 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm @@ -9171,6 +9171,14 @@ result = @"Unsupported"; break; + case MTRAttributeIDTypeClusterUnitTestingAttributeReadFailureCodeID: + result = @"ReadFailureCode"; + break; + + case MTRAttributeIDTypeClusterUnitTestingAttributeFailureInt32UID: + result = @"FailureInt32U"; + break; + case MTRAttributeIDTypeClusterUnitTestingAttributeNullableBooleanID: result = @"NullableBoolean"; break; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index b4153ecf56db86..a717868edf09fc 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h @@ -7648,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 780c3a49d70521..6f6db16eb72210 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm @@ -22543,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/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/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp b/zzz_generated/app-common/app-common/zap-generated/attributes/Accessors.cpp index ebd5339fd079a7..ed3e70fb6c9d1a 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 @@ -45518,6 +45518,98 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value) } // namespace Unsupported +namespace ReadFailureCode { + +Protocols::InteractionModel::Status Get(chip::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(chip::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(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT8U_ATTRIBUTE_TYPE, markDirty); +} + +Protocols::InteractionModel::Status Set(chip::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(chip::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(chip::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(endpoint, Clusters::UnitTesting::Id, Id, writable, ZCL_INT32U_ATTRIBUTE_TYPE, markDirty); +} + +Protocols::InteractionModel::Status Set(chip::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) 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 5537692d6908d4..80b542dbf0c190 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 @@ -6904,6 +6904,18 @@ Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value, MarkAttributeDirty markDirty); } // namespace Unsupported +namespace ReadFailureCode { +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); +} // namespace ReadFailureCode + +namespace FailureInt32U { +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); +} // namespace FailureInt32U + namespace NullableBoolean { Protocols::InteractionModel::Status Get(chip::EndpointId endpoint, DataModel::Nullable & value); // boolean Protocols::InteractionModel::Status Set(chip::EndpointId endpoint, bool value); 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 4be7782087f3d6..354eb75feb77de 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 @@ -31889,6 +31889,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 78022f3ac6ce11..e96a078ea28f58 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 @@ -46794,6 +46794,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 { @@ -47344,7 +47368,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 6cb26b63d9912c..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 @@ -8304,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/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index f50b5721bce5d5..5e6f77d66bde82 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -14222,6 +14222,8 @@ class ElectricalMeasurementGetMeasurementProfileCommand : public ClusterCommand | * GlobalEnum | 0x0033 | | * GlobalStruct | 0x0034 | | * Unsupported | 0x00FF | +| * ReadFailureCode | 0x3000 | +| * FailureInt32U | 0x3001 | | * NullableBoolean | 0x4000 | | * NullableBitmap8 | 0x4001 | | * NullableBitmap16 | 0x4002 | @@ -27702,6 +27704,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), // @@ -27856,6 +27860,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< @@ -28021,6 +28029,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 0efe192f7b59aa..b61e6e9bae9232 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -19189,6 +19189,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)); 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 3909bbec0d8746..07bac4319c7c61 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/EntryToText.cpp @@ -4904,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 a77ea1f918b90b..7fdfb6f9689c01 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -177044,6 +177044,8 @@ class SubscribeAttributeElectricalMeasurementClusterRevision : public SubscribeA | * GlobalEnum | 0x0033 | | * GlobalStruct | 0x0034 | | * Unsupported | 0x00FF | +| * ReadFailureCode | 0x3000 | +| * FailureInt32U | 0x3001 | | * NullableBoolean | 0x4000 | | * NullableBitmap8 | 0x4001 | | * NullableBitmap16 | 0x4002 | @@ -185567,6 +185569,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 */ @@ -198971,6 +199226,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(), // From f02df8965089a2e893123b643ccbc42e2d11ea04 Mon Sep 17 00:00:00 2001 From: Harshith-GRL <145322529+Harshith-GRL@users.noreply.github.com> Date: Thu, 5 Sep 2024 03:06:25 +0530 Subject: [PATCH 23/35] Updated DoorLock Python scripts and DRLK_2_1 yaml. (#35182) * Updated DoorLock Python scripts and DRLK_2_1 yaml. * TC_DRLK_2_X.py - updated as per latest test plan * TC_BOOLCFG_3_1.py - Test description is changed. * TC_PWRTL_2_1.py - Added missing step for subset check as per latest test plan. * Test_TC_DRLK_2_1.yaml - Script is updated with latest changes from test plan. * Restyled by whitespace * Restyled by prettier-yaml * Restyled by autopep8 * Lint errors are fixed * ednpoint will be taken from command line args * Teardown function added for all scripts --------- Co-authored-by: Restyled.io --- .../certification/Test_TC_DRLK_2_1.yaml | 192 ++++++++---------- src/python_testing/TC_BOOLCFG_3_1.py | 2 +- src/python_testing/TC_DRLK_2_12.py | 7 +- src/python_testing/TC_DRLK_2_13.py | 4 +- src/python_testing/TC_DRLK_2_2.py | 7 +- src/python_testing/TC_DRLK_2_3.py | 7 +- src/python_testing/TC_PWRTL_2_1.py | 19 +- src/python_testing/drlk_2_x_common.py | 178 +++++++++------- 8 files changed, 223 insertions(+), 193 deletions(-) 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/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_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_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/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, From 17dafaa6360904f36fb30b22f2881c4945b7e597 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Wed, 4 Sep 2024 18:04:37 -0400 Subject: [PATCH 24/35] Address follow-up PR comments for fabric-admin UniqueIdGetter (#35405) --------- Co-authored-by: Restyled.io Co-authored-by: saurabhst --- examples/fabric-admin/BUILD.gn | 4 +- .../device_manager/DeviceSynchronization.cpp | 63 +++++++++++-------- .../device_manager/DeviceSynchronization.h | 6 +- .../{UidGetter.cpp => UniqueIdGetter.cpp} | 24 +++---- .../{UidGetter.h => UniqueIdGetter.h} | 20 ++++-- 5 files changed, 71 insertions(+), 46 deletions(-) rename examples/fabric-admin/device_manager/{UidGetter.cpp => UniqueIdGetter.cpp} (80%) rename examples/fabric-admin/device_manager/{UidGetter.h => UniqueIdGetter.h} (73%) diff --git a/examples/fabric-admin/BUILD.gn b/examples/fabric-admin/BUILD.gn index 36ba7ec4e15d51..d1add205f8826c 100644 --- a/examples/fabric-admin/BUILD.gn +++ b/examples/fabric-admin/BUILD.gn @@ -88,8 +88,8 @@ static_library("fabric-admin-utils") { "device_manager/DeviceSubscriptionManager.h", "device_manager/DeviceSynchronization.cpp", "device_manager/DeviceSynchronization.h", - "device_manager/UidGetter.cpp", - "device_manager/UidGetter.h", + "device_manager/UniqueIdGetter.cpp", + "device_manager/UniqueIdGetter.h", ] deps = [ "${chip_root}/src/app:events" ] diff --git a/examples/fabric-admin/device_manager/DeviceSynchronization.cpp b/examples/fabric-admin/device_manager/DeviceSynchronization.cpp index bc3e9b31fe6b1b..6cc1cea690df2f 100644 --- a/examples/fabric-admin/device_manager/DeviceSynchronization.cpp +++ b/examples/fabric-admin/device_manager/DeviceSynchronization.cpp @@ -136,15 +136,11 @@ void DeviceSynchronizer::OnDone(chip::app::ReadClient * apReadClient) #if defined(PW_RPC_ENABLED) if (mState == State::ReceivedResponse && !DeviceMgr().IsCurrentBridgeDevice(mCurrentDeviceData.node_id)) { - auto * device = DeviceMgr().FindDeviceByNode(mCurrentDeviceData.node_id); - if (!mCurrentDeviceData.has_unique_id && device) + GetUniqueId(); + if (mState == State::GettingUid) { - GetUid(device->GetEndpointId()); - if (mState == State::GettingUid) - { - // GetUid was successful and we rely on callback to call SynchronizationCompleteAddDevice. - return; - } + // GetUniqueId was successful and we rely on callback to call SynchronizationCompleteAddDevice. + return; } SynchronizationCompleteAddDevice(); } @@ -211,32 +207,49 @@ void DeviceSynchronizer::StartDeviceSynchronization(chip::Controller::DeviceCont MoveToState(State::Connecting); } -void DeviceSynchronizer::GetUid(EndpointId remoteEndpointIdOfInterest) +void DeviceSynchronizer::GetUniqueId() { VerifyOrDie(mState == State::ReceivedResponse); VerifyOrDie(mController); + + // If we have a UniqueId we can return leaving state in ReceivedResponse. + VerifyOrReturn(!mCurrentDeviceData.has_unique_id, ChipLogDetail(NotSpecified, "We already have UniqueId")); + + auto * device = DeviceMgr().FindDeviceByNode(mCurrentDeviceData.node_id); + // If there is no associated remote Fabric Sync Aggregator there is no other place for us to try + // getting the UniqueId from and can return leaving the state in ReceivedResponse. + VerifyOrReturn(device, ChipLogDetail(NotSpecified, "No remote Fabric Sync Aggregator to get UniqueId from")); + + // Because device is not-null we expect IsFabricSyncReady to be true. IsFabricSyncReady indicates we have a + // connection to the remote Fabric Sync Aggregator. VerifyOrDie(DeviceMgr().IsFabricSyncReady()); - auto remoteBridgeNodeId = DeviceMgr().GetRemoteBridgeNodeId(); - - CHIP_ERROR err = mUidGetter.GetUid( - [this](std::optional aUniqueId) { - if (aUniqueId.has_value()) - { - this->mCurrentDeviceData.has_unique_id = true; - memcpy(this->mCurrentDeviceData.unique_id, aUniqueId.value().data(), aUniqueId.value().size()); - } - else - { - ChipLogError(NotSpecified, "We expected to get UniqueId from remote fabric sync bridge"); - } - this->SynchronizationCompleteAddDevice(); - }, - *mController, remoteBridgeNodeId, remoteEndpointIdOfInterest); + auto remoteBridgeNodeId = DeviceMgr().GetRemoteBridgeNodeId(); + EndpointId remoteEndpointIdOfInterest = device->GetEndpointId(); + + ChipLogDetail(NotSpecified, "Attempting to get UniqueId from remote Fabric Sync Aggregator") CHIP_ERROR err = + mUniqueIdGetter.GetUniqueId( + [this](std::optional aUniqueId) { + if (aUniqueId.has_value()) + { + this->mCurrentDeviceData.has_unique_id = true; + memcpy(this->mCurrentDeviceData.unique_id, aUniqueId.value().data(), aUniqueId.value().size()); + } + else + { + ChipLogError(NotSpecified, "We expected to get UniqueId from remote Fabric Sync Aggregator, but failed"); + } + this->SynchronizationCompleteAddDevice(); + }, + *mController, remoteBridgeNodeId, remoteEndpointIdOfInterest); if (err == CHIP_NO_ERROR) { MoveToState(State::GettingUid); } + else + { + ChipLogDetail(NotSpecified, "Failed to get UniqueId from remote Fabric Sync Aggregator") + } } void DeviceSynchronizer::SynchronizationCompleteAddDevice() diff --git a/examples/fabric-admin/device_manager/DeviceSynchronization.h b/examples/fabric-admin/device_manager/DeviceSynchronization.h index 495fecd60bd4b5..11b640236268dd 100644 --- a/examples/fabric-admin/device_manager/DeviceSynchronization.h +++ b/examples/fabric-admin/device_manager/DeviceSynchronization.h @@ -17,7 +17,7 @@ */ #pragma once -#include "UidGetter.h" +#include "UniqueIdGetter.h" #include #include @@ -77,7 +77,7 @@ class DeviceSynchronizer : public chip::app::ReadClient::Callback GettingUid, ///< We are getting UniqueId from the remote fabric sync bridge. }; - void GetUid(chip::EndpointId endpointId); + void GetUniqueId(); void SynchronizationCompleteAddDevice(); void MoveToState(const State targetState); @@ -93,5 +93,5 @@ class DeviceSynchronizer : public chip::app::ReadClient::Callback // mState != Idle). chip::Controller::DeviceController * mController = nullptr; chip_rpc_SynchronizedDevice mCurrentDeviceData = chip_rpc_SynchronizedDevice_init_default; - UidGetter mUidGetter; + UniqueIdGetter mUniqueIdGetter; }; diff --git a/examples/fabric-admin/device_manager/UidGetter.cpp b/examples/fabric-admin/device_manager/UniqueIdGetter.cpp similarity index 80% rename from examples/fabric-admin/device_manager/UidGetter.cpp rename to examples/fabric-admin/device_manager/UniqueIdGetter.cpp index baeaba6a02498c..3aba21752d9c67 100644 --- a/examples/fabric-admin/device_manager/UidGetter.cpp +++ b/examples/fabric-admin/device_manager/UniqueIdGetter.cpp @@ -16,7 +16,7 @@ * */ -#include "UidGetter.h" +#include "UniqueIdGetter.h" using namespace ::chip; using namespace ::chip::app; @@ -26,12 +26,12 @@ namespace { void OnDeviceConnectedWrapper(void * context, Messaging::ExchangeManager & exchangeMgr, const SessionHandle & sessionHandle) { - reinterpret_cast(context)->OnDeviceConnected(exchangeMgr, sessionHandle); + reinterpret_cast(context)->OnDeviceConnected(exchangeMgr, sessionHandle); } void OnDeviceConnectionFailureWrapper(void * context, const ScopedNodeId & peerId, CHIP_ERROR error) { - reinterpret_cast(context)->OnDeviceConnectionFailure(peerId, error); + reinterpret_cast(context)->OnDeviceConnectionFailure(peerId, error); } bool SuccessOrLog(CHIP_ERROR err, const char * name) @@ -48,13 +48,13 @@ bool SuccessOrLog(CHIP_ERROR err, const char * name) } // namespace -UidGetter::UidGetter() : +UniqueIdGetter::UniqueIdGetter() : mOnDeviceConnectedCallback(OnDeviceConnectedWrapper, this), mOnDeviceConnectionFailureCallback(OnDeviceConnectionFailureWrapper, this) {} -CHIP_ERROR UidGetter::GetUid(OnDoneCallback onDoneCallback, chip::Controller::DeviceController & controller, chip::NodeId nodeId, - chip::EndpointId endpointId) +CHIP_ERROR UniqueIdGetter::GetUniqueId(OnDoneCallback onDoneCallback, chip::Controller::DeviceController & controller, + chip::NodeId nodeId, chip::EndpointId endpointId) { assertChipStackLockedByCurrentThread(); VerifyOrDie(!mCurrentlyGettingUid); @@ -74,7 +74,7 @@ CHIP_ERROR UidGetter::GetUid(OnDoneCallback onDoneCallback, chip::Controller::De return err; } -void UidGetter::OnAttributeData(const ConcreteDataAttributePath & path, TLV::TLVReader * data, const StatusIB & status) +void UniqueIdGetter::OnAttributeData(const ConcreteDataAttributePath & path, TLV::TLVReader * data, const StatusIB & status) { VerifyOrDie(path.mClusterId == Clusters::BridgedDeviceBasicInformation::Id); @@ -95,23 +95,23 @@ void UidGetter::OnAttributeData(const ConcreteDataAttributePath & path, TLV::TLV } } -void UidGetter::OnReportEnd() +void UniqueIdGetter::OnReportEnd() { // We will call mOnDoneCallback in OnDone. } -void UidGetter::OnError(CHIP_ERROR error) +void UniqueIdGetter::OnError(CHIP_ERROR error) { ChipLogProgress(NotSpecified, "Error Getting UID: %" CHIP_ERROR_FORMAT, error.Format()); } -void UidGetter::OnDone(ReadClient * apReadClient) +void UniqueIdGetter::OnDone(ReadClient * apReadClient) { mCurrentlyGettingUid = false; mOnDoneCallback(mUniqueIdHasValue ? std::make_optional(mUniqueId) : std::nullopt); } -void UidGetter::OnDeviceConnected(Messaging::ExchangeManager & exchangeMgr, const SessionHandle & sessionHandle) +void UniqueIdGetter::OnDeviceConnected(Messaging::ExchangeManager & exchangeMgr, const SessionHandle & sessionHandle) { VerifyOrDie(mCurrentlyGettingUid); mClient = std::make_unique(app::InteractionModelEngine::GetInstance(), &exchangeMgr, *this /* callback */, @@ -137,7 +137,7 @@ void UidGetter::OnDeviceConnected(Messaging::ExchangeManager & exchangeMgr, cons } } -void UidGetter::OnDeviceConnectionFailure(const ScopedNodeId & peerId, CHIP_ERROR error) +void UniqueIdGetter::OnDeviceConnectionFailure(const ScopedNodeId & peerId, CHIP_ERROR error) { VerifyOrDie(mCurrentlyGettingUid); ChipLogError(NotSpecified, "DeviceSubscription failed to connect to " ChipLogFormatX64, ChipLogValueX64(peerId.GetNodeId())); diff --git a/examples/fabric-admin/device_manager/UidGetter.h b/examples/fabric-admin/device_manager/UniqueIdGetter.h similarity index 73% rename from examples/fabric-admin/device_manager/UidGetter.h rename to examples/fabric-admin/device_manager/UniqueIdGetter.h index 5f99c75198c5dc..6680adf5bdfc97 100644 --- a/examples/fabric-admin/device_manager/UidGetter.h +++ b/examples/fabric-admin/device_manager/UniqueIdGetter.h @@ -24,15 +24,27 @@ #include #include -class UidGetter : public chip::app::ReadClient::Callback +/** + * @brief Class used to get UniqueID from Bridged Device Basic Information Cluster + * + * When syncing a device from another fabric that does not have a UniqueID, spec + * dictates: + * When a Fabric Synchronizing Administrator commissions a Synchronized Device, + * it SHALL persist and maintain an association with the UniqueID in the Bridged + * Device Basic Information Cluster exposed by another Fabric Synchronizing + * Administrator. + * + * This class assists in retrieving the UniqueId in the above situation. + */ +class UniqueIdGetter : public chip::app::ReadClient::Callback { public: using OnDoneCallback = std::function)>; - UidGetter(); + UniqueIdGetter(); - CHIP_ERROR GetUid(OnDoneCallback onDoneCallback, chip::Controller::DeviceController & controller, chip::NodeId nodeId, - chip::EndpointId endpointId); + CHIP_ERROR GetUniqueId(OnDoneCallback onDoneCallback, chip::Controller::DeviceController & controller, chip::NodeId nodeId, + chip::EndpointId endpointId); /////////////////////////////////////////////////////////////// // ReadClient::Callback implementation From 55a37e2b39debdb5bc1aa354c64bfa37d8d8b27c Mon Sep 17 00:00:00 2001 From: C Freeman Date: Wed, 4 Sep 2024 18:10:34 -0400 Subject: [PATCH 25/35] TC-ACL-2.11: Add top level PICS (#35415) Without this, the TH is going to select this test for every device and every device except the MACL devices will fail. --- src/python_testing/TC_ACL_2_11.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/python_testing/TC_ACL_2_11.py b/src/python_testing/TC_ACL_2_11.py index 5fb897f8c5b379..a9f63b22d5c798 100644 --- a/src/python_testing/TC_ACL_2_11.py +++ b/src/python_testing/TC_ACL_2_11.py @@ -74,6 +74,9 @@ class TC_ACL_2_11(MatterBaseTest): 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" From 5c062aa815d8397a7dac8833e8fc79af41b12f8f Mon Sep 17 00:00:00 2001 From: C Freeman Date: Wed, 4 Sep 2024 19:33:52 -0400 Subject: [PATCH 26/35] Basic comp tests: add fix for pre-commissioned devices (#35409) * Basic comp tests: add fix for pre-commissioned devices * add check to CI --- src/python_testing/TC_DeviceBasicComposition.py | 8 +++++++- src/python_testing/basic_composition_support.py | 4 +++- src/python_testing/matter_testing_support.py | 11 ++++++----- 3 files changed, 16 insertions(+), 7 deletions(-) diff --git a/src/python_testing/TC_DeviceBasicComposition.py b/src/python_testing/TC_DeviceBasicComposition.py index 24a336e0b001e9..a4ab495114a245 100644 --- a/src/python_testing/TC_DeviceBasicComposition.py +++ b/src/python_testing/TC_DeviceBasicComposition.py @@ -19,7 +19,7 @@ # for details about the block below. # # === BEGIN CI TEST ARGUMENTS === -# test-runner-runs: run1 run2 run3 run4 run5 run6 run7 +# 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 @@ -61,6 +61,12 @@ # 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 diff --git a/src/python_testing/basic_composition_support.py b/src/python_testing/basic_composition_support.py index c09d78ef3027d8..5401b1fad04f9d 100644 --- a/src/python_testing/basic_composition_support.py +++ b/src/python_testing/basic_composition_support.py @@ -104,6 +104,8 @@ def get_code(self, dev_ctrl): 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] @@ -132,7 +134,7 @@ async def setup_class_helper(self, allow_pase: bool = True): node_id = self.dut_node_id task_list = [] - if allow_pase: + 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)) diff --git a/src/python_testing/matter_testing_support.py b/src/python_testing/matter_testing_support.py index 7c1ac60fd3910a..c5d46e2306dae2 100644 --- a/src/python_testing/matter_testing_support.py +++ b/src/python_testing/matter_testing_support.py @@ -1744,6 +1744,12 @@ 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 @@ -1751,8 +1757,6 @@ def populate_commissioning_args(args: argparse.Namespace, config: MatterTestConf if len(config.dut_node_ids) < len(device_descriptors): # We generate new node IDs sequentially from the last one seen for all # missing NodeIDs when commissioning many nodes at once. - if not config.dut_node_ids: - config.dut_node_ids = [_DEFAULT_DUT_NODE_ID] 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) @@ -1765,9 +1769,6 @@ def populate_commissioning_args(args: argparse.Namespace, config: MatterTestConf print("error: Duplicate value in discriminator list") return False - 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 From 7fdfc88383676eeecd022e047ae1c5a8ce1b9b47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Josefsen?= <69624991+ReneJosefsen@users.noreply.github.com> Date: Thu, 5 Sep 2024 02:30:23 +0200 Subject: [PATCH 27/35] [TC-LVL-2.3] Minor adjustments from Test Plan feedback (#35215) * Minor adjustments from TP feedback * Update src/python_testing/TC_LVL_2_3.py --- src/python_testing/TC_LVL_2_3.py | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/python_testing/TC_LVL_2_3.py b/src/python_testing/TC_LVL_2_3.py index d0ac4c8c1ff893..dcb2e8d65df168 100644 --- a/src/python_testing/TC_LVL_2_3.py +++ b/src/python_testing/TC_LVL_2_3.py @@ -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", @@ -77,9 +77,9 @@ 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") ] @@ -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) @@ -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) From 77340692640f929163318ecd46a9e68382bbf17b Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Wed, 4 Sep 2024 17:39:54 -0700 Subject: [PATCH 28/35] [Fabric-Sync] Improve the stability of test TC_MCORE_FS_1_4 (#35416) * Improve the stability of test TC_MCORE_FS_1_4 * Address the review comments * Make wait_for_server_initialization global * Restyled by autopep8 --------- Co-authored-by: Restyled.io --- src/python_testing/TC_MCORE_FS_1_4.py | 36 ++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/src/python_testing/TC_MCORE_FS_1_4.py b/src/python_testing/TC_MCORE_FS_1_4.py index 8e05c2dd7e9c3d..e6337352d5a71c 100644 --- a/src/python_testing/TC_MCORE_FS_1_4.py +++ b/src/python_testing/TC_MCORE_FS_1_4.py @@ -48,7 +48,34 @@ 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): @@ -228,7 +255,7 @@ def setup_class(self): self.th_server_port = 5544 self.th_server_discriminator = self.th_fsa_bridge_discriminator + 1 - self.th_server_passcode = 20202021 + self.th_server_passcode = 20202022 # Start the TH_SERVER_NO_UID app. self.th_server = AppServer( @@ -238,6 +265,12 @@ def setup_class(self): 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() @@ -271,6 +304,7 @@ async def test_TC_MCORE_FS_1_4(self): 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, From 58ed63d1e6c1daaa00658b1c8a15bad162437f31 Mon Sep 17 00:00:00 2001 From: Tennessee Carmel-Veilleux Date: Wed, 4 Sep 2024 21:12:53 -0400 Subject: [PATCH 29/35] Fix ACL XML for MACL and sample conformance (#35411) * Fix ACL cluster ZAP XML and regen ZAP - Remove dead event AccessRestrictionEntryChanged - Set response command for ReviewFabricRestrictions - Set correct optionality for FabricRestrictionReviewUpdate * Fix access control server after XML change * Remove unsupportable commnad * Rename RedirectURL field to ARLRequestFlowUrl * Kick CI * Kick CI * Remove non-longer-applicable files * Increase size of event buffer pool in NIM sample * Restyled by clang-format * Fix format * Remove subscription for event that no longer exists --------- Co-authored-by: Restyled.io --- .../air-purifier-app.matter | 12 +-- .../air-quality-sensor-app.matter | 12 +-- .../all-clusters-app.matter | 12 +-- .../all-clusters-minimal-app.matter | 12 +-- .../bridge-common/bridge-app.matter | 24 ++---- ...p_rootnode_dimmablelight_bCwGYSDpoe.matter | 12 +-- .../rootnode_airpurifier_73a6fe2651.matter | 12 +-- ...umiditysensor_thermostat_56de3d5f45.matter | 12 +-- ...ootnode_airqualitysensor_e63187f6c9.matter | 12 +-- ...ootnode_basicvideoplayer_0ff86e943b.matter | 12 +-- ...de_colortemperaturelight_hbUnzYVeyn.matter | 12 +-- .../rootnode_contactsensor_27f76aeaf5.matter | 12 +-- .../rootnode_contactsensor_lFAGG1bfRO.matter | 12 +-- .../rootnode_dimmablelight_bCwGYSDpoe.matter | 12 +-- ...tnode_dimmablepluginunit_f8a9a0b9d4.matter | 12 +-- .../rootnode_dishwasher_cc105034fe.matter | 12 +-- .../rootnode_doorlock_aNKYAreMXE.matter | 12 +-- ...tnode_extendedcolorlight_8lcaaYJVAa.matter | 12 +-- .../devices/rootnode_fan_7N2TobIlOX.matter | 12 +-- .../rootnode_flowsensor_1zVxHedlaV.matter | 12 +-- .../rootnode_genericswitch_2dfff6e516.matter | 12 +-- .../rootnode_genericswitch_9866e35d0b.matter | 12 +-- ...tnode_heatingcoolingunit_ncdGai1E5a.matter | 12 +-- .../rootnode_humiditysensor_Xyj4gda6Hb.matter | 12 +-- .../rootnode_laundrywasher_fb10d238c8.matter | 12 +-- .../rootnode_lightsensor_lZQycTFcJK.matter | 12 +-- ...rootnode_occupancysensor_iHyVgifZuo.matter | 12 +-- .../rootnode_onofflight_bbs1b7IaOV.matter | 12 +-- .../rootnode_onofflight_samplemei.matter | 12 +-- ...ootnode_onofflightswitch_FsPlMr090Q.matter | 12 +-- ...rootnode_onoffpluginunit_Wtf8ss5EBY.matter | 12 +-- .../rootnode_pressuresensor_s0qC9wLH4k.matter | 12 +-- .../devices/rootnode_pump_5f904818cc.matter | 12 +-- .../devices/rootnode_pump_a811bb33a0.matter | 12 +-- ...eraturecontrolledcabinet_ffdb696680.matter | 12 +-- ...ode_roboticvacuumcleaner_1807ff0c49.matter | 12 +-- ...tnode_roomairconditioner_9cf3607804.matter | 12 +-- .../rootnode_smokecoalarm_686fe0dcb8.matter | 12 +-- .../rootnode_speaker_RpzeXdimqA.matter | 12 +-- ...otnode_temperaturesensor_Qy1zkNW7c3.matter | 12 +-- .../rootnode_thermostat_bm3fb8dhYi.matter | 12 +-- ...otnode_waterleakdetector_0b067acfa3.matter | 12 +-- .../rootnode_windowcovering_RLCxaGi9Yx.matter | 12 +-- .../contact-sensor-app.matter | 12 +-- .../nxp/zap-lit/contact-sensor-app.matter | 12 +-- .../nxp/zap-sit/contact-sensor-app.matter | 12 +-- .../dishwasher-common/dishwasher-app.matter | 12 +-- .../energy-management-app.matter | 12 +-- .../fabric-bridge-app.matter | 24 ++---- .../nxp/zap/laundry-washer-app.matter | 12 +-- .../light-switch-app.matter | 12 +-- .../light-switch-app/qpg/zap/switch.matter | 12 +-- .../lighting-common/lighting-app.matter | 12 +-- .../data_model/lighting-app-ethernet.matter | 12 +-- .../data_model/lighting-app-thread.matter | 12 +-- .../data_model/lighting-app-wifi.matter | 12 +-- .../lighting-common/lighting-app.matter | 12 +-- .../nxp/zap/lighting-on-off.matter | 12 +-- examples/lighting-app/qpg/zap/light.matter | 12 +-- .../data_model/lighting-thread-app.matter | 12 +-- .../data_model/lighting-wifi-app.matter | 12 +-- .../lit-icd-common/lit-icd-server-app.matter | 12 +-- examples/lock-app/lock-common/lock-app.matter | 12 +-- examples/lock-app/nxp/zap/lock-app.matter | 12 +-- examples/lock-app/qpg/zap/lock.matter | 12 +-- .../log-source-common/log-source-app.matter | 12 +-- .../microwave-oven-app.matter | 12 +-- .../linux/include/CHIPProjectAppConfig.h | 3 + .../network-manager-app.matter | 15 ++-- .../network-manager-app.zap | 6 +- .../ota-provider-app.matter | 24 ++---- .../ota-requestor-app.matter | 12 +-- .../placeholder/linux/apps/app1/config.matter | 12 +-- .../placeholder/linux/apps/app2/config.matter | 12 +-- examples/pump-app/pump-common/pump-app.matter | 12 +-- .../silabs/data_model/pump-thread-app.matter | 12 +-- .../silabs/data_model/pump-wifi-app.matter | 12 +-- .../pump-controller-app.matter | 12 +-- .../refrigerator-app.matter | 12 +-- examples/rvc-app/rvc-common/rvc-app.matter | 12 +-- .../smoke-co-alarm-app.matter | 12 +-- .../temperature-measurement.matter | 12 +-- .../nxp/zap/thermostat_matter_thread.matter | 12 +-- .../nxp/zap/thermostat_matter_wifi.matter | 12 +-- .../qpg/zap/thermostaticRadiatorValve.matter | 12 +-- .../thermostat-common/thermostat.matter | 12 +-- .../thread-br-common/thread-br-app.matter | 12 +-- examples/tv-app/tv-common/tv-app.matter | 12 +-- .../tv-casting-common/tv-casting-app.matter | 12 +-- .../virtual-device-app.matter | 12 +-- examples/window-app/common/window-app.matter | 12 +-- .../all-clusters-app/app-templates/access.h | 5 +- .../lighting-app/app-templates/access.h | 5 +- .../access-control-server.cpp | 15 +--- .../chip/access-control-cluster.xml | 13 +--- .../data_model/controller-clusters.matter | 12 +-- .../chip/devicecontroller/ChipClusters.java | 20 ++++- .../devicecontroller/ChipEventStructs.java | 78 ++++--------------- .../devicecontroller/ClusterIDMapping.java | 3 +- .../devicecontroller/ClusterInfoMapping.java | 37 +++++++-- ...usterAccessRestrictionEntryChangedEvent.kt | 55 ------------- ...usterFabricRestrictionReviewUpdateEvent.kt | 41 +++++----- .../chip/devicecontroller/cluster/files.gni | 1 - .../cluster/clusters/AccessControlCluster.kt | 27 ++++++- ...usterAccessRestrictionEntryChangedEvent.kt | 55 ------------- ...usterFabricRestrictionReviewUpdateEvent.kt | 41 +++++----- .../java/matter/controller/cluster/files.gni | 1 - .../CHIPEventTLVValueDecoder.cpp | 66 ++++------------ .../python/chip/clusters/Objects.py | 31 ++------ .../CHIP/zap-generated/MTRBaseClusters.h | 2 +- .../CHIP/zap-generated/MTRBaseClusters.mm | 6 +- .../CHIP/zap-generated/MTRClusterConstants.h | 3 +- .../CHIP/zap-generated/MTRClusterNames.mm | 4 - .../CHIP/zap-generated/MTRClusters.h | 2 +- .../CHIP/zap-generated/MTRClusters.mm | 6 +- .../zap-generated/MTREventTLVValueDecoder.mm | 33 ++------ .../CHIP/zap-generated/MTRStructsObjc.h | 7 +- .../CHIP/zap-generated/MTRStructsObjc.mm | 33 +------- src/python_testing/TC_ACL_2_11.py | 11 +-- .../zap-generated/cluster-objects.cpp | 41 +--------- .../zap-generated/cluster-objects.h | 53 +++---------- .../app-common/zap-generated/ids/Events.h | 6 +- .../zap-generated/cluster/Commands.h | 7 +- .../cluster/logging/DataModelLogger.cpp | 25 +----- .../cluster/logging/DataModelLogger.h | 2 - .../zap-generated/cluster/Commands.h | 13 +++- 126 files changed, 585 insertions(+), 1291 deletions(-) delete mode 100644 src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessRestrictionEntryChangedEvent.kt delete mode 100644 src/controller/java/generated/java/matter/controller/cluster/eventstructs/AccessControlClusterAccessRestrictionEntryChangedEvent.kt 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-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 9769afdc262ba0..8debb1a4930f33 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. */ 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 9424fab0a17c1c..7c209b80465f18 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. */ diff --git a/examples/bridge-app/bridge-common/bridge-app.matter b/examples/bridge-app/bridge-common/bridge-app.matter index 1cc37299be6645..f1cdf949a70524 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. */ diff --git a/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/noip_rootnode_dimmablelight_bCwGYSDpoe.matter index 79dfef5be486d8..b837d4bbb6423a 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 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_airqualitysensor_e63187f6c9.matter b/examples/chef/devices/rootnode_airqualitysensor_e63187f6c9.matter index e155c0bb946563..ef127a4ba46cde 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 diff --git a/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter b/examples/chef/devices/rootnode_basicvideoplayer_0ff86e943b.matter index f76efbed02e901..60e29aeeb5f96b 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 diff --git a/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter b/examples/chef/devices/rootnode_colortemperaturelight_hbUnzYVeyn.matter index 0a591011e1aa1c..b09fc6ffc012ab 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 diff --git a/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter b/examples/chef/devices/rootnode_contactsensor_27f76aeaf5.matter index 830abb4079edae..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 diff --git a/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter b/examples/chef/devices/rootnode_contactsensor_lFAGG1bfRO.matter index eff62c6119120c..3e3a4eaa84963f 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 diff --git a/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter b/examples/chef/devices/rootnode_dimmablelight_bCwGYSDpoe.matter index 767012e788c629..4c659dcce73dee 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 diff --git a/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter b/examples/chef/devices/rootnode_dimmablepluginunit_f8a9a0b9d4.matter index b73b9867cce1c3..92b02371029b94 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 diff --git a/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter b/examples/chef/devices/rootnode_dishwasher_cc105034fe.matter index c8e41990993d27..07232aa02be8e1 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 diff --git a/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter b/examples/chef/devices/rootnode_doorlock_aNKYAreMXE.matter index 71f96dbdf077d3..2b27a22610f7b4 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 diff --git a/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter b/examples/chef/devices/rootnode_extendedcolorlight_8lcaaYJVAa.matter index 53984bbd0a934d..265dc262215921 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 diff --git a/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter b/examples/chef/devices/rootnode_fan_7N2TobIlOX.matter index 05a176ee9ab710..19e0d8a149ea9b 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 diff --git a/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter b/examples/chef/devices/rootnode_flowsensor_1zVxHedlaV.matter index 93eac702dcbc06..eb578e77f624d1 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 diff --git a/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter b/examples/chef/devices/rootnode_genericswitch_2dfff6e516.matter index 8748b8cd13b81f..9c8d9477b2c0ef 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 diff --git a/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter b/examples/chef/devices/rootnode_genericswitch_9866e35d0b.matter index 4c8e67c11e7726..a083afc80331bc 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 diff --git a/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter b/examples/chef/devices/rootnode_heatingcoolingunit_ncdGai1E5a.matter index 84b5d949b6eeba..84675efc397ef9 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 diff --git a/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter b/examples/chef/devices/rootnode_humiditysensor_Xyj4gda6Hb.matter index adc500a4771045..00f7af07eed1b9 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 diff --git a/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter b/examples/chef/devices/rootnode_laundrywasher_fb10d238c8.matter index 06e8ba84d349b6..42e7362bde656d 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 diff --git a/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter b/examples/chef/devices/rootnode_lightsensor_lZQycTFcJK.matter index be3a039189a5ed..902658e2ffd476 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 diff --git a/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter b/examples/chef/devices/rootnode_occupancysensor_iHyVgifZuo.matter index 9d7e22c21dc1ac..65a0c9cce398a4 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 diff --git a/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter b/examples/chef/devices/rootnode_onofflight_bbs1b7IaOV.matter index 9d4aa0c7362d22..6cbdac26fa5923 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 diff --git a/examples/chef/devices/rootnode_onofflight_samplemei.matter b/examples/chef/devices/rootnode_onofflight_samplemei.matter index 90131350b3ca47..35addbe1b2cac6 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 diff --git a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter index cffe70d9aab388..7c82c5b9b53516 100644 --- a/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter +++ b/examples/chef/devices/rootnode_onofflightswitch_FsPlMr090Q.matter @@ -651,14 +651,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 +681,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_onoffpluginunit_Wtf8ss5EBY.matter b/examples/chef/devices/rootnode_onoffpluginunit_Wtf8ss5EBY.matter index a5e0f5505dffd8..5fe0482fb1e137 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 diff --git a/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter b/examples/chef/devices/rootnode_pressuresensor_s0qC9wLH4k.matter index 2b9b4036e638f5..44ad0bfb504d30 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 diff --git a/examples/chef/devices/rootnode_pump_5f904818cc.matter b/examples/chef/devices/rootnode_pump_5f904818cc.matter index cf42feded0cee8..e8141a4d66db35 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 diff --git a/examples/chef/devices/rootnode_pump_a811bb33a0.matter b/examples/chef/devices/rootnode_pump_a811bb33a0.matter index 78ae33bc847e5d..bb889d64c319e1 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 diff --git a/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter b/examples/chef/devices/rootnode_refrigerator_temperaturecontrolledcabinet_temperaturecontrolledcabinet_ffdb696680.matter index 7d8c54a3f41c4c..13d8b98e93f7f0 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 diff --git a/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter b/examples/chef/devices/rootnode_roboticvacuumcleaner_1807ff0c49.matter index ae1989b2777122..2922ddca5d7ace 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 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_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..a4fe9d839c4a48 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 diff --git a/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter b/examples/chef/devices/rootnode_temperaturesensor_Qy1zkNW7c3.matter index b3178232de0291..60aacfe955c687 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 diff --git a/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter b/examples/chef/devices/rootnode_thermostat_bm3fb8dhYi.matter index 77e88549108fa8..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 diff --git a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter index e41e0b8b65d521..dec13bdf452e45 100644 --- a/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.matter +++ b/examples/chef/devices/rootnode_waterleakdetector_0b067acfa3.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_windowcovering_RLCxaGi9Yx.matter b/examples/chef/devices/rootnode_windowcovering_RLCxaGi9Yx.matter index f49ed5824d5ce4..a57c946cfa0f93 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 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 eb551dd395a9ae..60e67e4c4a7c46 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 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/dishwasher-app/dishwasher-common/dishwasher-app.matter b/examples/dishwasher-app/dishwasher-common/dishwasher-app.matter index 661a2e74de4f4e..0df498ea2952f4 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 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 c3401388bae96e..9b9bf1476e0f0e 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 diff --git a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter index 22f5ae6ccda3be..7df3c29b359f91 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter +++ b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter @@ -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; } /** The Access Control Cluster exposes a data model view of a @@ -538,14 +534,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; } @@ -572,7 +564,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/laundry-washer-app/nxp/zap/laundry-washer-app.matter b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter index 7ecbd20a6e9d0f..adc4fe3de8065e 100644 --- a/examples/laundry-washer-app/nxp/zap/laundry-washer-app.matter +++ b/examples/laundry-washer-app/nxp/zap/laundry-washer-app.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 diff --git a/examples/light-switch-app/light-switch-common/light-switch-app.matter b/examples/light-switch-app/light-switch-common/light-switch-app.matter index 3909b6073c8b9c..a18f0c9724cda2 100644 --- a/examples/light-switch-app/light-switch-common/light-switch-app.matter +++ b/examples/light-switch-app/light-switch-common/light-switch-app.matter @@ -629,14 +629,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; } @@ -663,7 +659,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/light-switch-app/qpg/zap/switch.matter b/examples/light-switch-app/qpg/zap/switch.matter index c93a50bb03e2dc..23033c78bffda8 100644 --- a/examples/light-switch-app/qpg/zap/switch.matter +++ b/examples/light-switch-app/qpg/zap/switch.matter @@ -754,14 +754,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; } @@ -788,7 +784,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/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter b/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter index 066d3d4729b12d..c19c7d7bf8e67a 100644 --- a/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter +++ b/examples/lighting-app-data-mode-no-unique-id/lighting-common/lighting-app.matter @@ -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 diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter index 9536120f9defb1..c51e6ee8ca0d7f 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-ethernet.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 diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter index 5a26a332b8e14d..33d68c727dba51 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-thread.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 diff --git a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter index 08172f4c3a4c42..78eed27958bc67 100644 --- a/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.matter +++ b/examples/lighting-app/bouffalolab/data_model/lighting-app-wifi.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 diff --git a/examples/lighting-app/lighting-common/lighting-app.matter b/examples/lighting-app/lighting-common/lighting-app.matter index 578fa85b4d3c1d..16e722d746b3d1 100644 --- a/examples/lighting-app/lighting-common/lighting-app.matter +++ b/examples/lighting-app/lighting-common/lighting-app.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 diff --git a/examples/lighting-app/nxp/zap/lighting-on-off.matter b/examples/lighting-app/nxp/zap/lighting-on-off.matter index 1f88cfb7687610..0bca04dad59429 100644 --- a/examples/lighting-app/nxp/zap/lighting-on-off.matter +++ b/examples/lighting-app/nxp/zap/lighting-on-off.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 diff --git a/examples/lighting-app/qpg/zap/light.matter b/examples/lighting-app/qpg/zap/light.matter index 8ce75010f66281..6509c9202d54b8 100644 --- a/examples/lighting-app/qpg/zap/light.matter +++ b/examples/lighting-app/qpg/zap/light.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 diff --git a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter b/examples/lighting-app/silabs/data_model/lighting-thread-app.matter index d77bd6403bd573..03373bfdda8668 100644 --- a/examples/lighting-app/silabs/data_model/lighting-thread-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-thread-app.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 diff --git a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter b/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter index 978f277cf1f91a..ae68bac12e3e61 100644 --- a/examples/lighting-app/silabs/data_model/lighting-wifi-app.matter +++ b/examples/lighting-app/silabs/data_model/lighting-wifi-app.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 diff --git a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter index e76ccb9372798d..6c5e4af56cbee4 100644 --- a/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter +++ b/examples/lit-icd-app/lit-icd-common/lit-icd-server-app.matter @@ -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/lock-app/lock-common/lock-app.matter b/examples/lock-app/lock-common/lock-app.matter index a925bf75f55255..2f2b9dd40850d8 100644 --- a/examples/lock-app/lock-common/lock-app.matter +++ b/examples/lock-app/lock-common/lock-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/lock-app/nxp/zap/lock-app.matter b/examples/lock-app/nxp/zap/lock-app.matter index cb2cbcc52f3263..347ad97fbe2946 100644 --- a/examples/lock-app/nxp/zap/lock-app.matter +++ b/examples/lock-app/nxp/zap/lock-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/lock-app/qpg/zap/lock.matter b/examples/lock-app/qpg/zap/lock.matter index ee7a955db20f4b..303b079b910cac 100644 --- a/examples/lock-app/qpg/zap/lock.matter +++ b/examples/lock-app/qpg/zap/lock.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/log-source-app/log-source-common/log-source-app.matter b/examples/log-source-app/log-source-common/log-source-app.matter index e9baa7757f53eb..18f096a55eddfb 100644 --- a/examples/log-source-app/log-source-common/log-source-app.matter +++ b/examples/log-source-app/log-source-common/log-source-app.matter @@ -326,14 +326,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; } @@ -360,7 +356,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 is used to manage global aspects of the Commissioning flow. */ diff --git a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter index cea8d411735738..0ac59afb131cd9 100644 --- a/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter +++ b/examples/microwave-oven-app/microwave-oven-common/microwave-oven-app.matter @@ -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/network-manager-app/linux/include/CHIPProjectAppConfig.h b/examples/network-manager-app/linux/include/CHIPProjectAppConfig.h index 1ef9862a272938..c5c31c345b72ec 100644 --- a/examples/network-manager-app/linux/include/CHIPProjectAppConfig.h +++ b/examples/network-manager-app/linux/include/CHIPProjectAppConfig.h @@ -21,5 +21,8 @@ #define CHIP_DEVICE_CONFIG_DEVICE_TYPE 144 // 0x0090 Network Infrastructure Manager #define CHIP_DEVICE_CONFIG_DEVICE_NAME "Network Infrastructure Manager" +// Sufficient space for ArlReviewEvent of several fabrics. +#define CHIP_DEVICE_CONFIG_EVENT_LOGGING_INFO_BUFFER_SIZE (32 * 1024) + // Inherit defaults from config/standalone/CHIPProjectConfig.h #include diff --git a/examples/network-manager-app/network-manager-common/network-manager-app.matter b/examples/network-manager-app/network-manager-common/network-manager-app.matter index 57118d365577f1..273b523ce5060f 100644 --- a/examples/network-manager-app/network-manager-common/network-manager-app.matter +++ b/examples/network-manager-app/network-manager-common/network-manager-app.matter @@ -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 @@ -1623,7 +1619,6 @@ endpoint 0 { server cluster AccessControl { emits event AccessControlEntryChanged; emits event AccessControlExtensionChanged; - emits event AccessRestrictionEntryChanged; emits event FabricRestrictionReviewUpdate; callback attribute acl; callback attribute extension; @@ -1635,7 +1630,7 @@ endpoint 0 { callback attribute generatedCommandList; callback attribute acceptedCommandList; callback attribute attributeList; - ram attribute featureMap default = 1; + ram attribute featureMap default = 3; callback attribute clusterRevision; handle command ReviewFabricRestrictions; diff --git a/examples/network-manager-app/network-manager-common/network-manager-app.zap b/examples/network-manager-app/network-manager-common/network-manager-app.zap index 240cd495a7fb4f..f471bb2d3b135b 100644 --- a/examples/network-manager-app/network-manager-common/network-manager-app.zap +++ b/examples/network-manager-app/network-manager-common/network-manager-app.zap @@ -503,7 +503,7 @@ "storageOption": "RAM", "singleton": 0, "bounded": 0, - "defaultValue": "1", + "defaultValue": "3", "reportable": 1, "minInterval": 1, "maxInterval": 65534, @@ -2393,7 +2393,7 @@ "mfgCode": null, "source": "client", "isIncoming": 1, - "isEnabled": 1 + "isEnabled": 0 } ], "attributes": [ @@ -3886,4 +3886,4 @@ "parentEndpointIdentifier": null } ] -} \ No newline at end of file +} diff --git a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter index a066629c9f4ae1..5958192ce981e1 100644 --- a/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter +++ b/examples/ota-provider-app/ota-provider-common/ota-provider-app.matter @@ -359,14 +359,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; } @@ -393,7 +389,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 @@ -488,14 +484,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; } @@ -522,7 +514,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/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter index 3412f30a29b1f9..c61a4908d01f1f 100644 --- a/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter +++ b/examples/ota-requestor-app/ota-requestor-common/ota-requestor-app.matter @@ -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/placeholder/linux/apps/app1/config.matter b/examples/placeholder/linux/apps/app1/config.matter index 96c3b7220841be..bf5e6d6b75af16 100644 --- a/examples/placeholder/linux/apps/app1/config.matter +++ b/examples/placeholder/linux/apps/app1/config.matter @@ -930,14 +930,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; } @@ -964,7 +960,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. */ diff --git a/examples/placeholder/linux/apps/app2/config.matter b/examples/placeholder/linux/apps/app2/config.matter index facd9c94e4547e..26651684750454 100644 --- a/examples/placeholder/linux/apps/app2/config.matter +++ b/examples/placeholder/linux/apps/app2/config.matter @@ -930,14 +930,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; } @@ -964,7 +960,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. */ diff --git a/examples/pump-app/pump-common/pump-app.matter b/examples/pump-app/pump-common/pump-app.matter index a356b78b628cc1..7031fc2ecf3d26 100644 --- a/examples/pump-app/pump-common/pump-app.matter +++ b/examples/pump-app/pump-common/pump-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; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both diff --git a/examples/pump-app/silabs/data_model/pump-thread-app.matter b/examples/pump-app/silabs/data_model/pump-thread-app.matter index f88f26870c0224..7dca9cc390c4af 100644 --- a/examples/pump-app/silabs/data_model/pump-thread-app.matter +++ b/examples/pump-app/silabs/data_model/pump-thread-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; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both diff --git a/examples/pump-app/silabs/data_model/pump-wifi-app.matter b/examples/pump-app/silabs/data_model/pump-wifi-app.matter index f88f26870c0224..7dca9cc390c4af 100644 --- a/examples/pump-app/silabs/data_model/pump-wifi-app.matter +++ b/examples/pump-app/silabs/data_model/pump-wifi-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; } /** This cluster provides attributes and events for determining basic information about Nodes, which supports both diff --git a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter index 7365654ce9c65b..0207abc4600cef 100644 --- a/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter +++ b/examples/pump-controller-app/pump-controller-common/pump-controller-app.matter @@ -502,14 +502,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; } @@ -536,7 +532,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/refrigerator-app/refrigerator-common/refrigerator-app.matter b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter index f028a3b31557c5..892012082c0d71 100644 --- a/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter +++ b/examples/refrigerator-app/refrigerator-common/refrigerator-app.matter @@ -359,14 +359,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; } @@ -393,7 +389,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/rvc-app/rvc-common/rvc-app.matter b/examples/rvc-app/rvc-common/rvc-app.matter index 4c0ebdf1acc682..974c0dc73a689c 100644 --- a/examples/rvc-app/rvc-common/rvc-app.matter +++ b/examples/rvc-app/rvc-common/rvc-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/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter index 21d1cebf065fb4..1af9ccc34b0422 100644 --- a/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter +++ b/examples/smoke-co-alarm-app/smoke-co-alarm-common/smoke-co-alarm-app.matter @@ -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/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter index 4ebc3dc672d48f..cf4d7159fdbf52 100644 --- a/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter +++ b/examples/temperature-measurement-app/temperature-measurement-common/temperature-measurement.matter @@ -359,14 +359,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; } @@ -393,7 +389,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/thermostat/nxp/zap/thermostat_matter_thread.matter b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter index cbe6a6280d8ec4..179a2c5bf19a90 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_thread.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_thread.matter @@ -557,14 +557,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; } @@ -591,7 +587,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/thermostat/nxp/zap/thermostat_matter_wifi.matter b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter index cd9ddc362e36ce..820bd331ad6a6d 100644 --- a/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter +++ b/examples/thermostat/nxp/zap/thermostat_matter_wifi.matter @@ -557,14 +557,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; } @@ -591,7 +587,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/thermostat/qpg/zap/thermostaticRadiatorValve.matter b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter index 548db02c520b9a..d88d6ec1feee1a 100644 --- a/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter +++ b/examples/thermostat/qpg/zap/thermostaticRadiatorValve.matter @@ -557,14 +557,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; } @@ -591,7 +587,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/thermostat/thermostat-common/thermostat.matter b/examples/thermostat/thermostat-common/thermostat.matter index a66c2dfdad68ba..6feefe3bba1c14 100644 --- a/examples/thermostat/thermostat-common/thermostat.matter +++ b/examples/thermostat/thermostat-common/thermostat.matter @@ -557,14 +557,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; } @@ -591,7 +587,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/thread-br-app/thread-br-common/thread-br-app.matter b/examples/thread-br-app/thread-br-common/thread-br-app.matter index 1b043a7cdde916..9498dee8be25d3 100644 --- a/examples/thread-br-app/thread-br-common/thread-br-app.matter +++ b/examples/thread-br-app/thread-br-common/thread-br-app.matter @@ -359,14 +359,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; } @@ -393,7 +389,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/tv-app/tv-common/tv-app.matter b/examples/tv-app/tv-common/tv-app.matter index f2a2a6f0affb0f..bd2f29d653067b 100644 --- a/examples/tv-app/tv-common/tv-app.matter +++ b/examples/tv-app/tv-common/tv-app.matter @@ -598,14 +598,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; } @@ -632,7 +628,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/tv-casting-app/tv-casting-common/tv-casting-app.matter b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter index 196e59a9edc720..3e4fe7fa47bc06 100644 --- a/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter +++ b/examples/tv-casting-app/tv-casting-common/tv-casting-app.matter @@ -758,14 +758,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; } @@ -792,7 +788,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/virtual-device-app/virtual-device-common/virtual-device-app.matter b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter index 3c20256117f2cb..07baa25e19ebc3 100644 --- a/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter +++ b/examples/virtual-device-app/virtual-device-common/virtual-device-app.matter @@ -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 diff --git a/examples/window-app/common/window-app.matter b/examples/window-app/common/window-app.matter index f31a1917a5fd0e..61a8208e0cb4bf 100644 --- a/examples/window-app/common/window-app.matter +++ b/examples/window-app/common/window-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 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/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/src/app/clusters/access-control-server/access-control-server.cpp b/src/app/clusters/access-control-server/access-control-server.cpp index 295b5535df2f95..d525e555f282e6 100644 --- a/src/app/clusters/access-control-server/access-control-server.cpp +++ b/src/app/clusters/access-control-server/access-control-server.cpp @@ -88,7 +88,7 @@ class AccessControlAttribute : public AttributeAccessInterface, void MarkRestrictionListChanged(FabricIndex fabricIndex) override; void OnFabricRestrictionReviewUpdate(FabricIndex fabricIndex, uint64_t token, Optional instruction, - Optional redirectUrl) override; + Optional arlRequestFlowUrl) override; #endif private: @@ -517,20 +517,13 @@ void AccessControlAttribute::MarkRestrictionListChanged(FabricIndex fabricIndex) } void AccessControlAttribute::OnFabricRestrictionReviewUpdate(FabricIndex fabricIndex, uint64_t token, - Optional instruction, Optional redirectUrl) + Optional instruction, Optional arlRequestFlowUrl) { CHIP_ERROR err; ArlReviewEvent event{ .token = token, .fabricIndex = fabricIndex }; - if (instruction.HasValue()) - { - event.instruction.SetNonNull(instruction.Value()); - } - - if (redirectUrl.HasValue()) - { - event.redirectURL.SetNonNull(redirectUrl.Value()); - } + event.instruction = instruction; + event.ARLRequestFlowUrl = arlRequestFlowUrl; EventNumber eventNumber; SuccessOrExit(err = LogEvent(event, kRootEndpointId, eventNumber)); 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/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index cbe81c4d2e6a04..eac83d868cb375 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. */ diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index 9001413960dff3..ae900222e92943 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); } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java index 916493fc2b60c3..179b6e396638f9 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); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java index e0099ccf4c87dc..8ae6ae6fa0dac5 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; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index 55659d8463581d..b65ff7bcb7f175 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 @@ -23368,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); diff --git a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessRestrictionEntryChangedEvent.kt b/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessRestrictionEntryChangedEvent.kt deleted file mode 100644 index 56d9b39e1a005e..00000000000000 --- a/src/controller/java/generated/java/chip/devicecontroller/cluster/eventstructs/AccessControlClusterAccessRestrictionEntryChangedEvent.kt +++ /dev/null @@ -1,55 +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. - */ -package chip.devicecontroller.cluster.eventstructs - -import chip.devicecontroller.cluster.* -import matter.tlv.ContextSpecificTag -import matter.tlv.Tag -import matter.tlv.TlvReader -import matter.tlv.TlvWriter - -class AccessControlClusterAccessRestrictionEntryChangedEvent(val fabricIndex: UInt) { - override fun toString(): String = buildString { - append("AccessControlClusterAccessRestrictionEntryChangedEvent {\n") - append("\tfabricIndex : $fabricIndex\n") - append("}\n") - } - - fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { - tlvWriter.apply { - startStructure(tlvTag) - put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) - endStructure() - } - } - - companion object { - private const val TAG_FABRIC_INDEX = 254 - - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): AccessControlClusterAccessRestrictionEntryChangedEvent { - tlvReader.enterStructure(tlvTag) - val fabricIndex = tlvReader.getUInt(ContextSpecificTag(TAG_FABRIC_INDEX)) - - tlvReader.exitContainer() - - return AccessControlClusterAccessRestrictionEntryChangedEvent(fabricIndex) - } - } -} 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/files.gni b/src/controller/java/generated/java/chip/devicecontroller/cluster/files.gni index 3642d238e664f7..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", 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/eventstructs/AccessControlClusterAccessRestrictionEntryChangedEvent.kt b/src/controller/java/generated/java/matter/controller/cluster/eventstructs/AccessControlClusterAccessRestrictionEntryChangedEvent.kt deleted file mode 100644 index 8a272f8854ae12..00000000000000 --- a/src/controller/java/generated/java/matter/controller/cluster/eventstructs/AccessControlClusterAccessRestrictionEntryChangedEvent.kt +++ /dev/null @@ -1,55 +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. - */ -package matter.controller.cluster.eventstructs - -import matter.controller.cluster.* -import matter.tlv.ContextSpecificTag -import matter.tlv.Tag -import matter.tlv.TlvReader -import matter.tlv.TlvWriter - -class AccessControlClusterAccessRestrictionEntryChangedEvent(val fabricIndex: UByte) { - override fun toString(): String = buildString { - append("AccessControlClusterAccessRestrictionEntryChangedEvent {\n") - append("\tfabricIndex : $fabricIndex\n") - append("}\n") - } - - fun toTlv(tlvTag: Tag, tlvWriter: TlvWriter) { - tlvWriter.apply { - startStructure(tlvTag) - put(ContextSpecificTag(TAG_FABRIC_INDEX), fabricIndex) - endStructure() - } - } - - companion object { - private const val TAG_FABRIC_INDEX = 254 - - fun fromTlv( - tlvTag: Tag, - tlvReader: TlvReader, - ): AccessControlClusterAccessRestrictionEntryChangedEvent { - tlvReader.enterStructure(tlvTag) - val fabricIndex = tlvReader.getUByte(ContextSpecificTag(TAG_FABRIC_INDEX)) - - tlvReader.exitContainer() - - return AccessControlClusterAccessRestrictionEntryChangedEvent(fabricIndex) - } - } -} 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/files.gni b/src/controller/java/generated/java/matter/controller/cluster/files.gni index 90d1e060b724c3..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", diff --git a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index e695cd1dc794a2..d9bf294c0f8486 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; } diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 482fe33f61c2c1..688b4d6d4d4d08 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 diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.h index 9360e68c590fcd..60c65ac382561d 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)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRBaseClusters.mm index 696d1f8058b3ed..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]; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h index 1ffa3ecc58db7a..3ab34174b53453 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterConstants.h @@ -7143,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 diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm index 69ec92c0e5217a..f5beab931c57fa 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRClusterNames.mm @@ -9515,10 +9515,6 @@ result = @"AccessControlExtensionChanged"; break; - case MTREventIDTypeClusterAccessControlEventAccessRestrictionEntryChangedID: - result = @"AccessRestrictionEntryChanged"; - break; - case MTREventIDTypeClusterAccessControlEventFabricRestrictionReviewUpdateID: result = @"FabricRestrictionReviewUpdate"; break; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.h index a717868edf09fc..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)); diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm b/src/darwin/Framework/CHIP/zap-generated/MTRClusters.mm index 6f6db16eb72210..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]; } diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index 99f43ea97f0360..85dcba3510205e 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; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h index 93632e8935cbc6..b0dcf5afb48858 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 diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm index 917332e40cff8f..2d5a3835a98f4b 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; } diff --git a/src/python_testing/TC_ACL_2_11.py b/src/python_testing/TC_ACL_2_11.py index a9f63b22d5c798..ce8034a82f5f74 100644 --- a/src/python_testing/TC_ACL_2_11.py +++ b/src/python_testing/TC_ACL_2_11.py @@ -173,19 +173,10 @@ async def test_TC_ACL_2_11(self): 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=(1, 5), keepSubscriptions=True, autoResubscribe=False) + 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 - # Belongs to step 7, but needs to be subscribed before executing step 5: begin - arec_queue = queue.Queue() - arec_cb = EventChangeCallback(Clusters.AccessControl.Events.AccessRestrictionEntryChanged, arec_queue) - - urgent = 1 - subscription_arec = await dev_ctrl.ReadEvent(dut_node_id, events=[(0, Clusters.AccessControl.Events.AccessRestrictionEntryChanged, urgent)], reportInterval=(1, 5), keepSubscriptions=True, autoResubscribe=False) - subscription_arec.SetEventUpdateCallback(callback=arec_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)]) 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 354eb75feb77de..e75804a86709e2 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)) { 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 e96a078ea28f58..b2fc8fb5a43f63 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); 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 01caeeadee4188..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 diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 5e6f77d66bde82..1c6f6af5db03ff 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 | \*----------------------------------------------------------------------------*/ /* @@ -16285,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), // @@ -16294,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), // }; 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 b61e6e9bae9232..f8946b7327fabd 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; } } @@ -20270,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)); 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 c2b9cfbe337afd..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, 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 7fdfb6f9689c01..85632c6b4c8520 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); From 17b1a38e909e7874593bcb87c31be03a5866f1d4 Mon Sep 17 00:00:00 2001 From: C Freeman Date: Wed, 4 Sep 2024 21:22:32 -0400 Subject: [PATCH 30/35] MACL: Add checks that ARL / CommissioningARL are populated or not populated as required by the test (#35413) * Add check for unpopulated ARLs * linter * Add check to TC-ACL-2.11 for populated ARLs --- src/python_testing/TC_ACL_2_11.py | 11 +++- src/python_testing/TestConformanceTest.py | 50 ++++++++++++++++++- .../basic_composition_support.py | 24 +++++++++ 3 files changed, 83 insertions(+), 2 deletions(-) diff --git a/src/python_testing/TC_ACL_2_11.py b/src/python_testing/TC_ACL_2_11.py index ce8034a82f5f74..a580cc2575017e 100644 --- a/src/python_testing/TC_ACL_2_11.py +++ b/src/python_testing/TC_ACL_2_11.py @@ -31,6 +31,7 @@ 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 @@ -82,7 +83,7 @@ def desc_TC_ACL_2_11(self) -> str: def steps_TC_ACL_2_11(self) -> list[TestStep]: steps = [ - TestStep(1, "Commissioning, already done"), + 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.", @@ -102,6 +103,14 @@ 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, [()])) + has_arl, has_carl = arls_populated(wildcard_read.tlvAttributes) + asserts.assert_true( + has_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( + has_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, diff --git a/src/python_testing/TestConformanceTest.py b/src/python_testing/TestConformanceTest.py index 5af8d1f639ef0c..12ecb25fef6f0c 100644 --- a/src/python_testing/TestConformanceTest.py +++ b/src/python_testing/TestConformanceTest.py @@ -18,6 +18,7 @@ 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 @@ -191,7 +192,7 @@ def _create_minimal_dt(self, device_type_id: int) -> dict[int, dict[int, Any]]: endpoint_tlv[Clusters.Descriptor.id] = attrs return endpoint_tlv - def add_macl(self, root_endpoint: dict[int, dict[int, Any]]): + 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] = [] @@ -202,6 +203,14 @@ def add_macl(self, root_endpoint: dict[int, dict[int, Any]]): 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') @@ -231,6 +240,45 @@ async def test_macl_handling(self): # 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 + have_arl, have_carl = arls_populated(self.endpoints_tlv) + asserts.assert_false(have_arl, "Unexpected ARL found") + asserts.assert_false(have_carl, "Unexpected CommissioningARL found") + + # device with unpopulated macl + self.add_macl(root) + have_arl, have_carl = arls_populated(self.endpoints_tlv) + asserts.assert_false(have_arl, "Unexpected ARL found") + asserts.assert_false(have_carl, "Unexpected CommissioningARL found") + + # device with populated ARL + self.add_macl(root, populate_arl=True) + have_arl, have_carl = arls_populated(self.endpoints_tlv) + asserts.assert_true(have_arl, "Did not find expected ARL") + asserts.assert_false(have_carl, "Unexpected CommissioningARL found") + + # device with populated commissioning ARL + self.add_macl(root, populate_commissioning_arl=True) + have_arl, have_carl = arls_populated(self.endpoints_tlv) + asserts.assert_false(have_arl, "Unexpected ARL found") + asserts.assert_true(have_carl, "Did not find expected Commissioning ARL") + + # device with both + self.add_macl(root, populate_arl=True, populate_commissioning_arl=True) + have_arl, have_carl = arls_populated(self.endpoints_tlv) + asserts.assert_true(have_arl, "Did not find expected ARL") + asserts.assert_true(have_carl, "Did not find expected Commissioning ARL") + 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 5401b1fad04f9d..781007cdbdf685 100644 --- a/src/python_testing/basic_composition_support.py +++ b/src/python_testing/basic_composition_support.py @@ -26,12 +26,30 @@ 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 +def arls_populated(tlv_data: dict[int, Any]) -> tuple[bool, bool]: + """ 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 (False, 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 (False, 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 (have_arl, 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.""" @@ -169,6 +187,12 @@ async def setup_class_helper(self, allow_pase: bool = True): logging.info("Start of actual tests") logging.info("###########################################################") + have_arl, have_carl = arls_populated(self.endpoints_tlv) + asserts.assert_false( + 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( + 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 From e78a1862e61d407e15b4650319b70ee22016b606 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky Date: Wed, 4 Sep 2024 21:31:55 -0400 Subject: [PATCH 31/35] Fix intermittent falure in Darwin browsing test. (#35421) We are running the test against Matter applications that are starting up, and during startup we do some silly unregistering/re-registering of DNS-SD advertisements. The test was counting all the registrations, not subtracting the un-registrations, and asserting that the resulting count was not too high. But sometimes it is, if we get a "unregister/re-register" pair in there. The fix: 1) Fixes the test to better track un-registration bits. 2) Fixes the OnBleScanRemove code to call the right delegate method. 3) Fixes OnBrowseRemove to not call the delegate if we have not notified about the add for the relevant result. We could have just worked around this in the test, but notifying "removed" about an object with all fields set to nil just doesn't make much sense. --- .../CHIP/MTRCommissionableBrowser.mm | 13 +++-- .../CHIPTests/MTRCommissionableBrowserTests.m | 52 ++++++++++++++++--- 2 files changed, 55 insertions(+), 10 deletions(-) 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/CHIPTests/MTRCommissionableBrowserTests.m b/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m index 31ca37ffd4bc94..185f4981cff405 100644 --- a/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m +++ b/src/darwin/Framework/CHIPTests/MTRCommissionableBrowserTests.m @@ -36,9 +36,27 @@ // 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; @@ -52,8 +70,9 @@ - (instancetype)initWithExpectation:(XCTestExpectation *)expectation return nil; } - _resultsCount = 0; _expectation = expectation; + _results = [[NSMutableArray alloc] init]; + _removedResults = [[NSMutableArray alloc] init]; return self; } @@ -63,8 +82,9 @@ - (instancetype)init return nil; } - _resultsCount = 0; _expectation = nil; + _results = [[NSMutableArray alloc] init]; + _removedResults = [[NSMutableArray alloc] init]; return self; } @@ -77,12 +97,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; @@ -108,6 +142,12 @@ - (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 From 1df53d8ba87dcce4698e831c3e6ac9673a94eb7a Mon Sep 17 00:00:00 2001 From: Yufeng Wang Date: Wed, 4 Sep 2024 21:08:59 -0700 Subject: [PATCH 32/35] Update the FS XML definations to algin with spec update (#35381) --- .../device_manager/DeviceManager.cpp | 4 +-- .../fabric-bridge-app.matter | 14 ++++---- .../linux/CommissionerControl.cpp | 4 +-- .../commissioner-control-server.cpp | 8 ++--- .../chip/bridged-device-basic-information.xml | 2 +- .../chip/commissioner-control-cluster.xml | 16 ++++----- .../data_model/controller-clusters.matter | 14 ++++---- .../chip/devicecontroller/ChipClusters.java | 36 +++++++++---------- .../devicecontroller/ChipEventStructs.java | 36 +++++++++---------- .../devicecontroller/ClusterIDMapping.java | 4 +-- .../devicecontroller/ClusterInfoMapping.java | 24 ++++++------- ...lClusterCommissioningRequestResultEvent.kt | 20 +++++------ .../clusters/CommissionerControlCluster.kt | 16 ++++----- ...lClusterCommissioningRequestResultEvent.kt | 20 +++++------ .../CHIPEventTLVValueDecoder.cpp | 26 +++++++------- .../python/chip/clusters/CHIPClusters.py | 8 ++--- .../python/chip/clusters/Objects.py | 24 ++++++------- .../zap-generated/MTRCommandPayloadsObjc.h | 8 ++--- .../zap-generated/MTRCommandPayloadsObjc.mm | 28 +++++++-------- .../zap-generated/MTREventTLVValueDecoder.mm | 8 ++--- .../CHIP/zap-generated/MTRStructsObjc.h | 4 +-- .../CHIP/zap-generated/MTRStructsObjc.mm | 10 +++--- .../zap-generated/cluster-objects.cpp | 36 +++++++++---------- .../zap-generated/cluster-objects.h | 36 +++++++++---------- .../zap-generated/cluster/Commands.h | 8 ++--- .../cluster/logging/DataModelLogger.cpp | 8 ++--- .../zap-generated/cluster/Commands.h | 16 ++++----- 27 files changed, 219 insertions(+), 219 deletions(-) diff --git a/examples/fabric-admin/device_manager/DeviceManager.cpp b/examples/fabric-admin/device_manager/DeviceManager.cpp index 54c4bd8d45debf..d8de362255dd81 100644 --- a/examples/fabric-admin/device_manager/DeviceManager.cpp +++ b/examples/fabric-admin/device_manager/DeviceManager.cpp @@ -282,7 +282,7 @@ void DeviceManager::HandleCommissioningRequestResult(TLV::TLVReader & data) return; } - if (value.requestId != mRequestId) + if (value.requestID != mRequestId) { ChipLogError(NotSpecified, "The RequestId does not match the RequestId provided to RequestCommissioningApproval"); return; @@ -296,7 +296,7 @@ void DeviceManager::HandleCommissioningRequestResult(TLV::TLVReader & data) // The server is ready to begin commissioning the requested device, request the Commissioner Control Server to begin // commissioning a previously approved request. - SendCommissionNodeRequest(value.requestId, kResponseTimeoutSeconds); + SendCommissionNodeRequest(value.requestID, kResponseTimeoutSeconds); } void DeviceManager::HandleAttributePartsListUpdate(chip::TLV::TLVReader & data) diff --git a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter index 7df3c29b359f91..0b4cb214b5f3be 100644 --- a/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter +++ b/examples/fabric-bridge-app/fabric-bridge-common/fabric-bridge-app.matter @@ -1698,9 +1698,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; } @@ -1713,14 +1713,14 @@ 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; } diff --git a/examples/fabric-bridge-app/linux/CommissionerControl.cpp b/examples/fabric-bridge-app/linux/CommissionerControl.cpp index 96984d50696474..e9dded102bcac1 100644 --- a/examples/fabric-bridge-app/linux/CommissionerControl.cpp +++ b/examples/fabric-bridge-app/linux/CommissionerControl.cpp @@ -79,8 +79,8 @@ CHIP_ERROR CommissionerControlDelegate::HandleCommissioningApprovalRequest(const VerifyOrReturnError(mNextStep == Step::kIdle, CHIP_ERROR_INCORRECT_STATE); CommissionerControl::Events::CommissioningRequestResult::Type result; - result.requestId = request.requestId; - result.clientNodeId = request.clientNodeId; + result.requestID = request.requestId; + result.clientNodeID = request.clientNodeId; result.fabricIndex = request.fabricIndex; result.statusCode = static_cast(Protocols::InteractionModel::Status::Success); 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 80d65b2c4d16fc..d6282f287a1181 100644 --- a/src/app/clusters/commissioner-control-server/commissioner-control-server.cpp +++ b/src/app/clusters/commissioner-control-server/commissioner-control-server.cpp @@ -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,7 +232,7 @@ bool emberAfCommissionerControlClusterCommissionNodeCallback( return true; } - auto requestId = commandData.requestId; + auto requestId = commandData.requestID; auto commissioningWindowParams = std::make_unique(); 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 ef2629c3574701..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 @@ -111,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/commissioner-control-cluster.xml b/src/app/zap-templates/zcl/data-model/chip/commissioner-control-cluster.xml index af9a734d6e7176..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,21 +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. @@ -64,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/controller/data_model/controller-clusters.matter b/src/controller/data_model/controller-clusters.matter index eac83d868cb375..ea7ab01b39d2dd 100644 --- a/src/controller/data_model/controller-clusters.matter +++ b/src/controller/data_model/controller-clusters.matter @@ -9422,9 +9422,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,14 +9437,14 @@ 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; } diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java index ae900222e92943..ce3d602f1f89b6 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipClusters.java @@ -61069,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()); @@ -61101,17 +61101,17 @@ public void onResponse(StructType invokeStructValue) { }}, commandId, commandArgs, timedInvokeTimeoutMs); } - public void commissionNode(ReverseOpenCommissioningWindowCallback callback, Long requestId, Integer responseTimeoutSeconds) { - commissionNode(callback, requestId, responseTimeoutSeconds, 0); + public void commissionNode(ReverseOpenCommissioningWindowCallback callback, Long requestID, Integer responseTimeoutSeconds) { + commissionNode(callback, requestID, responseTimeoutSeconds, 0); } - public void commissionNode(ReverseOpenCommissioningWindowCallback callback, Long requestId, Integer responseTimeoutSeconds, 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); diff --git a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java index 179b6e396638f9..737462f3da184d 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ChipEventStructs.java @@ -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 8ae6ae6fa0dac5..950e6070dff2c0 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterIDMapping.java @@ -17406,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; @@ -17423,7 +17423,7 @@ public static RequestCommissioningApprovalCommandField value(int id) throws NoSu } throw new NoSuchFieldError(); } - }public enum CommissionNodeCommandField {RequestId(0),ResponseTimeoutSeconds(1),; + }public enum CommissionNodeCommandField {RequestID(0),ResponseTimeoutSeconds(1),; private final int id; CommissionNodeCommandField(int id) { this.id = id; diff --git a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java index b65ff7bcb7f175..6e009e3ae63c5a 100644 --- a/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java +++ b/src/controller/java/generated/java/chip/devicecontroller/ClusterInfoMapping.java @@ -29032,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); @@ -29048,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") ); @@ -29064,8 +29064,8 @@ 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); @@ -29074,7 +29074,7 @@ public Map> getCommandMap() { ((ChipClusters.CommissionerControlCluster) cluster) .commissionNode((ChipClusters.CommissionerControlCluster.ReverseOpenCommissioningWindowCallback) callback , (Long) - commandArguments.get("requestId") + commandArguments.get("requestID") , (Integer) commandArguments.get("responseTimeoutSeconds") 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/matter/controller/cluster/clusters/CommissionerControlCluster.kt b/src/controller/java/generated/java/matter/controller/cluster/clusters/CommissionerControlCluster.kt index 3e9d07f3f04354..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,7 +128,7 @@ class CommissionerControlCluster( } suspend fun commissionNode( - requestId: ULong, + requestID: ULong, responseTimeoutSeconds: UShort, timedInvokeTimeout: Duration? = null, ): ReverseOpenCommissioningWindow { @@ -138,7 +138,7 @@ 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) 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/zap-generated/CHIPEventTLVValueDecoder.cpp b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp index d9bf294c0f8486..a133eceb499a0f 100644 --- a/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp +++ b/src/controller/java/zap-generated/CHIPEventTLVValueDecoder.cpp @@ -8299,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"; @@ -8352,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/chip/clusters/CHIPClusters.py b/src/controller/python/chip/clusters/CHIPClusters.py index a26555e58dd517..268dd1abfb574c 100644 --- a/src/controller/python/chip/clusters/CHIPClusters.py +++ b/src/controller/python/chip/clusters/CHIPClusters.py @@ -13377,9 +13377,9 @@ class ChipClusters: "commandId": 0x00000000, "commandName": "RequestCommissioningApproval", "args": { - "requestId": "int", - "vendorId": "int", - "productId": "int", + "requestID": "int", + "vendorID": "int", + "productID": "int", "label": "str", }, }, @@ -13387,7 +13387,7 @@ class ChipClusters: "commandId": 0x00000001, "commandName": "CommissionNode", "args": { - "requestId": "int", + "requestID": "int", "responseTimeoutSeconds": "int", }, }, diff --git a/src/controller/python/chip/clusters/Objects.py b/src/controller/python/chip/clusters/Objects.py index 688b4d6d4d4d08..b408fb5fd57e71 100644 --- a/src/controller/python/chip/clusters/Objects.py +++ b/src/controller/python/chip/clusters/Objects.py @@ -47434,15 +47434,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 @@ -47456,11 +47456,11 @@ 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), ]) - requestId: 'uint' = 0 + requestID: 'uint' = 0 responseTimeoutSeconds: 'uint' = 0 @dataclass @@ -47615,14 +47615,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 diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h index 044b0116ff4778..05bcb8213b6df9 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.h @@ -10894,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; /** @@ -10930,7 +10930,7 @@ 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; /** diff --git a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm index d24ce54fc84028..87aacfd377eb82 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRCommandPayloadsObjc.mm @@ -31480,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; @@ -31497,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; @@ -31509,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; } @@ -31522,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) { @@ -31580,7 +31580,7 @@ - (instancetype)init { if (self = [super init]) { - _requestId = @(0); + _requestID = @(0); _responseTimeoutSeconds = @(0); _timedInvokeTimeoutMs = nil; @@ -31593,7 +31593,7 @@ - (id)copyWithZone:(NSZone * _Nullable)zone; { auto other = [[MTRCommissionerControlClusterCommissionNodeParams alloc] init]; - other.requestId = self.requestId; + other.requestID = self.requestID; other.responseTimeoutSeconds = self.responseTimeoutSeconds; 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:%@; >", NSStringFromClass([self class]), _requestId, _responseTimeoutSeconds]; + NSString * descriptionString = [NSString stringWithFormat:@"<%@: requestID:%@; responseTimeoutSeconds:%@; >", NSStringFromClass([self class]), _requestID, _responseTimeoutSeconds]; return descriptionString; } @@ -31616,7 +31616,7 @@ - (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; diff --git a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm index 85dcba3510205e..6ecc072f6b44a6 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTREventTLVValueDecoder.mm @@ -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 b0dcf5afb48858..61aa5161dced29 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.h @@ -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 2d5a3835a98f4b..5cb5806c112a69 100644 --- a/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm +++ b/src/darwin/Framework/CHIP/zap-generated/MTRStructsObjc.mm @@ -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/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp b/zzz_generated/app-common/app-common/zap-generated/cluster-objects.cpp index e75804a86709e2..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 @@ -28887,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(); } @@ -28908,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)) { @@ -28936,7 +28936,7 @@ 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); return encoder.Finalize(); } @@ -28955,9 +28955,9 @@ CHIP_ERROR DecodableType::Decode(TLV::TLVReader & reader) CHIP_ERROR err = CHIP_NO_ERROR; const uint8_t __context_tag = std::get(__element); - if (__context_tag == to_underlying(Fields::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)) { @@ -29058,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); @@ -29079,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)) { 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 b2fc8fb5a43f63..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 @@ -41938,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, }; @@ -41951,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; @@ -41969,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); }; @@ -41979,7 +41979,7 @@ struct DecodableType namespace CommissionNode { enum class Fields : uint8_t { - kRequestId = 0, + kRequestID = 0, kResponseTimeoutSeconds = 1, }; @@ -41990,7 +41990,7 @@ 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); CHIP_ERROR Encode(TLV::TLVWriter & aWriter, TLV::Tag aTag) const; @@ -42006,7 +42006,7 @@ 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); CHIP_ERROR Decode(TLV::TLVReader & reader); }; @@ -42133,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, }; @@ -42147,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); @@ -42164,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); diff --git a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h index 1c6f6af5db03ff..c01a3135dc46bd 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/chip-tool/zap-generated/cluster/Commands.h @@ -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,7 +13883,7 @@ 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); ClusterCommand::AddArguments(); } 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 f8946b7327fabd..2d788bd2613215 100644 --- a/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp +++ b/zzz_generated/chip-tool/zap-generated/cluster/logging/DataModelLogger.cpp @@ -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; } } 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 85632c6b4c8520..0f3dc4f7991331 100644 --- a/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h +++ b/zzz_generated/darwin-framework-tool/zap-generated/cluster/Commands.h @@ -164678,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); @@ -164704,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()) { @@ -164753,7 +164753,7 @@ 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); @@ -164773,7 +164773,7 @@ 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]; From 3660c0d13e54a07abacd74b71ba0b8f5e804f219 Mon Sep 17 00:00:00 2001 From: cdj <45139296+DejinChen@users.noreply.github.com> Date: Thu, 5 Sep 2024 12:54:00 +0800 Subject: [PATCH 33/35] Auto-commissioner: remove primary network config if failed in commissioning SecondaryNetworkInterface device (#35255) --- src/controller/AutoCommissioner.cpp | 15 ++++++-- src/controller/CHIPDeviceController.cpp | 46 ++++++++++++++++-------- src/controller/CHIPDeviceController.h | 2 -- src/controller/CommissioningDelegate.cpp | 7 ++-- src/controller/CommissioningDelegate.h | 7 ++-- 5 files changed, 53 insertions(+), 24 deletions(-) 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..7c43d50c082389 100644 --- a/src/controller/CHIPDeviceController.cpp +++ b/src/controller/CHIPDeviceController.cpp @@ -1878,12 +1878,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 +3530,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::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::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::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/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 From 2cf028b7d54be514547ccd37ee1077ad634b6d07 Mon Sep 17 00:00:00 2001 From: cdj <45139296+DejinChen@users.noreply.github.com> Date: Thu, 5 Sep 2024 13:02:40 +0800 Subject: [PATCH 34/35] [ESP32] Support Thread and Wi-Fi network revert configuration (#33745) * ESP32: Support Thread and Wi-Fi network revert configuration * Update src/platform/ESP32/NetworkCommissioningDriver.cpp Co-authored-by: Wang Qixiang <43193572+wqx6@users.noreply.github.com> * Update KeyValueStoreManagerImpl.cpp --------- Co-authored-by: Wang Qixiang <43193572+wqx6@users.noreply.github.com> --- .../ESP32/KeyValueStoreManagerImpl.cpp | 2 +- .../ESP32/NetworkCommissioningDriver.cpp | 104 ++++++++++++------ .../ESP32/NetworkCommissioningDriver.h | 2 +- 3 files changed, 75 insertions(+), 33 deletions(-) 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..ee061fb746681e 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; @@ -273,6 +301,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 +513,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..7c89e564292682 100644 --- a/src/platform/ESP32/NetworkCommissioningDriver.h +++ b/src/platform/ESP32/NetworkCommissioningDriver.h @@ -133,8 +133,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; From 6ade0dff90846a7aabc9c3723ef438dc9b063357 Mon Sep 17 00:00:00 2001 From: Terence Hampson Date: Thu, 5 Sep 2024 09:36:02 -0400 Subject: [PATCH 35/35] Fix fabric sync test timeouts (#35417) * Override timeout for FabricSync tests * Bump up timeouts just a little more * Remove TODOs that actually won't change since test will need to wait upto time anyways * Add unsaved files --- src/python_testing/TC_BRBINFO_4_1.py | 5 +++-- src/python_testing/TC_CCTRL_2_2.py | 6 ++++++ src/python_testing/TC_CCTRL_2_3.py | 6 ++++++ src/python_testing/TC_ECOINFO_2_2.py | 6 ++++++ src/python_testing/TC_MCORE_FS_1_1.py | 6 ++++++ src/python_testing/TC_MCORE_FS_1_2.py | 4 +++- src/python_testing/TC_MCORE_FS_1_5.py | 4 +++- 7 files changed, 33 insertions(+), 4 deletions(-) diff --git a/src/python_testing/TC_BRBINFO_4_1.py b/src/python_testing/TC_BRBINFO_4_1.py index 595d87912ad012..df922748999dd0 100644 --- a/src/python_testing/TC_BRBINFO_4_1.py +++ b/src/python_testing/TC_BRBINFO_4_1.py @@ -47,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""" diff --git a/src/python_testing/TC_CCTRL_2_2.py b/src/python_testing/TC_CCTRL_2_2.py index aa52703313ceaa..8e7a8f1fde6ac3 100644 --- a/src/python_testing/TC_CCTRL_2_2.py +++ b/src/python_testing/TC_CCTRL_2_2.py @@ -119,6 +119,12 @@ def steps_TC_CCTRL_2_2(self) -> list[TestStep]: return steps + # 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') diff --git a/src/python_testing/TC_CCTRL_2_3.py b/src/python_testing/TC_CCTRL_2_3.py index 9baa0856412d5f..224f283f46d27b 100644 --- a/src/python_testing/TC_CCTRL_2_3.py +++ b/src/python_testing/TC_CCTRL_2_3.py @@ -103,6 +103,12 @@ def steps_TC_CCTRL_2_3(self) -> list[TestStep]: 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') diff --git a/src/python_testing/TC_ECOINFO_2_2.py b/src/python_testing/TC_ECOINFO_2_2.py index b004a95927ef59..24f39ab93f2a04 100644 --- a/src/python_testing/TC_ECOINFO_2_2.py +++ b/src/python_testing/TC_ECOINFO_2_2.py @@ -42,6 +42,12 @@ def steps_TC_ECOINFO_2_2(self) -> list[TestStep]: 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 diff --git a/src/python_testing/TC_MCORE_FS_1_1.py b/src/python_testing/TC_MCORE_FS_1_1.py index 27978af3dee234..e56a1fb8246b56 100755 --- a/src/python_testing/TC_MCORE_FS_1_1.py +++ b/src/python_testing/TC_MCORE_FS_1_1.py @@ -87,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_5.py b/src/python_testing/TC_MCORE_FS_1_5.py index dbf20660e7560d..df80072d5126e3 100755 --- a/src/python_testing/TC_MCORE_FS_1_5.py +++ b/src/python_testing/TC_MCORE_FS_1_5.py @@ -117,9 +117,11 @@ def steps_TC_MCORE_FS_1_5(self) -> list[TestStep]: 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 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_5(self):